qml: styling bip39 refine and recovery
This commit is contained in:
@@ -88,7 +88,7 @@ ElDialog {
|
|||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
id: itemLayout
|
id: itemLayout
|
||||||
columns: 2
|
columns: 3
|
||||||
rowSpacing: 0
|
rowSpacing: 0
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
@@ -98,9 +98,20 @@ ElDialog {
|
|||||||
rightMargin: constants.paddingMedium
|
rightMargin: constants.paddingMedium
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
Layout.columnSpan: 3
|
||||||
|
Layout.preferredHeight: constants.paddingLarge
|
||||||
|
Layout.preferredWidth: 1
|
||||||
|
}
|
||||||
|
Image {
|
||||||
|
Layout.rowSpan: 3
|
||||||
|
source: Qt.resolvedUrl('../../icons/wallet.png')
|
||||||
|
}
|
||||||
Label {
|
Label {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 2
|
||||||
|
Layout.fillWidth: true
|
||||||
text: model.description
|
text: model.description
|
||||||
|
wrapMode: Text.Wrap
|
||||||
}
|
}
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('script type')
|
text: qsTr('script type')
|
||||||
@@ -119,7 +130,7 @@ ElDialog {
|
|||||||
text: model.derivation_path
|
text: model.derivation_path
|
||||||
}
|
}
|
||||||
Item {
|
Item {
|
||||||
Layout.columnSpan: 2
|
Layout.columnSpan: 3
|
||||||
Layout.preferredHeight: constants.paddingLarge
|
Layout.preferredHeight: constants.paddingLarge
|
||||||
Layout.preferredWidth: 1
|
Layout.preferredWidth: 1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,38 +85,6 @@ WizardComponent {
|
|||||||
id: mainLayout
|
id: mainLayout
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
||||||
Label {
|
|
||||||
text: qsTr('Script type and Derivation path')
|
|
||||||
}
|
|
||||||
Pane {
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
padding: 0
|
|
||||||
visible: !isMultisig
|
|
||||||
|
|
||||||
FlatButton {
|
|
||||||
text: qsTr('Detect Existing Accounts')
|
|
||||||
onClicked: {
|
|
||||||
var dialog = bip39recoveryDialog.createObject(mainLayout, {
|
|
||||||
walletType: wizard_data['wallet_type'],
|
|
||||||
seed: wizard_data['seed'],
|
|
||||||
seedExtraWords: wizard_data['seed_extra_words']
|
|
||||||
})
|
|
||||||
dialog.accepted.connect(function () {
|
|
||||||
// select matching script type button and set derivation path
|
|
||||||
for (var i = 0; i < scripttypegroup.buttons.length; i++) {
|
|
||||||
var btn = scripttypegroup.buttons[i]
|
|
||||||
if (btn.visible && btn.scripttype == dialog.scriptType) {
|
|
||||||
btn.checked = true
|
|
||||||
derivationpathtext.text = dialog.derivationPath
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
dialog.open()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
text: qsTr('Choose the type of addresses in your wallet.')
|
text: qsTr('Choose the type of addresses in your wallet.')
|
||||||
}
|
}
|
||||||
@@ -164,17 +132,55 @@ WizardComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
InfoTextArea {
|
InfoTextArea {
|
||||||
Layout.preferredWidth: parent.width
|
Layout.fillWidth: true
|
||||||
text: qsTr('You can override the suggested derivation path.') + ' ' +
|
text: qsTr('You can override the suggested derivation path.') + ' ' +
|
||||||
qsTr('If you are not sure what this is, leave this field unchanged.')
|
qsTr('If you are not sure what this is, leave this field unchanged.')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: qsTr('Derivation path')
|
||||||
|
}
|
||||||
|
|
||||||
TextField {
|
TextField {
|
||||||
id: derivationpathtext
|
id: derivationpathtext
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
placeholderText: qsTr('Derivation path')
|
Layout.leftMargin: constants.paddingMedium
|
||||||
onTextChanged: validate()
|
onTextChanged: validate()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
Layout.topMargin: constants.paddingLarge
|
||||||
|
padding: 0
|
||||||
|
visible: !isMultisig
|
||||||
|
background: Rectangle {
|
||||||
|
color: Qt.lighter(Material.dialogColor, 1.5)
|
||||||
|
}
|
||||||
|
|
||||||
|
FlatButton {
|
||||||
|
text: qsTr('Detect Existing Accounts')
|
||||||
|
onClicked: {
|
||||||
|
var dialog = bip39recoveryDialog.createObject(mainLayout, {
|
||||||
|
walletType: wizard_data['wallet_type'],
|
||||||
|
seed: wizard_data['seed'],
|
||||||
|
seedExtraWords: wizard_data['seed_extra_words']
|
||||||
|
})
|
||||||
|
dialog.accepted.connect(function () {
|
||||||
|
// select matching script type button and set derivation path
|
||||||
|
for (var i = 0; i < scripttypegroup.buttons.length; i++) {
|
||||||
|
var btn = scripttypegroup.buttons[i]
|
||||||
|
if (btn.visible && btn.scripttype == dialog.scriptType) {
|
||||||
|
btn.checked = true
|
||||||
|
derivationpathtext.text = dialog.derivationPath
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
dialog.open()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user