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-01 21:02:50 -04:00
|
|
|
|
2021-10-14 13:33:34 +02:00
|
|
|
// TODO: replace with StatusModal
|
2021-02-01 13:25:26 -05:00
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
width: 480
|
|
|
|
height: 510
|
2021-10-05 22:50:22 +02:00
|
|
|
|
2021-10-21 10:22:05 +02:00
|
|
|
property string currentCurrency: RootStore.currentCurrency
|
2021-02-01 13:25:26 -05:00
|
|
|
|
2021-10-21 10:22:05 +02:00
|
|
|
onCurrentCurrencyChanged: {
|
|
|
|
setCurrencyModalContent.currency = currentCurrency
|
2020-06-01 21:02:50 -04:00
|
|
|
}
|
|
|
|
|
2021-02-18 11:36:05 -05:00
|
|
|
//% "Set Currency"
|
|
|
|
title: qsTrId("set-currency")
|
2020-07-22 16:40:32 -04:00
|
|
|
|
2021-02-01 13:25:26 -05:00
|
|
|
SetCurrencyModalContent {
|
|
|
|
id: setCurrencyModalContent
|
2021-10-05 22:50:22 +02:00
|
|
|
tokenListModel: CurrenciesStore {}
|
2021-02-01 13:25:26 -05:00
|
|
|
}
|
2020-07-22 16:40:32 -04:00
|
|
|
|
2021-01-28 12:04:10 +01:00
|
|
|
footer: StatusButton {
|
2021-02-01 13:25:26 -05:00
|
|
|
anchors.right: parent.right
|
|
|
|
//% "Save"
|
2021-01-28 12:04:10 +01:00
|
|
|
text: qsTrId("save")
|
2021-02-01 13:25:26 -05:00
|
|
|
onClicked: {
|
2021-10-21 10:22:05 +02:00
|
|
|
RootStore.updateCurrency(setCurrencyModalContent.currency)
|
2021-02-01 13:25:26 -05:00
|
|
|
popup.close()
|
2020-07-22 16:40:32 -04:00
|
|
|
}
|
2020-06-01 21:02:50 -04:00
|
|
|
}
|
|
|
|
}
|