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

48 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 "../../../../shared"
import "../../../../shared/popups"
import "../../../../shared/status"
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
model: LoginStore.loginModelInst
isSelected: function (index, keyUid) {
return LoginStore.loginModelInst.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()
}
}
}