2020-06-17 15:18:31 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2021-09-28 18:04:06 +03:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-20 12:21:23 +02:00
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared.popups 1.0
|
2021-10-05 22:50:22 +02:00
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
2020-06-03 12:49:18 -04:00
|
|
|
|
2021-10-14 13:33:34 +02:00
|
|
|
// TODO: replace with StatusModal
|
2020-06-18 11:56:53 -04:00
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
2021-02-18 11:36:05 -05:00
|
|
|
//% "Manage Assets"
|
|
|
|
title: qsTrId("manage-assets")
|
2021-12-06 23:10:54 +02:00
|
|
|
signal addCustomTokenTriggered()
|
|
|
|
signal tokenDetailsTriggered(string address, string address, string address, string address)
|
|
|
|
|
2020-06-18 11:56:53 -04:00
|
|
|
TokenSettingsModalContent {
|
|
|
|
id: settingsModalContent
|
2021-01-12 15:30:01 +01:00
|
|
|
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
|
2021-10-05 22:50:22 +02:00
|
|
|
defaultTokenList: RootStore.defaultTokenList
|
|
|
|
customTokenList: RootStore.customTokenList
|
|
|
|
|
2021-10-21 10:22:05 +02:00
|
|
|
onToggleVisibleClicked: {
|
|
|
|
RootStore.toggleVisible(symbol)
|
2021-10-05 22:50:22 +02:00
|
|
|
}
|
|
|
|
onRemoveCustomTokenTriggered: {
|
|
|
|
RootStore.removeCustomToken(address)
|
|
|
|
}
|
2021-12-06 23:10:54 +02:00
|
|
|
onTokenDetailsTriggered: {
|
|
|
|
popup.tokenDetailsTriggered(address, name, symbol, decimals);
|
|
|
|
}
|
2020-06-03 12:49:18 -04:00
|
|
|
}
|
|
|
|
|
2021-01-12 15:30:01 +01:00
|
|
|
footer: StatusButton {
|
2020-06-18 11:56:53 -04:00
|
|
|
anchors.right: parent.right
|
2020-07-06 16:39:55 -04:00
|
|
|
//% "Add custom token"
|
2021-01-12 15:30:01 +01:00
|
|
|
text: qsTrId("add-custom-token")
|
2020-06-18 11:56:53 -04:00
|
|
|
anchors.top: parent.top
|
2021-12-06 23:10:54 +02:00
|
|
|
onClicked: {
|
|
|
|
popup.addCustomTokenTriggered();
|
|
|
|
}
|
2020-06-03 12:49:18 -04:00
|
|
|
}
|
|
|
|
}
|