2024-10-15 19:26:12 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
import QtQuick.Controls 2.15
|
2021-09-28 15:04:06 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
2021-10-20 12:23:58 +00:00
|
|
|
|
2024-10-15 19:26:12 +00:00
|
|
|
import StatusQ.Core.Theme 0.1
|
2021-10-20 12:23:58 +00:00
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared.popups 1.0
|
2021-10-12 18:26:02 +00:00
|
|
|
|
|
|
|
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 {
|
2022-07-20 12:34:44 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
property StartupStore startupStore
|
|
|
|
|
2022-03-15 22:27:36 +00:00
|
|
|
signal accountSelected(int index)
|
|
|
|
signal openModalClicked()
|
2022-07-20 12:34:44 +00:00
|
|
|
|
2022-04-04 11:26:30 +00:00
|
|
|
title: qsTr("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
|
|
|
|
|
2022-07-20 12:34:44 +00:00
|
|
|
model: root.startupStore.startupModuleInst.loginAccountsModel
|
2021-07-26 07:17:49 +00:00
|
|
|
isSelected: function (index, keyUid) {
|
2022-07-20 12:34:44 +00:00
|
|
|
return root.startupStore.selectedLoginAccount.keyUid === keyUid
|
2020-06-13 15:17:54 +00:00
|
|
|
}
|
|
|
|
|
2020-06-11 21:23:27 +00:00
|
|
|
onAccountSelect: function(index) {
|
2022-07-20 12:34:44 +00:00
|
|
|
root.accountSelected(index)
|
|
|
|
root.close()
|
2020-06-11 21:23:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-01-28 11:04:10 +00:00
|
|
|
footer: StatusButton {
|
2020-06-12 20:47:44 +00:00
|
|
|
anchors.bottom: parent.bottom
|
2024-10-15 19:26:12 +00:00
|
|
|
anchors.topMargin: Theme.padding
|
2020-06-11 21:23:27 +00:00
|
|
|
anchors.right: parent.right
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add another existing key")
|
2020-06-11 21:23:27 +00:00
|
|
|
|
|
|
|
onClicked : {
|
2022-03-15 22:27:36 +00:00
|
|
|
openModalClicked()
|
2022-07-20 12:34:44 +00:00
|
|
|
root.close()
|
2020-06-11 21:23:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|