mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
Merge pull request #99
fa1e92c
Disable transfer page if daemon isn't connected or fully synced (Jacob Brydolf)
This commit is contained in:
commit
04325f4cd8
2 changed files with 22 additions and 9 deletions
|
@ -52,6 +52,9 @@ Rectangle {
|
||||||
signal paymentClicked(string address, string paymentId, double amount, int mixinCount, int priority)
|
signal paymentClicked(string address, string paymentId, double amount, int mixinCount, int priority)
|
||||||
signal generatePaymentIdInvoked()
|
signal generatePaymentIdInvoked()
|
||||||
|
|
||||||
|
// Disable transfer page if daemon isnt fully synced
|
||||||
|
enabled: (currentView !== transferView || appWindow.daemonSynced)
|
||||||
|
|
||||||
color: "#F0EEEE"
|
color: "#F0EEEE"
|
||||||
|
|
||||||
onCurrentViewChanged: {
|
onCurrentViewChanged: {
|
||||||
|
@ -279,14 +282,13 @@ Rectangle {
|
||||||
color: "#DBDBDB"
|
color: "#DBDBDB"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Rectangle {
|
||||||
|
id:desaturate
|
||||||
// indicates disabled state
|
color:"black"
|
||||||
// Desaturate {
|
anchors.fill: parent
|
||||||
// anchors.fill: parent
|
opacity: 0.1
|
||||||
// source: parent
|
visible: (root.enabled)? 0 : 1;
|
||||||
// desaturation: root.enabled ? 0.0 : 1.0
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
/* connect "payment" click */
|
/* connect "payment" click */
|
||||||
|
|
13
main.qml
13
main.qml
|
@ -56,6 +56,7 @@ ApplicationWindow {
|
||||||
property int splashCounter: 0
|
property int splashCounter: 0
|
||||||
property bool isNewWallet: false
|
property bool isNewWallet: false
|
||||||
property int restoreHeight:0
|
property int restoreHeight:0
|
||||||
|
property bool daemonSynced: false
|
||||||
|
|
||||||
// true if wallet ever synchronized
|
// true if wallet ever synchronized
|
||||||
property bool walletInitialized : false
|
property bool walletInitialized : false
|
||||||
|
@ -252,10 +253,21 @@ ApplicationWindow {
|
||||||
if (splash.visible) {
|
if (splash.visible) {
|
||||||
hideProcessingSplash()
|
hideProcessingSplash()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check daemon status
|
||||||
var dCurrentBlock = currentWallet.daemonBlockChainHeight();
|
var dCurrentBlock = currentWallet.daemonBlockChainHeight();
|
||||||
var dTargetBlock = currentWallet.daemonBlockChainTargetHeight();
|
var dTargetBlock = currentWallet.daemonBlockChainTargetHeight();
|
||||||
leftPanel.daemonProgress.updateProgress(dCurrentBlock,dTargetBlock);
|
leftPanel.daemonProgress.updateProgress(dCurrentBlock,dTargetBlock);
|
||||||
|
|
||||||
|
// Daemon connected
|
||||||
|
leftPanel.networkStatus.connected = currentWallet.connected
|
||||||
|
|
||||||
|
// Daemon fully synced
|
||||||
|
// TODO: implement onDaemonSynced or similar in wallet API and don't start refresh thread before daemon is synced
|
||||||
|
daemonSynced = (currentWallet.connected && dCurrentBlock >= dTargetBlock)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Store wallet after every refresh.
|
// Store wallet after every refresh.
|
||||||
if (currentWallet.blockChainHeight() > 1){
|
if (currentWallet.blockChainHeight() > 1){
|
||||||
|
|
||||||
|
@ -277,7 +289,6 @@ ApplicationWindow {
|
||||||
walletInitialized = true
|
walletInitialized = true
|
||||||
}
|
}
|
||||||
|
|
||||||
leftPanel.networkStatus.connected = currentWallet.connected
|
|
||||||
|
|
||||||
onWalletUpdate();
|
onWalletUpdate();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue