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-05 22:50:22 +02:00
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
2020-06-03 12:49:18 -04:00
|
|
|
|
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-10-05 22:50:22 +02:00
|
|
|
|
|
|
|
onOpened: {
|
|
|
|
RootStore.loadCustomTokens()
|
|
|
|
}
|
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
|
|
|
|
hasAsset: function(symbol) { return RootStore.hasAsset(symbol) }
|
|
|
|
|
|
|
|
onToggleAssetClicked: {
|
|
|
|
RootStore.toggleAsset(symbol)
|
|
|
|
}
|
|
|
|
onRemoveCustomTokenTriggered: {
|
|
|
|
RootStore.removeCustomToken(address)
|
|
|
|
}
|
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
|
2020-11-02 14:18:13 -04:00
|
|
|
onClicked: addCustomTokenModal.openEditable()
|
2020-06-03 12:49:18 -04:00
|
|
|
}
|
|
|
|
}
|