aboutsummaryrefslogtreecommitdiff
path: root/components/NetworkStatusItem.qml
diff options
context:
space:
mode:
authormmbyday <mmbyday@protonmail.com>2018-12-15 20:10:12 -0800
committermmbyday <mmbyday@protonmail.com>2018-12-18 19:07:26 -0800
commit84a60424efb90c680137294cb7338f41f8c9fe9d (patch)
tree171d79de94f31620402e69038de9294d09481061 /components/NetworkStatusItem.qml
parent7c0a557e627c1c6dee0564d1301034498172885d (diff)
downloadmonzero-gui-84a60424efb90c680137294cb7338f41f8c9fe9d.tar.gz
monzero-gui-84a60424efb90c680137294cb7338f41f8c9fe9d.tar.xz
monzero-gui-84a60424efb90c680137294cb7338f41f8c9fe9d.zip
mining: add visual icon/indicator that mining is enabled, visible on all the screens
Diffstat (limited to 'components/NetworkStatusItem.qml')
-rw-r--r--components/NetworkStatusItem.qml36
1 files changed, 30 insertions, 6 deletions
diff --git a/components/NetworkStatusItem.qml b/components/NetworkStatusItem.qml
index edc22595..965948bd 100644
--- a/components/NetworkStatusItem.qml
+++ b/components/NetworkStatusItem.qml
@@ -43,7 +43,7 @@ Rectangle {
return qsTr("Synchronizing")
if(appWindow.remoteNodeConnected)
return qsTr("Remote node")
- return qsTr("Connected")
+ return appWindow.isMining ? qsTr("Connected") + " + " + qsTr("Mining"): qsTr("Connected")
}
if (status == Wallet.ConnectionStatus_WrongVersion)
return qsTr("Wrong version")
@@ -69,16 +69,30 @@ Rectangle {
Image {
anchors.top: parent.top
- anchors.topMargin: 6
+ anchors.topMargin: !appWindow.isMining ? 6 * scaleRatio : 4 * scaleRatio
anchors.right: parent.right
- anchors.rightMargin: 11
+ anchors.rightMargin: !appWindow.isMining ? 11 * scaleRatio : 0
source: {
- if(item.connected == Wallet.ConnectionStatus_Connected){
+ if(appWindow.isMining) {
+ return "../images/miningxmr.png"
+ } else if(item.connected == Wallet.ConnectionStatus_Connected) {
return "../images/lightning.png"
} else {
return "../images/lightning-white.png"
}
}
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ if(!appWindow.isMining) {
+ middlePanel.settingsView.settingsStateViewState = "Node";
+ appWindow.showPageRequest("Settings");
+ } else {
+ appWindow.showPageRequest("Mining")
+ }
+ }
+ }
}
}
@@ -108,9 +122,19 @@ Rectangle {
font.pixelSize: 20 * scaleRatio
color: "white"
text: getConnectionStatusString(item.connected) + translationManager.emptyString
+ MouseArea {
+ anchors.fill: parent
+ cursorShape: Qt.PointingHandCursor
+ onClicked: {
+ if(!appWindow.isMining) {
+ middlePanel.settingsView.settingsStateViewState = "Node";
+ appWindow.showPageRequest("Settings");
+ } else {
+ appWindow.showPageRequest("Mining")
+ }
+ }
+ }
}
}
}
-
-
}