diff options
| author | Jaquee <jaquee.monero@gmail.com> | 2017-10-23 19:49:57 +0200 |
|---|---|---|
| committer | Jaquee <jaquee.monero@gmail.com> | 2017-10-23 20:35:17 +0200 |
| commit | 80618c83fdda34c80be81a1fe950a53466b8e596 (patch) | |
| tree | 8d4d80e0e965e567f3661d59794382bdeeca12ee /wizard/WizardOptions.qml | |
| parent | ea49e842159b6de5144b0daaf44e37a093817fbe (diff) | |
| download | monzero-gui-80618c83fdda34c80be81a1fe950a53466b8e596.tar.gz monzero-gui-80618c83fdda34c80be81a1fe950a53466b8e596.tar.xz monzero-gui-80618c83fdda34c80be81a1fe950a53466b8e596.zip | |
wizard: reworked testnet settings
Diffstat (limited to 'wizard/WizardOptions.qml')
| -rw-r--r-- | wizard/WizardOptions.qml | 82 |
1 files changed, 17 insertions, 65 deletions
diff --git a/wizard/WizardOptions.qml b/wizard/WizardOptions.qml index b173add5..0154b9ce 100644 --- a/wizard/WizardOptions.qml +++ b/wizard/WizardOptions.qml @@ -44,25 +44,12 @@ ColumnLayout { function onPageClosed() { // Save settings used in open from file. // other wizard settings are saved on last page in applySettings() - appWindow.persistentSettings.testnet = wizard.settings["testnet"] - appWindow.persistentSettings.daemon_address = wizard.settings["daemon_address"] appWindow.persistentSettings.language = wizard.settings.language appWindow.persistentSettings.locale = wizard.settings.locale return true; } - function saveDaemonAddress() { - wizard.settings["daemon_address"] = daemonAddress.text - wizard.settings["testnet"] = testNet.checked - } - - QtObject { - id: d - readonly property string daemonAddressTestnet : "localhost:38081" - readonly property string daemonAddressMainnet : "localhost:18081" - } - Behavior on opacity { NumberAnimation { duration: 100; easing.type: Easing.InQuad } } @@ -139,7 +126,6 @@ ColumnLayout { anchors.fill: parent hoverEnabled: true onClicked: { - page.saveDaemonAddress() page.createWalletClicked() } } @@ -182,7 +168,6 @@ ColumnLayout { anchors.fill: parent hoverEnabled: true onClicked: { - page.saveDaemonAddress() page.recoveryWalletClicked() } } @@ -226,7 +211,6 @@ ColumnLayout { anchors.fill: parent hoverEnabled: true onClicked: { - page.saveDaemonAddress() page.openWalletClicked() } } @@ -247,62 +231,30 @@ ColumnLayout { } - // daemon select - // TODO: Move to separate page - - ColumnLayout { + RowLayout { Layout.leftMargin: wizardLeftMargin Layout.rightMargin: wizardRightMargin + Layout.topMargin: 30 Layout.alignment: Qt.AlignCenter + Layout.fillWidth: true - - Label { - Layout.topMargin: 20 - fontSize: 14 - text: qsTr("Custom daemon address (optional)") + translationManager.emptyString - + translationManager.emptyString - } - - GridLayout { - Layout.fillWidth: true - Layout.alignment: Qt.AlignHCenter - - columnSpacing: 20 - rowSpacing: 20 - flow: isMobile ? GridLayout.TopToBottom : GridLayout.LeftToRight - - RowLayout { - spacing: 20 - Layout.alignment: Qt.AlignCenter - - LineEdit { - id: daemonAddress - Layout.alignment: Qt.AlignCenter - width: 200 - fontSize: 14 - text: { - if(appWindow.persistentSettings.daemon_address) - return appWindow.persistentSettings.daemon_address; - return testNet.checked ? d.daemonAddressTestnet : d.daemonAddressMainnet - } - - } - - CheckBox { - id: testNet - Layout.alignment: Qt.AlignCenter - anchors.verticalCenter: parent.verticalCenter - text: qsTr("Testnet") + translationManager.emptyString - background: "#FFFFFF" - fontColor: "#4A4646" - fontSize: 16 - checkedIcon: "../images/checkedVioletIcon.png" - uncheckedIcon: "../images/uncheckedIcon.png" - checked: appWindow.persistentSettings.testnet; + Rectangle { + width: 100 + CheckBox { + id: testNet + text: qsTr("Testnet") + translationManager.emptyString + background: "#FFFFFF" + fontColor: "#4A4646" + fontSize: 16 + checkedIcon: "../images/checkedVioletIcon.png" + uncheckedIcon: "../images/uncheckedIcon.png" + checked: appWindow.persistentSettings.testnet; + onClicked: { + persistentSettings.testnet = testNet.checked + console.log("testnet set to ", persistentSettings.testnet) } } } } - } |
