Merge pull request #1939

bd42200 settingsnode: enable trusted daemon option (mmbyday)
This commit is contained in:
luigi1111 2019-02-21 14:13:38 -06:00
commit 7a5456e3e4
No known key found for this signature in database
GPG key ID: F4ACA0183641E010
2 changed files with 17 additions and 1 deletions

View file

@ -1033,6 +1033,7 @@ ApplicationWindow {
property string daemon_address: nettype == NetworkType.TESTNET ? "localhost:28081" : nettype == NetworkType.STAGENET ? "localhost:38081" : "localhost:18081" property string daemon_address: nettype == NetworkType.TESTNET ? "localhost:28081" : nettype == NetworkType.STAGENET ? "localhost:38081" : "localhost:18081"
property string payment_id property string payment_id
property int restore_height : 0 property int restore_height : 0
property bool is_trusted_daemon : false
property bool is_recovering : false property bool is_recovering : false
property bool is_recovering_from_device : false property bool is_recovering_from_device : false
property bool customDecorations : true property bool customDecorations : true

View file

@ -298,7 +298,12 @@ Rectangle{
daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : "" daemonPortText: rna.search(":") != -1 ? (rna.split(":")[1].trim() == "") ? "18081" : rna.split(":")[1] : ""
onEditingFinished: { onEditingFinished: {
persistentSettings.remoteNodeAddress = remoteNodeEdit.getAddress(); 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 { MoneroComponents.StandardButton {
id: btnConnectRemote id: btnConnectRemote
enabled: remoteNodeEdit.isValid() enabled: remoteNodeEdit.isValid()