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 14:23:58 +02:00
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-28 00:27:49 +03:00
|
|
|
import shared.popups 1.0
|
2021-10-12 20:26:02 +02:00
|
|
|
|
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
2020-06-11 17:23:27 -04:00
|
|
|
|
2021-10-14 13:33:34 +02:00
|
|
|
// TODO: replace with StatusModal
|
2020-06-11 17:23:27 -04:00
|
|
|
ModalPopup {
|
|
|
|
property var onAccountSelect: function () {}
|
2020-06-12 16:47:44 -04:00
|
|
|
property var onOpenModalClick: function () {}
|
2020-06-11 17:23:27 -04:00
|
|
|
id: popup
|
2021-02-18 11:36:05 -05:00
|
|
|
//% "Your keys"
|
|
|
|
title: qsTrId("your-keys")
|
2020-06-11 17:23:27 -04:00
|
|
|
|
2021-10-12 20:26:02 +02:00
|
|
|
AccountListPanel {
|
2020-06-11 17:23:27 -04:00
|
|
|
id: accountList
|
|
|
|
anchors.fill: parent
|
|
|
|
|
2021-10-17 12:44:21 +02:00
|
|
|
model: LoginStore.loginModuleInst.accountsModel
|
2021-07-26 09:17:49 +02:00
|
|
|
isSelected: function (index, keyUid) {
|
2021-10-15 14:18:09 +02:00
|
|
|
return LoginStore.currentAccount.keyUid === keyUid
|
2020-06-13 11:17:54 -04:00
|
|
|
}
|
|
|
|
|
2020-06-11 17:23:27 -04:00
|
|
|
onAccountSelect: function(index) {
|
|
|
|
popup.onAccountSelect(index)
|
|
|
|
popup.close()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-28 12:04:10 +01:00
|
|
|
footer: StatusButton {
|
2020-06-12 16:47:44 -04:00
|
|
|
anchors.bottom: parent.bottom
|
2020-07-02 11:14:31 -04:00
|
|
|
anchors.topMargin: Style.current.padding
|
2020-06-11 17:23:27 -04:00
|
|
|
anchors.right: parent.right
|
2021-02-18 11:36:05 -05:00
|
|
|
//% "Add another existing key"
|
|
|
|
text: qsTrId("add-another-existing-key")
|
2020-06-11 17:23:27 -04:00
|
|
|
|
|
|
|
onClicked : {
|
2020-06-12 16:47:44 -04:00
|
|
|
onOpenModalClick()
|
|
|
|
popup.close()
|
2020-06-11 17:23:27 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|