diff --git a/LeftPanel.qml b/LeftPanel.qml index 53da5f22..e05e62ac 100644 --- a/LeftPanel.qml +++ b/LeftPanel.qml @@ -650,7 +650,7 @@ Rectangle { id: networkStatus anchors.left: parent.left anchors.right: parent.right - anchors.leftMargin: 0 + anchors.leftMargin: 5 * scaleRatio anchors.rightMargin: 0 anchors.bottom: (progressBar.visible)? progressBar.top : parent.bottom; connected: Wallet.ConnectionStatus_Disconnected 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") + } + } + } } } } - - } diff --git a/images/miningxmr.png b/images/miningxmr.png new file mode 100644 index 00000000..81fb7689 Binary files /dev/null and b/images/miningxmr.png differ diff --git a/images/miningxmr@2x.png b/images/miningxmr@2x.png new file mode 100644 index 00000000..aff06b4d Binary files /dev/null and b/images/miningxmr@2x.png differ diff --git a/main.qml b/main.qml index 84f7d38d..e258293a 100644 --- a/main.qml +++ b/main.qml @@ -72,6 +72,7 @@ ApplicationWindow { property bool qrScannerEnabled: (typeof builtWithScanner != "undefined") && builtWithScanner property int blocksToSync: 1 property var isMobile: (appWindow.width > 700 && !isAndroid) ? false : true + property bool isMining: false property var cameraUi property bool remoteNodeConnected: false property bool androidCloseTapped: false; diff --git a/pages/Mining.qml b/pages/Mining.qml index d6ce5e61..7d9896fb 100644 --- a/pages/Mining.qml +++ b/pages/Mining.qml @@ -241,6 +241,7 @@ Rectangle { updateStatusText() startSoloMinerButton.enabled = !walletManager.isMining() stopSoloMinerButton.enabled = !startSoloMinerButton.enabled + appWindow.isMining = walletManager.isMining() } MoneroComponents.StandardDialog { diff --git a/pages/Transfer.qml b/pages/Transfer.qml index bcb23d07..1dfbfcfd 100644 --- a/pages/Transfer.qml +++ b/pages/Transfer.qml @@ -660,6 +660,8 @@ Rectangle { // Light wallet is always ready pageRoot.enabled = true; root.warningContent = ""; + // check if daemon was already mining and add mining logo if true + middlePanel.miningView.update(); } } } diff --git a/pages/settings/Settings.qml b/pages/settings/Settings.qml index 5aabcccd..9c96c7de 100644 --- a/pages/settings/Settings.qml +++ b/pages/settings/Settings.qml @@ -46,6 +46,7 @@ ColumnLayout { Clipboard { id: clipboard } property bool viewOnly: false property int settingsHeight: 900 + property alias settingsStateViewState: settingsStateView.state Navbar{} diff --git a/qml.qrc b/qml.qrc index 74f100ca..167070dd 100644 --- a/qml.qrc +++ b/qml.qrc @@ -226,6 +226,8 @@ images/settings_navbar_side_active.png images/settings_local.png components/WarningBox.qml + images/miningxmr.png + images/miningxmr@2x.png images/eyeHide.png images/eyeShow.png