qml: styling bip39 refine and recovery
This commit is contained in:
@@ -88,7 +88,7 @@ ElDialog {
|
||||
|
||||
GridLayout {
|
||||
id: itemLayout
|
||||
columns: 2
|
||||
columns: 3
|
||||
rowSpacing: 0
|
||||
|
||||
anchors {
|
||||
@@ -98,9 +98,20 @@ ElDialog {
|
||||
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 {
|
||||
Layout.columnSpan: 2
|
||||
Layout.fillWidth: true
|
||||
text: model.description
|
||||
wrapMode: Text.Wrap
|
||||
}
|
||||
Label {
|
||||
text: qsTr('script type')
|
||||
@@ -119,7 +130,7 @@ ElDialog {
|
||||
text: model.derivation_path
|
||||
}
|
||||
Item {
|
||||
Layout.columnSpan: 2
|
||||
Layout.columnSpan: 3
|
||||
Layout.preferredHeight: constants.paddingLarge
|
||||
Layout.preferredWidth: 1
|
||||
}
|
||||
|
||||
@@ -85,38 +85,6 @@ WizardComponent {
|
||||
id: mainLayout
|
||||
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 {
|
||||
text: qsTr('Choose the type of addresses in your wallet.')
|
||||
}
|
||||
@@ -164,17 +132,55 @@ WizardComponent {
|
||||
}
|
||||
|
||||
InfoTextArea {
|
||||
Layout.preferredWidth: parent.width
|
||||
Layout.fillWidth: true
|
||||
text: qsTr('You can override the suggested derivation path.') + ' ' +
|
||||
qsTr('If you are not sure what this is, leave this field unchanged.')
|
||||
}
|
||||
|
||||
Label {
|
||||
text: qsTr('Derivation path')
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: derivationpathtext
|
||||
Layout.fillWidth: true
|
||||
placeholderText: qsTr('Derivation path')
|
||||
Layout.leftMargin: constants.paddingMedium
|
||||
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