diff --git a/ui/app/AppLayouts/Browser/BrowserWalletMenu.qml b/ui/app/AppLayouts/Browser/BrowserWalletMenu.qml index 265425ef16..e64f3e3910 100644 --- a/ui/app/AppLayouts/Browser/BrowserWalletMenu.qml +++ b/ui/app/AppLayouts/Browser/BrowserWalletMenu.qml @@ -46,13 +46,25 @@ Popup { width: 8 height: 8 radius: width / 2 - color: Style.current.green + color: { + switch (profileModel.network) { + case Constants.networkMainnet: return Style.current.green; + case Constants.networkRopsten: return Style.current.turquoise; + default: return Style.current.red + } + } anchors.verticalCenter: parent.verticalCenter } StyledText { id: networkText - text: "Mainnet" + text: { + switch (profileModel.network) { + case Constants.networkMainnet: return qsTr("Mainnet"); + case Constants.networkRopsten: return qsTr("Ropsten"); + default: return qsTr("Unknown") + } + } font.pixelSize: 15 anchors.verticalCenter: parent.verticalCenter anchors.left: networkColorCircle.right @@ -61,7 +73,7 @@ Popup { StyledText { id: disconectBtn - text: "Disconnect" + text: qsTr("Disconnect") font.pixelSize: 15 anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right @@ -70,7 +82,7 @@ Popup { MouseArea { cursorShape: Qt.PointingHandCursor anchors.fill: parent - onClicked: console.log('Disconnect') + onClicked: console.log('TODO Disconnect') } } @@ -122,7 +134,8 @@ Popup { height: 20 anchors.right: sendBtn.left anchors.rightMargin: Style.current.padding - anchors.verticalCenter: parent.verticalCenter + anchors.top: parent.top + anchors.topMargin: Style.current.padding textToCopy: accountSelector.selectedAccount.address } @@ -132,7 +145,8 @@ Popup { width: 20 height: 20 anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter + anchors.top: parent.top + anchors.topMargin: Style.current.padding iconColor: Style.current.primary onClicked: { sendModal.selectFromAccount.selectedAccount = accountSelector.selectedAccount diff --git a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml index 798c6e52f3..b8d7ca474e 100644 --- a/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml +++ b/ui/app/AppLayouts/Profile/Sections/AdvancedContainer.qml @@ -102,12 +102,12 @@ Item { text: qsTrId("enable-testnet--ropsten--ncurrent-network---1").arg(profileModel.network) } StatusSwitch { - checked: profileModel.network === "testnet_rpc" + checked: profileModel.network === Constants.networkRopsten onCheckedChanged: { - if (checked && profileModel.network === "testnet_rpc" || !checked && profileModel.network === "mainnet_rpc"){ + if (checked && profileModel.network === Constants.networkRopsten || !checked && profileModel.network === Constants.networkMainnet){ return; } - profileModel.network = checked ? "testnet_rpc" : "mainnet_rpc"; + profileModel.network = checked ? Constants.networkRopsten : Constants.networkMainnet; } } StyledText { diff --git a/ui/imports/Constants.qml b/ui/imports/Constants.qml index 4f630f54c8..d32c3c1e4b 100644 --- a/ui/imports/Constants.qml +++ b/ui/imports/Constants.qml @@ -58,6 +58,8 @@ QtObject { "#8B3131" ] + readonly property string networkRopsten: "testnet_rpc" + readonly property string networkMainnet: "mainnet_rpc" readonly property string api_request: "api-request" readonly property string web3SendAsyncReadOnly: "web3-send-async-read-only"