status-desktop/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml
Alexandra Betouni 336f90a60f feat(desktop/wallet) Removed dynamic scoping from wallet
Removed all dynamic scoping parts in wallet section plus

- Renamed Config to Global and added more functions there
- Moved changeAppSectionBySectionType function to Global
  and updated all places where is used to call it from
  Global instead
- Moved openLink function to Global and updated all places
  where is used to call it from Global instead
- Moved errorSound to Global, introduced playErrorSound
  function  and updated all places where is used to call
  this function from Global instead

Closes #4245
2022-02-01 11:38:27 +01:00

52 lines
1.4 KiB
QML

import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import StatusQ.Controls 0.1
import shared.popups 1.0
import "../panels"
import "../stores"
// TODO: replace with StatusModal
ModalPopup {
id: popup
//% "Manage Assets"
title: qsTrId("manage-assets")
signal addCustomTokenTriggered()
signal tokenDetailsTriggered(string address, string address, string address, string address)
TokenSettingsModalContent {
id: settingsModalContent
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.top: parent.top
anchors.leftMargin: Style.current.padding
anchors.rightMargin: Style.current.padding
defaultTokenList: RootStore.defaultTokenList
customTokenList: RootStore.customTokenList
onToggleVisibleClicked: {
RootStore.toggleVisible(symbol)
}
onRemoveCustomTokenTriggered: {
RootStore.removeCustomToken(address)
}
onTokenDetailsTriggered: {
popup.tokenDetailsTriggered(address, name, symbol, decimals);
}
}
footer: StatusButton {
anchors.right: parent.right
//% "Add custom token"
text: qsTrId("add-custom-token")
anchors.top: parent.top
onClicked: {
popup.addCustomTokenTriggered();
}
}
}