mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-02-21 17:20:37 +02: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.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
// @TODO: customDecorations?
|
|
||||||
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
anchors.topMargin: (persistentSettings.customDecorations)? 50 : 0
|
||||||
|
|
||||||
RowLayout {
|
RowLayout {
|
||||||
@ -121,8 +120,8 @@ Rectangle {
|
|||||||
|
|
||||||
Text {
|
Text {
|
||||||
id: testnetLabel
|
id: testnetLabel
|
||||||
visible: persistentSettings.nettype
|
visible: persistentSettings.nettype != NetworkType.MAINNET
|
||||||
text: qsTr("Testnet") + translationManager.emptyString
|
text: (persistentSettings.nettype == NetworkType.TESTNET ? qsTr("Testnet") : qsTr("Stagenet")) + translationManager.emptyString
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.topMargin: 8
|
anchors.topMargin: 8
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
|
@ -80,7 +80,6 @@ RowLayout {
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
source: "../images/whiteDropIndicator.png"
|
source: "../images/whiteDropIndicator.png"
|
||||||
rotation: checkBox.checked ? 180 * scaleRatio : 0
|
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 remoteNodeConnected: false
|
||||||
property bool androidCloseTapped: false;
|
property bool androidCloseTapped: false;
|
||||||
// Default daemon addresses
|
// 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 string currentDaemonAddress;
|
||||||
property bool startLocalNodeCancelled: false
|
property bool startLocalNodeCancelled: false
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ ApplicationWindow {
|
|||||||
if(isIOS)
|
if(isIOS)
|
||||||
wallet_path = moneroAccountsDir + wallet_path;
|
wallet_path = moneroAccountsDir + wallet_path;
|
||||||
// console.log("opening wallet at: ", wallet_path, "with password: ", appWindow.walletPassword);
|
// 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,
|
walletManager.openWalletAsync(wallet_path, walletPassword,
|
||||||
persistentSettings.nettype);
|
persistentSettings.nettype);
|
||||||
}
|
}
|
||||||
|
@ -250,11 +250,11 @@ ColumnLayout {
|
|||||||
fontSize: 16 * scaleRatio
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedVioletIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.TESTNET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
||||||
stageNet.checked = false;
|
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
|
fontSize: 16 * scaleRatio
|
||||||
checkedIcon: "../images/checkedVioletIcon.png"
|
checkedIcon: "../images/checkedVioletIcon.png"
|
||||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||||
checked: appWindow.persistentSettings.nettype === NetworkType.STAGENET;
|
checked: appWindow.persistentSettings.nettype == NetworkType.STAGENET;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
persistentSettings.nettype = stageNet.checked ? NetworkType.STAGENET : NetworkType.MAINNET
|
||||||
testNet.checked = false;
|
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