mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-12-13 11:56:32 +02:00
Merge pull request #375
192bfc7
Add "(syncing)" after balance when syncing (moneromooo.monero)
This commit is contained in:
commit
24170f00cc
@ -35,6 +35,7 @@ Rectangle {
|
|||||||
id: panel
|
id: panel
|
||||||
|
|
||||||
property alias unlockedBalanceText: unlockedBalanceText.text
|
property alias unlockedBalanceText: unlockedBalanceText.text
|
||||||
|
property alias balanceLabelText: balanceLabel.text
|
||||||
property alias balanceText: balanceText.text
|
property alias balanceText: balanceText.text
|
||||||
property alias networkStatus : networkStatus
|
property alias networkStatus : networkStatus
|
||||||
property alias progressBar : progressBar
|
property alias progressBar : progressBar
|
||||||
@ -109,6 +110,7 @@ Rectangle {
|
|||||||
spacing: 5
|
spacing: 5
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
|
id: balanceLabel
|
||||||
text: qsTr("Balance") + translationManager.emptyString
|
text: qsTr("Balance") + translationManager.emptyString
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 50
|
anchors.leftMargin: 50
|
||||||
|
@ -42,6 +42,7 @@ Rectangle {
|
|||||||
property Item currentView
|
property Item currentView
|
||||||
property Item previousView
|
property Item previousView
|
||||||
property bool basicMode : false
|
property bool basicMode : false
|
||||||
|
property string balanceLabelText: qsTr("Balance")
|
||||||
property string balanceText
|
property string balanceText
|
||||||
property string unlockedBalanceText
|
property string unlockedBalanceText
|
||||||
|
|
||||||
@ -198,7 +199,7 @@ Rectangle {
|
|||||||
columns: 3
|
columns: 3
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
id: balanceLabel
|
||||||
width: 116
|
width: 116
|
||||||
height: 20
|
height: 20
|
||||||
font.family: "Arial"
|
font.family: "Arial"
|
||||||
@ -208,7 +209,7 @@ Rectangle {
|
|||||||
horizontalAlignment: Text.AlignLeft
|
horizontalAlignment: Text.AlignLeft
|
||||||
verticalAlignment: Text.AlignBottom
|
verticalAlignment: Text.AlignBottom
|
||||||
color: "#535353"
|
color: "#535353"
|
||||||
text: qsTr("Balance:")
|
text: root.balanceLabelText + ":"
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
7
main.qml
7
main.qml
@ -221,6 +221,7 @@ ApplicationWindow {
|
|||||||
function connectWallet(wallet) {
|
function connectWallet(wallet) {
|
||||||
showProcessingSplash("Please wait...")
|
showProcessingSplash("Please wait...")
|
||||||
currentWallet = wallet
|
currentWallet = wallet
|
||||||
|
updateSyncing(false)
|
||||||
|
|
||||||
// connect handlers
|
// connect handlers
|
||||||
currentWallet.refreshed.connect(onWalletRefresh)
|
currentWallet.refreshed.connect(onWalletRefresh)
|
||||||
@ -309,6 +310,7 @@ ApplicationWindow {
|
|||||||
// TODO: implement onDaemonSynced or similar in wallet API and don't start refresh thread before daemon is synced
|
// TODO: implement onDaemonSynced or similar in wallet API and don't start refresh thread before daemon is synced
|
||||||
daemonSynced = (currentWallet.connected != Wallet.ConnectionStatus_Disconnected && dCurrentBlock >= dTargetBlock)
|
daemonSynced = (currentWallet.connected != Wallet.ConnectionStatus_Disconnected && dCurrentBlock >= dTargetBlock)
|
||||||
leftPanel.progressBar.updateProgress(dCurrentBlock,dTargetBlock);
|
leftPanel.progressBar.updateProgress(dCurrentBlock,dTargetBlock);
|
||||||
|
updateSyncing((currentWallet.connected !== Wallet.ConnectionStatus_Disconnected) && (dCurrentBlock < dTargetBlock))
|
||||||
middlePanel.updateStatus();
|
middlePanel.updateStatus();
|
||||||
|
|
||||||
// If wallet isnt connected and no daemon is running - Ask
|
// If wallet isnt connected and no daemon is running - Ask
|
||||||
@ -617,6 +619,11 @@ ApplicationWindow {
|
|||||||
informationPopup.open()
|
informationPopup.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateSyncing(syncing) {
|
||||||
|
var text = (syncing ? qsTr("Balance (syncing)") : qsTr("Balance")) + translationManager.emptyString
|
||||||
|
leftPanel.balanceLabelText = text
|
||||||
|
middlePanel.balanceLabelText = text
|
||||||
|
}
|
||||||
|
|
||||||
// blocks UI if wallet can't be opened or no connection to the daemon
|
// blocks UI if wallet can't be opened or no connection to the daemon
|
||||||
function enableUI(enable) {
|
function enableUI(enable) {
|
||||||
|
Loading…
Reference in New Issue
Block a user