2021-10-05 20:50:22 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
2021-10-27 21:27:49 +00:00
|
|
|
import shared 1.0
|
|
|
|
import shared.popups 1.0
|
2021-10-05 20:50:22 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
2021-10-14 11:48:03 +00:00
|
|
|
// TODO: replace with StatusPopupMenu
|
2021-10-05 20:50:22 +00:00
|
|
|
PopupMenu {
|
|
|
|
id: newAccountMenu
|
|
|
|
width: 260
|
|
|
|
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutsideParent
|
|
|
|
|
2021-12-06 21:10:54 +00:00
|
|
|
signal generateNewAccountTriggered();
|
|
|
|
signal addWatchAccountTriggered();
|
|
|
|
signal enterSeedPhraseTriggered();
|
|
|
|
signal enterPrivateKeyTriggered();
|
|
|
|
|
2021-10-05 20:50:22 +00:00
|
|
|
Action {
|
|
|
|
//% "Generate an account"
|
|
|
|
text: qsTrId("generate-a-new-account")
|
|
|
|
icon.source: Style.svg("generate_account")
|
|
|
|
icon.width: 19
|
|
|
|
icon.height: 19
|
|
|
|
onTriggered: {
|
2021-12-06 21:10:54 +00:00
|
|
|
newAccountMenu.generateNewAccountTriggered();
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Action {
|
|
|
|
//% "Add a watch-only address"
|
|
|
|
text: qsTrId("add-a-watch-account")
|
|
|
|
icon.source: Style.svg("eye")
|
|
|
|
icon.width: 19
|
|
|
|
icon.height: 19
|
|
|
|
onTriggered: {
|
2021-12-06 21:10:54 +00:00
|
|
|
newAccountMenu.addWatchAccountTriggered();
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Action {
|
|
|
|
//% "Enter a seed phrase"
|
|
|
|
text: qsTrId("enter-a-seed-phrase")
|
|
|
|
icon.source: Style.svg("enter_seed_phrase")
|
|
|
|
icon.width: 19
|
|
|
|
icon.height: 19
|
|
|
|
onTriggered: {
|
2021-12-06 21:10:54 +00:00
|
|
|
newAccountMenu.enterSeedPhraseTriggered();
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Action {
|
|
|
|
//% "Enter a private key"
|
|
|
|
text: qsTrId("enter-a-private-key")
|
|
|
|
icon.source: Style.svg("enter_private_key")
|
|
|
|
icon.width: 19
|
|
|
|
icon.height: 19
|
|
|
|
onTriggered: {
|
2021-12-06 21:10:54 +00:00
|
|
|
newAccountMenu.enterPrivateKeyTriggered();
|
2021-10-05 20:50:22 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|