status-desktop/ui/app/AppLayouts/Wallet/popups/TokenSettingsModal.qml

47 lines
1.2 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import "../../../../shared"
import "../../../../shared/status"
import "../panels"
import "../stores"
2020-06-03 16:49:18 +00:00
ModalPopup {
id: popup
2021-02-18 16:36:05 +00:00
//% "Manage Assets"
title: qsTrId("manage-assets")
onOpened: {
RootStore.loadCustomTokens()
}
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
hasAsset: function(symbol) { return RootStore.hasAsset(symbol) }
onToggleAssetClicked: {
RootStore.toggleAsset(symbol)
}
onRemoveCustomTokenTriggered: {
RootStore.removeCustomToken(address)
}
2020-06-03 16:49:18 +00:00
}
footer: StatusButton {
anchors.right: parent.right
//% "Add custom token"
text: qsTrId("add-custom-token")
anchors.top: parent.top
2020-11-02 18:18:13 +00:00
onClicked: addCustomTokenModal.openEditable()
2020-06-03 16:49:18 +00:00
}
}