mirror of
https://github.com/monero-project/monero-gui
synced 2024-11-28 09:31:37 +01:00
WizardCreateDevice1: display images; differentiate Ledger Nano X and S; add label to dropdown
This commit is contained in:
parent
51828babbb
commit
5234570afa
BIN
images/ledgerNanoS.png
Normal file
BIN
images/ledgerNanoS.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
BIN
images/ledgerNanoX.png
Normal file
BIN
images/ledgerNanoX.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
images/trezor.png
Normal file
BIN
images/trezor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 72 KiB |
BIN
images/trezor@2x.png
Normal file
BIN
images/trezor@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 301 KiB |
4
qml.qrc
4
qml.qrc
@ -252,5 +252,9 @@
|
|||||||
<file>images/success@2x.png</file>
|
<file>images/success@2x.png</file>
|
||||||
<file>components/SuccessfulTxDialog.qml</file>
|
<file>components/SuccessfulTxDialog.qml</file>
|
||||||
<file>components/TxConfirmationDialog.qml</file>
|
<file>components/TxConfirmationDialog.qml</file>
|
||||||
|
<file>images/ledgerNanoS.png</file>
|
||||||
|
<file>images/ledgerNanoX.png</file>
|
||||||
|
<file>images/trezor.png</file>
|
||||||
|
<file>images/trezor@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -45,11 +45,14 @@ Rectangle {
|
|||||||
property string viewName: "wizardCreateDevice1"
|
property string viewName: "wizardCreateDevice1"
|
||||||
|
|
||||||
property var deviceName: deviceNameModel.get(deviceNameDropdown.currentIndex).column2
|
property var deviceName: deviceNameModel.get(deviceNameDropdown.currentIndex).column2
|
||||||
|
property var ledgerType: deviceName == "Ledger" ? deviceNameModel.get(deviceNameDropdown.currentIndex).column1 : null
|
||||||
|
property var hardwareWalletType: wizardCreateDevice1.deviceName;
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: deviceNameModel
|
id: deviceNameModel
|
||||||
ListElement { column1: qsTr("Choose your hardware device"); column2: "";}
|
ListElement { column1: qsTr("Choose your hardware wallet"); column2: "";}
|
||||||
ListElement { column1: "Ledger Nano S/X"; column2: "Ledger";}
|
ListElement { column1: "Ledger Nano S"; column2: "Ledger";}
|
||||||
|
ListElement { column1: "Ledger Nano X"; column2: "Ledger";}
|
||||||
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
|
ListElement { column1: "Trezor Model T"; column2: "Trezor";}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,44 +81,88 @@ Rectangle {
|
|||||||
id: walletInput
|
id: walletInput
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
RowLayout {
|
||||||
|
id: mainRow
|
||||||
spacing: 0
|
spacing: 0
|
||||||
Layout.topMargin: -10
|
Layout.topMargin: -10
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
||||||
MoneroComponents.StandardDropdown {
|
ColumnLayout {
|
||||||
id: deviceNameDropdown
|
id: leftColumn
|
||||||
dataModel: deviceNameModel
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 0
|
Layout.alignment: Qt.AlignTop
|
||||||
z: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.RadioButton {
|
MoneroComponents.TextPlain {
|
||||||
id: newDeviceWallet
|
font.family: MoneroComponents.Style.fontRegular.name
|
||||||
Layout.topMargin: 20
|
font.pixelSize: 14
|
||||||
text: qsTr("Create a new wallet from device.") + translationManager.emptyString
|
color: MoneroComponents.Style.defaultFontColor
|
||||||
fontSize: 16
|
wrapMode: Text.Wrap
|
||||||
checked: true
|
Layout.fillWidth: true
|
||||||
onClicked: {
|
text: qsTr("Hardware wallet model")
|
||||||
checked = true;
|
}
|
||||||
restoreDeviceWallet.checked = false;
|
|
||||||
wizardController.walletOptionsDeviceIsRestore = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
MoneroComponents.RadioButton {
|
MoneroComponents.StandardDropdown {
|
||||||
id: restoreDeviceWallet
|
id: deviceNameDropdown
|
||||||
Layout.topMargin: 10
|
dataModel: deviceNameModel
|
||||||
text: qsTr("Restore a wallet from device. Use this if you used your hardware wallet before.") + translationManager.emptyString
|
Layout.preferredWidth: 450
|
||||||
fontSize: 16
|
Layout.topMargin: 6
|
||||||
checked: false
|
z: 3
|
||||||
onClicked: {
|
}
|
||||||
checked = true;
|
|
||||||
newDeviceWallet.checked = false;
|
MoneroComponents.RadioButton {
|
||||||
wizardController.walletOptionsDeviceIsRestore = true;
|
id: newDeviceWallet
|
||||||
}
|
Layout.topMargin: 20
|
||||||
}
|
text: qsTr("Create a new wallet from device.") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
checked: true
|
||||||
|
onClicked: {
|
||||||
|
checked = true;
|
||||||
|
restoreDeviceWallet.checked = false;
|
||||||
|
wizardController.walletOptionsDeviceIsRestore = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MoneroComponents.RadioButton {
|
||||||
|
id: restoreDeviceWallet
|
||||||
|
Layout.topMargin: 10
|
||||||
|
text: qsTr("Restore a wallet from device. Use this if you used your hardware wallet before.") + translationManager.emptyString
|
||||||
|
fontSize: 16
|
||||||
|
checked: false
|
||||||
|
onClicked: {
|
||||||
|
checked = true;
|
||||||
|
newDeviceWallet.checked = false;
|
||||||
|
wizardController.walletOptionsDeviceIsRestore = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: rightColumn
|
||||||
|
Layout.alignment: Qt.AlignTop
|
||||||
|
Layout.preferredWidth: 305
|
||||||
|
Layout.minimumWidth: 120
|
||||||
|
Layout.preferredHeight: 165
|
||||||
|
Layout.maximumHeight: 165
|
||||||
|
Layout.leftMargin: 10
|
||||||
|
Layout.rightMargin: 10
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: "transparent"
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.topMargin: 0
|
||||||
|
|
||||||
|
Image {
|
||||||
|
Layout.alignment: Qt.AlignTop | Qt.AlignHCenter
|
||||||
|
source: hardwareWalletType == "Trezor" ? "qrc:///images/trezor.png" : hardwareWalletType == "Ledger" ? (ledgerType == "Ledger Nano S" ? "qrc:///images/ledgerNanoS.png" : "qrc:///images/ledgerNanoX.png") : ""
|
||||||
|
z: parent.z + 1
|
||||||
|
width: parent.width
|
||||||
|
height: 165
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
mipmap: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
Loading…
Reference in New Issue
Block a user