qt,qml: add a welcome page as initial page for server connect wizard
This is much less intimidating than asking if the user wants to use a proxy out of the gate.
This commit is contained in:
@@ -6,6 +6,7 @@ import "../controls"
|
||||
|
||||
WizardComponent {
|
||||
valid: true
|
||||
title: qsTr('Server')
|
||||
|
||||
function apply() {
|
||||
wizard_data['autoconnect'] = serverconnectgroup.checkedButton.connecttype === 'auto'
|
||||
|
||||
@@ -7,6 +7,7 @@ import "../controls"
|
||||
|
||||
WizardComponent {
|
||||
valid: true
|
||||
title: qsTr('Proxy')
|
||||
|
||||
function apply() {
|
||||
wizard_data['want_proxy'] = wantproxygroup.checkedButton.wantproxy
|
||||
|
||||
@@ -6,6 +6,7 @@ import "../controls"
|
||||
|
||||
WizardComponent {
|
||||
valid: true
|
||||
title: qsTr('Proxy')
|
||||
|
||||
function apply() {
|
||||
wizard_data['proxy'] = pc.toProxyDict()
|
||||
|
||||
@@ -7,6 +7,7 @@ import "../controls"
|
||||
WizardComponent {
|
||||
valid: true
|
||||
last: true
|
||||
title: qsTr('Server')
|
||||
|
||||
function apply() {
|
||||
wizard_data['autoconnect'] = sc.address == ""
|
||||
|
||||
48
electrum/gui/qml/components/wizard/WCWelcome.qml
Normal file
48
electrum/gui/qml/components/wizard/WCWelcome.qml
Normal file
@@ -0,0 +1,48 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import QtQuick.Controls
|
||||
|
||||
// import org.electrum 1.0
|
||||
|
||||
import "../controls"
|
||||
|
||||
WizardComponent {
|
||||
valid: true
|
||||
title: qsTr('Electrum Bitcoin Wallet')
|
||||
|
||||
function apply() {
|
||||
wizard_data['use_defaults'] = use_defaults.checked
|
||||
if (use_defaults.checked) {
|
||||
wizard_data['autoconnect'] = true
|
||||
wizard_data['want_proxy'] = false
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
width: parent.width
|
||||
|
||||
Image {
|
||||
Layout.fillWidth: true
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: Qt.resolvedUrl('../../../icons/electrum_presplash.png')
|
||||
// reduce spacing a bit
|
||||
Layout.topMargin: -50
|
||||
Layout.bottomMargin: -160
|
||||
}
|
||||
|
||||
Label {
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr('Welcome')
|
||||
font.pixelSize: constants.fontSizeXLarge
|
||||
Layout.bottomMargin: constants.paddingXXLarge
|
||||
}
|
||||
|
||||
CheckBox {
|
||||
id: use_defaults
|
||||
Layout.alignment: Qt.AlignHCenter
|
||||
text: qsTr('Use default network settings')
|
||||
checked: true
|
||||
onCheckedChanged: checkIsLast()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,8 @@ ElDialog {
|
||||
|
||||
padding: 0
|
||||
|
||||
title: wizardTitle + (pages.currentItem.title ? ' - ' + pages.currentItem.title : '')
|
||||
title: (pages.currentItem.wizard_title ? pages.currentItem.wizard_title : wizardTitle) +
|
||||
(pages.currentItem.title ? ' - ' + pages.currentItem.title : '')
|
||||
iconSource: '../../../icons/electrum.png'
|
||||
|
||||
// android back button triggers close() on Popups. Disabling close here,
|
||||
|
||||
@@ -10,6 +10,7 @@ Pane {
|
||||
property var wizard_data : ({})
|
||||
property bool valid
|
||||
property bool last: false
|
||||
property string wizard_title: ''
|
||||
property string title: ''
|
||||
property bool securePage: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user