diff options
| author | xiphon <xiphon@protonmail.com> | 2021-04-03 10:45:02 +0000 |
|---|---|---|
| committer | xiphon <xiphon@protonmail.com> | 2021-04-06 11:58:36 +0000 |
| commit | 6bc96270469294d6ddfedf16ff166c49079491be (patch) | |
| tree | 3cf15acb631c4bc940b58f8b612420f78b35c050 /wizard | |
| parent | 34df4e74d4c75f53d0a05ad9e75cf494e9f7134a (diff) | |
| download | monzero-gui-6bc96270469294d6ddfedf16ff166c49079491be.tar.gz monzero-gui-6bc96270469294d6ddfedf16ff166c49079491be.tar.xz monzero-gui-6bc96270469294d6ddfedf16ff166c49079491be.zip | |
SettingsNode: implement multiple remote nodes support
Diffstat (limited to 'wizard')
| -rw-r--r-- | wizard/WizardDaemonSettings.qml | 10 | ||||
| -rw-r--r-- | wizard/WizardSummary.qml | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/wizard/WizardDaemonSettings.qml b/wizard/WizardDaemonSettings.qml index 3f1f2204..bd54f7e1 100644 --- a/wizard/WizardDaemonSettings.qml +++ b/wizard/WizardDaemonSettings.qml @@ -42,7 +42,13 @@ ColumnLayout { function save(){ persistentSettings.useRemoteNode = remoteNode.checked - persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress(); + const index = remoteNodesModel.appendIfNotExists({ + address: remoteNodeEdit.getAddress(), + username: "", + password: "", + trusted: false, + }); + remoteNodesModel.applyRemoteNode(index); if (bootstrapNodeEdit.daemonAddrText == "auto") { persistentSettings.bootstrapNodeAddress = "auto"; } else { @@ -179,7 +185,7 @@ ColumnLayout { id: remoteNodeEdit Layout.fillWidth: true - initialAddress: persistentSettings.remoteNodeAddress + initialAddress: remoteNodesModel.currentRemoteNode().address } } } diff --git a/wizard/WizardSummary.qml b/wizard/WizardSummary.qml index 840ee971..de3c60ec 100644 --- a/wizard/WizardSummary.qml +++ b/wizard/WizardSummary.qml @@ -65,10 +65,10 @@ ColumnLayout { } WizardSummaryItem { - visible: persistentSettings.remoteNodeAddress !== "" && appWindow.walletMode == 0 + visible: remoteNodesModel.currentRemoteNode().address !== "" && appWindow.walletMode == 0 Layout.fillWidth: true header: qsTr("Daemon address") + translationManager.emptyString - value: persistentSettings.remoteNodeAddress + value: remoteNodesModel.currentRemoteNode().address } WizardSummaryItem { |
