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

52 lines
1.4 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 StatusQ.Controls 0.1
import shared.popups 1.0
import "../panels"
import "../stores"
2020-06-03 16:49:18 +00:00
// TODO: replace with StatusModal
ModalPopup {
id: popup
2021-02-18 16:36:05 +00:00
//% "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);
}
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
onClicked: {
popup.addCustomTokenTriggered();
}
2020-06-03 16:49:18 +00:00
}
}