status-desktop/ui/app/AppLayouts/Onboarding/popups/SelectAnotherAccountModal.qml

49 lines
1.1 KiB
QML
Raw Normal View History

2020-06-17 19:18:31 +00:00
import QtQuick 2.13
import QtQuick.Controls 2.13
import utils 1.0
import StatusQ.Controls 0.1
import shared.popups 1.0
import "../panels"
import "../stores"
// TODO: replace with StatusModal
ModalPopup {
property var onAccountSelect: function () {}
2020-06-12 20:47:44 +00:00
property var onOpenModalClick: function () {}
id: popup
2021-02-18 16:36:05 +00:00
//% "Your keys"
title: qsTrId("your-keys")
AccountListPanel {
id: accountList
anchors.fill: parent
2021-10-17 10:44:21 +00:00
model: LoginStore.loginModuleInst.accountsModel
isSelected: function (index, keyUid) {
return LoginStore.currentAccount.keyUid === keyUid
2020-06-13 15:17:54 +00:00
}
onAccountSelect: function(index) {
popup.onAccountSelect(index)
popup.close()
}
}
footer: StatusButton {
2020-06-12 20:47:44 +00:00
anchors.bottom: parent.bottom
anchors.topMargin: Style.current.padding
anchors.right: parent.right
2021-02-18 16:36:05 +00:00
//% "Add another existing key"
text: qsTrId("add-another-existing-key")
onClicked : {
2020-06-12 20:47:44 +00:00
onOpenModalClick()
popup.close()
}
}
}