mirror of
https://github.com/monero-project/monero-gui
synced 2024-12-20 04:15:53 +01:00
nettype comparison needs to be loose
This commit is contained in:
parent
3c24044736
commit
0bfff8844e
@ -99,7 +99,6 @@ Rectangle {
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.top: parent.top
|
||||
// @TODO: customDecorations?
|
||||
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
||||
|
||||
RowLayout {
|
||||
@ -121,8 +120,8 @@ Rectangle {
|
||||
|
||||
Text {
|
||||
id: testnetLabel
|
||||
visible: persistentSettings.nettype
|
||||
text: qsTr("Testnet") + translationManager.emptyString
|
||||
visible: persistentSettings.nettype != NetworkType.MAINNET
|
||||
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 8
|
||||
anchors.left: parent.left
|
||||
|
@ -80,7 +80,6 @@ RowLayout {
|
||||
anchors.centerIn: parent
|
||||
source: "../images/whiteDropIndicator.png"
|
||||
rotation: checkBox.checked ? 180 * scaleRatio : 0
|
||||
verticalAlignment: parent.verticalCenter
|
||||
}
|
||||
}
|
||||
|
||||
|
4
main.qml
4
main.qml
@ -73,7 +73,7 @@ ApplicationWindow {
|
||||
property bool remoteNodeConnected: false
|
||||
property bool androidCloseTapped: false;
|
||||
// Default daemon addresses
|
||||
readonly property string localDaemonAddress : persistentSettings.nettype === NetworkType.MAINNET ? "localhost:18081" : persistentSettings.nettype === NetworkType.TESTNET ? "localhost:28081" : "localhost:38081"
|
||||
readonly property string localDaemonAddress : persistentSettings.nettype == NetworkType.MAINNET ? "localhost:18081" : persistentSettings.nettype == NetworkType.TESTNET ? "localhost:28081" : "localhost:38081"
|
||||
property string currentDaemonAddress;
|
||||
property bool startLocalNodeCancelled: false
|
||||
|
||||
@ -232,7 +232,7 @@ ApplicationWindow {
|
||||
if(isIOS)
|
||||
wallet_path = moneroAccountsDir + wallet_path;
|
||||
// console.log("opening wallet at: ", wallet_path, "with password: ", appWindow.walletPassword);
|
||||
console.log("opening wallet at: ", wallet_path, ", network type: ", persistentSettings.nettype === NetworkType.MAINNET ? "mainnet" : persistentSettings.nettype === NetworkType.TESTNET ? "testnet" : "stagenet");
|
||||
console.log("opening wallet at: ", wallet_path, ", network type: ", persistentSettings.nettype == NetworkType.MAINNET ? "mainnet" : persistentSettings.nettype == NetworkType.TESTNET ? "testnet" : "stagenet");
|
||||
walletManager.openWalletAsync(wallet_path, walletPassword,
|
||||
persistentSettings.nettype);
|
||||
}
|
||||
|
@ -250,11 +250,11 @@ ColumnLayout {
|
||||
fontSize: 16 * scaleRatio
|
||||
checkedIcon: "../images/checkedVioletIcon.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
|
||||
checked: appWindow.persistentSettings.nettype == NetworkType.TESTNET;
|
||||
onClicked: {
|
||||
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
||||
stageNet.checked = false;
|
||||
console.log("Network type set to ", persistentSettings.nettype === NetworkType.TESTNET ? "Testnet" : "Mainnet")
|
||||
console.log("Network type set to ", persistentSettings.nettype == NetworkType.TESTNET ? "Testnet" : "Mainnet")
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -269,11 +269,11 @@ ColumnLayout {
|
||||
fontSize: 16 * scaleRatio
|
||||
checkedIcon: "../images/checkedVioletIcon.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
checked: appWindow.persistentSettings.nettype === NetworkType.STAGENET;
|
||||
checked: appWindow.persistentSettings.nettype == NetworkType.STAGENET;
|
||||
onClicked: {
|
||||
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
||||
testNet.checked = false;
|
||||
console.log("Network type set to ", persistentSettings.nettype === NetworkType.STAGENET ? "Stagenet" : "Mainnet")
|
||||
console.log("Network type set to ", persistentSettings.nettype == NetworkType.STAGENET ? "Stagenet" : "Mainnet")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user