diff --git a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml index d38730c307..a1876269b1 100644 --- a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml @@ -106,7 +106,7 @@ Item { } StyledText { - text: qsTrId(profileModel.network) + text: Utils.getNetworkName(profileModel.network) font.pixelSize: 15 anchors.right: caret3.left anchors.rightMargin: Style.current.padding diff --git a/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml b/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml index fd470272a5..3c0d71983c 100644 --- a/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml +++ b/ui/app/AppLayouts/Profile/Sections/NetworkRadioSelector.qml @@ -6,7 +6,7 @@ import "../../../../shared" import "../../../../shared/status" RowLayout { - property string networkName: "" + property string network: "" property string newNetwork: "" ConfirmationDialog { @@ -21,7 +21,7 @@ RowLayout { width: parent.width StyledText { - text: qsTrId(networkName) + text: Utils.getNetworkName(network) font.pixelSize: 15 } StatusRadioButton { @@ -29,10 +29,10 @@ RowLayout { Layout.alignment: Qt.AlignRight ButtonGroup.group: networkSettings rightPadding: 0 - checked: profileModel.network === networkName + checked: profileModel.network === network onClicked: { - if (profileModel.network === networkName) return; - newNetwork = networkName; + if (profileModel.network === network) return; + newNetwork = network; confirmDialog.open(); } } diff --git a/ui/app/AppLayouts/Profile/Sections/NetworksModal.qml b/ui/app/AppLayouts/Profile/Sections/NetworksModal.qml index e80f041242..1ea8b4d367 100644 --- a/ui/app/AppLayouts/Profile/Sections/NetworksModal.qml +++ b/ui/app/AppLayouts/Profile/Sections/NetworksModal.qml @@ -10,7 +10,7 @@ ModalPopup { title: qsTr("Network") property string newNetwork: ""; - + Column { id: column spacing: Style.current.padding @@ -18,35 +18,42 @@ ModalPopup { ButtonGroup { id: networkSettings } - NetworkRadioSelector { - networkName: Constants.networkMainnet + StatusSectionHeadline { + text: qsTr("Main networks") } NetworkRadioSelector { - networkName: Constants.networkPOA + network: Constants.networkMainnet } NetworkRadioSelector { - networkName: Constants.networkXDai + network: Constants.networkPOA } NetworkRadioSelector { - networkName: Constants.networkGoerli + network: Constants.networkXDai + } + + StatusSectionHeadline { + text: qsTr("Test networks") } NetworkRadioSelector { - networkName: Constants.networkRinkeby + network: Constants.networkGoerli } NetworkRadioSelector { - networkName: Constants.networkRopsten + network: Constants.networkRinkeby + } + + NetworkRadioSelector { + network: Constants.networkRopsten } } - StyledText { anchors.top: column.bottom - anchors.topMargin: Style.current.padding * 2 + anchors.topMargin: Style.current.padding //% "Under development\nNOTE: You will be logged out and all installed\nsticker packs will be removed and will\nneed to be reinstalled. Purchased sticker\npacks will not need to be re-purchased." text: qsTrId("under-development-nnote--you-will-be-logged-out-and-all-installed-nsticker-packs-will-be-removed-and-will-nneed-to-be-reinstalled--purchased-sticker-npacks-will-not-need-to-be-re-purchased-") } diff --git a/ui/imports/Utils.qml b/ui/imports/Utils.qml index c6d4ffe9f7..33edd91f70 100644 --- a/ui/imports/Utils.qml +++ b/ui/imports/Utils.qml @@ -181,4 +181,16 @@ QtObject { function uuid() { return Date.now().toString(36) + Math.random().toString(36).substr(2, 5) } + + function getNetworkName(network){ + switch(network){ + case Constants.networkMainnet: return qsTr("Mainnet with upstream RPC") + case Constants.networkPOA: return qsTr("POA Network") + case Constants.networkXDai: return qsTr("xDai Chain") + case Constants.networkGoerli: return qsTr("Goerli with upstream RPC") + case Constants.networkRinkeby: return qsTr("Rinkeby with upstream RPC") + case Constants.networkRopsten: return qsTr("Ropsten with upstream RPC") + default: return network + } + } }