From bd42200a299b72c38a2a123ff72a0f95551570d6 Mon Sep 17 00:00:00 2001 From: mmbyday Date: Fri, 15 Feb 2019 13:46:16 -0800 Subject: [PATCH] settingsnode: enable trusted daemon option --- main.qml | 1 + pages/settings/SettingsNode.qml | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/main.qml b/main.qml index 7de16518..d93fa9df 100644 --- a/main.qml +++ b/main.qml @@ -1033,6 +1033,7 @@ ApplicationWindow { property string daemon_address: nettype == NetworkType.TESTNET ? "localhost:28081" : nettype == NetworkType.STAGENET ? "localhost:38081" : "localhost:18081" property string payment_id property int restore_height : 0 + property bool is_trusted_daemon : false property bool is_recovering : false property bool is_recovering_from_device : false property bool customDecorations : true diff --git a/pages/settings/SettingsNode.qml b/pages/settings/SettingsNode.qml index dbbe6024..c350f896 100644 --- a/pages/settings/SettingsNode.qml +++ b/pages/settings/SettingsNode.qml @@ -298,7 +298,12 @@ Rectangle{ daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : "" onEditingFinished: { persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress(); - console.log("setting remote node to " + persistentSettings.remoteNodeAddress) + console.log("setting remote node to " + persistentSettings.remoteNodeAddress); + if (persistentSettings.is_trusted_daemon) { + persistentSettings.is_trusted_daemon = !persistentSettings.is_trusted_daemon + setTrustedDaemonCheckBox.checked = !setTrustedDaemonCheckBox.checked + appWindow.showStatusMessage(qsTr("Remote node updated. Trusted daemon has been reset. Mark again, if desired."), 8); + } } } @@ -330,6 +335,16 @@ Rectangle{ } } + MoneroComponents.CheckBox { + id: setTrustedDaemonCheckBox + checked: persistentSettings.is_trusted_daemon + onClicked: { + persistentSettings.is_trusted_daemon = !persistentSettings.is_trusted_daemon + currentWallet.setTrustedDaemon(persistentSettings.is_trusted_daemon) + } + text: qsTr("Mark as Trusted Daemon") + translationManager.emptyString + } + MoneroComponents.StandardButton { id: btnConnectRemote enabled: remoteNodeEdit.isValid()