2020-06-17 19:18:31 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-05 20:50:22 +00:00
|
|
|
import "../../../../shared"
|
|
|
|
import "../../../../shared/status"
|
2021-10-14 11:33:34 +00:00
|
|
|
import "../../../../shared/popups"
|
2021-10-05 20:50:22 +00:00
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
2020-06-02 01:02:50 +00:00
|
|
|
|
2021-10-14 11:33:34 +00:00
|
|
|
// TODO: replace with StatusModal
|
2021-02-01 18:25:26 +00:00
|
|
|
ModalPopup {
|
|
|
|
id: popup
|
|
|
|
width: 480
|
|
|
|
height: 510
|
2021-10-05 20:50:22 +00:00
|
|
|
|
|
|
|
property string defaultCurrency: RootStore.defaultCurrency
|
2021-02-01 18:25:26 +00:00
|
|
|
|
2021-02-02 11:50:20 +00:00
|
|
|
onDefaultCurrencyChanged: {
|
|
|
|
setCurrencyModalContent.currency = defaultCurrency
|
2020-06-02 01:02:50 +00:00
|
|
|
}
|
|
|
|
|
2021-02-18 16:36:05 +00:00
|
|
|
//% "Set Currency"
|
|
|
|
title: qsTrId("set-currency")
|
2020-07-22 20:40:32 +00:00
|
|
|
|
2021-02-01 18:25:26 +00:00
|
|
|
SetCurrencyModalContent {
|
|
|
|
id: setCurrencyModalContent
|
2021-10-05 20:50:22 +00:00
|
|
|
tokenListModel: CurrenciesStore {}
|
|
|
|
onSetDefaultCurrency: {
|
|
|
|
RootStore.setDefaultCurrency(key)
|
|
|
|
}
|
2021-02-01 18:25:26 +00:00
|
|
|
}
|
2020-07-22 20:40:32 +00:00
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
footer: StatusButton {
|
2021-02-01 18:25:26 +00:00
|
|
|
anchors.right: parent.right
|
|
|
|
//% "Save"
|
2021-01-28 11:04:10 +00:00
|
|
|
text: qsTrId("save")
|
2021-02-01 18:25:26 +00:00
|
|
|
onClicked: {
|
|
|
|
console.log("TODO: apply all accounts")
|
|
|
|
popup.close()
|
2020-07-22 20:40:32 +00:00
|
|
|
}
|
2020-06-02 01:02:50 +00:00
|
|
|
}
|
|
|
|
}
|