summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/gui.qrc1
-rw-r--r--gui/qml/LoginConfirmation.qml11
-rw-r--r--gui/qml/LoginOKDialog.qml23
-rw-r--r--gui/qml/main.qml11
4 files changed, 35 insertions, 11 deletions
diff --git a/gui/gui.qrc b/gui/gui.qrc
index 28fcf7f..6bc3d8d 100644
--- a/gui/gui.qrc
+++ b/gui/gui.qrc
@@ -4,6 +4,7 @@
<file>qml/AboutDialog.qml</file>
<file>qml/DonateDialog.qml</file>
<file>qml/LoginDialog.qml</file>
+ <file>qml/LoginOKDialog.qml</file>
<file>assets/icon/png/black/vpn_off.png</file>
<file>assets/icon/png/black/vpn_on.png</file>
diff --git a/gui/qml/LoginConfirmation.qml b/gui/qml/LoginConfirmation.qml
deleted file mode 100644
index 618b870..0000000
--- a/gui/qml/LoginConfirmation.qml
+++ /dev/null
@@ -1,11 +0,0 @@
-import QtQuick 2.0
-import QtQuick.Dialogs 1.2
-import QtQuick.Controls 1.4
-
-Dialog {
- standardButtons: StandardButton.Ok
- title: qsTr("Login Success")
- text: qsTr("You are now logged in, connecting now")
-
- visible: ctxSystray.loginConfirmationDialog == true
-}
diff --git a/gui/qml/LoginOKDialog.qml b/gui/qml/LoginOKDialog.qml
new file mode 100644
index 0000000..52b3770
--- /dev/null
+++ b/gui/qml/LoginOKDialog.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+import QtQuick.Dialogs 1.2
+import QtQuick.Controls 1.4
+
+Dialog {
+ standardButtons: StandardButton.Ok
+ title: qsTr("Login Successful")
+ Column {
+ anchors.fill: parent
+ Text {
+ text: qsTr("Login successful. You can now start the VPN.")
+ }
+ }
+
+ // TODO implement cleanNotifications on backend
+ function _loginOk() {
+ loginDone = true;
+ }
+
+ visible: false
+ onAccepted: _loginOk()
+ onRejected: _loginOk()
+}
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index 0242493..f22bdf3 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -10,6 +10,7 @@ ApplicationWindow {
visible: false
property var ctx
+ property var loginDone
Connections {
target: jsonModel
@@ -23,6 +24,9 @@ ApplicationWindow {
console.debug(jsonModel.getJson())
login.visible = true
}
+ if (ctx.loginOk == 'true' && loginDone == false) {
+ loginOk.visible = true
+ }
if (ctx.errors ) {
if ( ctx.errors == "nohelpers" ) {
showInitFailure(qsTr("Could not find helpers. Check your installation"))
@@ -44,6 +48,8 @@ ApplicationWindow {
}
Component.onCompleted: {
+ loginDone = false;
+
/* stupid as it sounds, windows doesn't like to have the systray icon
not being attached to an actual application window.
We can still use this quirk, and can use the AppWindow with deferred
@@ -228,6 +234,11 @@ ApplicationWindow {
visible: false
}
+ LoginOKDialog{
+ id: loginOk
+ visible: false
+ }
+
MessageDialog {
id: errorStartingVPN
buttons: MessageDialog.Ok