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