forked from Public/monero-gui
Stagenet
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
import QtQuick 2.2
|
||||
import QtQml 2.2
|
||||
import QtQuick.Layouts 1.1
|
||||
import moneroComponents.NetworkType 1.0
|
||||
import "../components"
|
||||
|
||||
ColumnLayout {
|
||||
@@ -231,12 +232,13 @@ ColumnLayout {
|
||||
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
ColumnLayout {
|
||||
Layout.leftMargin: wizardLeftMargin
|
||||
Layout.rightMargin: wizardRightMargin
|
||||
Layout.topMargin: 30 * scaleRatio
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
Layout.fillWidth: true
|
||||
spacing: 50 * scaleRatio
|
||||
|
||||
Rectangle {
|
||||
width: 100 * scaleRatio
|
||||
@@ -248,10 +250,30 @@ ColumnLayout {
|
||||
fontSize: 16 * scaleRatio
|
||||
checkedIcon: "../images/checkedVioletIcon.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
checked: appWindow.persistentSettings.testnet;
|
||||
checked: appWindow.persistentSettings.nettype === NetworkType.TESTNET;
|
||||
onClicked: {
|
||||
persistentSettings.testnet = testNet.checked
|
||||
console.log("testnet set to ", persistentSettings.testnet)
|
||||
persistentSettings.nettype = testNet.checked ? NetworkType.TESTNET : NetworkType.MAINNET
|
||||
stageNet.checked = false;
|
||||
console.log("Network type set to ", persistentSettings.nettype === NetworkType.TESTNET ? "Testnet" : "Mainnet")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
width: 100 * scaleRatio
|
||||
CheckBox {
|
||||
id: stageNet
|
||||
text: qsTr("Stagenet") + translationManager.emptyString
|
||||
background: "#FFFFFF"
|
||||
fontColor: "#4A4646"
|
||||
fontSize: 16 * scaleRatio
|
||||
checkedIcon: "../images/checkedVioletIcon.png"
|
||||
uncheckedIcon: "../images/uncheckedIcon.png"
|
||||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user