Merge pull request #217

3752ec7 send page: check daemon status after every refresh (Jaquee)
01549a3 walletManager: coding conventions (Jaquee)
0ae3d67 daemon console -> log + adjusted height (Jaquee)
0e8cd14 Wallet: add m_initialized (Jaquee)
c7232e1 set wallet connection status before querying sync status (Jaquee)
3f8e05d Wallet: Cache connection status query (Jaquee)
36a6b89 connect onWalletConnectionStatusChanged() (Jaquee)
93a8200 Transfer: new connectionStatus handling + show status msg (Jaquee)
76e6ae8 remove reference to old pw-dialog (Jaquee)
18b7a67 Wallet: add connectionStatusChanged signal (Jaquee)
d9f4ab4 daemonManager: wait for daemon stop on app close (Jaquee)
f62bb68 daemonManagerDialog: use new ConnectionStatus enum (Jaquee)
dd01f59 hide daemon sync progress after disconnecting wallet (Jaquee)
8d19a03 DaemonManager: add stateChanged() (Jaquee)
760e01b daemonManagerDialog: show processdialog when starting (Jaquee)
bb881d9 show processingSplash when starting/stopping daemon (Jaquee)
8361dda resolve rebase conflict (Jaquee)
8dfa79e Shutdown daemon and close wallet properly on app exit (Jaquee)
7876957 DaemonManager::closing() (Jacob Brydolf)
065b060 main: debug messages (Jacob Brydolf)
b4eb489 DaemonManager: forward command line arguments to monerod (Jacob Brydolf)
752ff26 forward command line arguments to DaemonManager (Jaquee)
7840dab DaemonManager: console debug output (Jacob Brydolf)
14a5bd5 settings: added daemon console (Jacob Brydolf)
b53ef00 history tx details: resized popup (Jacob Brydolf)
b4f29b2 StandardDialog: changed default sizes (Jacob Brydolf)
5855700 daemonManagerDialog: added starting signal (Jacob Brydolf)
3a43154 DaemonManager: added console updated signals (Jacob Brydolf)
3df9e44 DaemonManager: windows support (Jacob Brydolf)
5da9f8f standardDialog: close window before continue (Jacob Brydolf)
5a110f4 replace message dialog with custom dialog (Jacob Brydolf)
d465780 resized standard dialog (Jacob Brydolf)
482bd30 settings: enable/disable daemon start/stop buttons (Jacob Brydolf)
4e7de8c proper daemon shutdown on app exit (Jaquee)
48471f3 onDaemonStarted/stopped signals/slots (Jaquee)
de635cb pw dialog: close popup before continue (Jacob Brydolf)
86772be added standardDialog component (Jacob Brydolf)
ae977af settings: add daemon manager (Jacob Brydolf)
2775124 small error in daemon manager dialog (Jacob Brydolf)
82c39e0 WalletManager: include dependencies (Jaquee)
1c6884e Show daemon manager dialog if daemon isnt started (Jacob Brydolf)
9fbfbc4 daemonManager: embed as context property (Jaquee)
4cdc258 WalletManager: basic functionality (Jacob Brydolf)
This commit is contained in:
Riccardo Spagni
2016-12-08 23:54:50 +02:00
16 changed files with 567 additions and 38 deletions

View File

@@ -37,7 +37,6 @@ import "../components"
import moneroComponents.Clipboard 1.0
Rectangle {
property var daemonAddress
color: "#F0EEEE"
@@ -272,15 +271,94 @@ Rectangle {
}
}
RowLayout {
Label {
id: manageDaemonLabel
color: "#4A4949"
text: qsTr("Manage daemon") + translationManager.emptyString
fontSize: 16
}
StandardButton {
visible: true
enabled: !appWindow.daemonRunning
id: startDaemonButton
width: 110
text: qsTr("Start daemon") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
onClicked: {
appWindow.startDaemon()
}
}
StandardButton {
visible: true
enabled: appWindow.daemonRunning
id: stopDaemonButton
width: 110
text: qsTr("Stop daemon") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
onClicked: {
appWindow.stopDaemon()
}
}
StandardButton {
visible: true
// enabled: appWindow.daemonRunning
id: daemonConsolePopupButton
width: 110
text: qsTr("Show log") + translationManager.emptyString
shadowReleasedColor: "#FF4304"
shadowPressedColor: "#B32D00"
releasedColor: "#FF6C3C"
pressedColor: "#FF4304"
onClicked: {
daemonConsolePopup.open();
}
}
}
}
// Daemon console
StandardDialog {
id: daemonConsolePopup
height:500
width:800
cancelVisible: false
title: qsTr("Daemon log")
onAccepted: {
close();
}
}
// fires on every page load
function onPageCompleted() {
console.log("Settings page loaded");
initSettings();
}
// fires only once
Component.onCompleted: {
daemonManager.daemonConsoleUpdated.connect(onDaemonConsoleUpdated)
}
function onDaemonConsoleUpdated(message){
// Update daemon console
daemonConsolePopup.textArea.append(message)
}
}

View File

@@ -29,6 +29,7 @@
import QtQuick 2.0
import moneroComponents.PendingTransaction 1.0
import "../components"
import moneroComponents.Wallet 1.0
Rectangle {
@@ -331,4 +332,69 @@ Rectangle {
}
}
Rectangle {
id:desaturate
color:"black"
anchors.fill: parent
opacity: 0.1
visible: (root.enabled)? 0 : 1;
}
Rectangle {
x: root.width/2 - width/2
y: root.height/2 - height/2
height:statusText.paintedHeight + 50
width:statusText.paintedWidth + 40
visible: statusText.text != ""
opacity: 0.9
Text {
id: statusText
anchors.fill:parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
Component.onCompleted: {
//Disable password page until enabled by updateStatus
root.enabled = false
}
// fires on every page load
function onPageCompleted() {
console.log("transfer page loaded")
updateStatus();
}
//TODO: Add daemon sync status
//TODO: enable send page when we're connected and daemon is synced
function updateStatus() {
console.log("updated transfer page status")
if(typeof currentWallet === "undefined") {
statusText.text = qsTr("Wallet is not connected to daemon.")
return;
}
switch (currentWallet.connected) {
case Wallet.ConnectionStatus_Disconnected:
statusText.text = qsTr("Wallet is not connected to daemon.")
break
case Wallet.ConnectionStatus_WrongVersion:
statusText.text = qsTr("Connected daemon is not compatible with GUI. \n" +
"Please upgrade or connect to another daemon")
break
default:
if(!appWindow.daemonSynced){
statusText.text = qsTr("Waiting on daemon synchronization to finish")
} else {
// everything OK, enable transfer page
root.enabled = true;
statusText.text = "";
}
}
}
}