Improved blockchain sync status ui

This commit is contained in:
Jaquee
2017-02-24 18:07:46 +01:00
parent 465f6bfe27
commit 2d6ddf043e
4 changed files with 15 additions and 5 deletions

View File

@@ -48,8 +48,11 @@ Row {
}
function getConnectionStatusString(status) {
if (status == Wallet.ConnectionStatus_Connected)
if (status == Wallet.ConnectionStatus_Connected) {
if(!appWindow.daemonSynced)
return qsTr("Synchronizing")
return qsTr("Connected")
}
if (status == Wallet.ConnectionStatus_WrongVersion)
return qsTr("Wrong version")
if (status == Wallet.ConnectionStatus_Disconnected)

View File

@@ -38,6 +38,13 @@ Item {
//clip: true
function updateProgress(currentBlock,targetBlock){
if(targetBlock == 1) {
fillLevel = 0
progressText.text = qsTr("Establishing connection...");
progressBar.visible = true
return
}
if(targetBlock > 0) {
var progressLevel = ((currentBlock/targetBlock) * 100).toFixed(0);
fillLevel = progressLevel