status-desktop/ui/onboarding/Login/SelectAnotherAccountModal.qml

47 lines
1.0 KiB
QML
Raw Normal View History

import QtQuick 2.12
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.3
import "../../imports"
import "../../shared"
ModalPopup {
property var onAccountSelect: function () {}
2020-06-12 20:47:44 +00:00
property var onOpenModalClick: function () {}
id: popup
title: qsTr("Your accounts")
AccountList {
id: accountList
anchors.fill: parent
accounts: loginModel
2020-06-13 15:17:54 +00:00
isSelected: function (index, address) {
return loginModel.currentAccount.address === address
}
onAccountSelect: function(index) {
popup.onAccountSelect(index)
popup.close()
}
}
footer: StyledButton {
2020-06-12 20:47:44 +00:00
anchors.bottom: parent.bottom
anchors.topMargin: Theme.padding
anchors.right: parent.right
anchors.rightMargin: Theme.padding
label: "Add another existing key"
onClicked : {
2020-06-12 20:47:44 +00:00
onOpenModalClick()
popup.close()
}
}
}
/*##^##
Designer {
D{i:0;formeditorColor:"#ffffff";height:500;width:400}
}
##^##*/