From 971c28f6563de35b1d66401d6919f86787af0611 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Fri, 12 Jun 2020 12:40:59 +0200 Subject: [feat] working donate dialog Signed-off-by: kali kaneko (leap communications) --- gui/qml/main.qml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'gui/qml/main.qml') diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 80e5e62..98eac80 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -11,10 +11,16 @@ ApplicationWindow { property var ctx + Connections { target: jsonModel onDataChanged: { ctx = JSON.parse(jsonModel.getJson()); + if (ctx.donate == 'true') { + console.debug(jsonModel.getJson()) + donate.visible = true + backend.toggleDonate() + } } } @@ -92,6 +98,7 @@ ApplicationWindow { StateGroup { id: vpn state: ctx ? ctx.status : "" + states: [ State { name: "initializing" }, State { @@ -106,7 +113,7 @@ ApplicationWindow { }, State { name: "starting" - PropertyChanges { target: systray; tooltip: toHuman("connecting"); icon.source: icons["wait"] } + PropertyChanges { target: systray; tooltip: toHuman("connecting"); icon.source: icons["wait"] } PropertyChanges { target: statusItem; text: toHuman("connecting") } }, State { @@ -181,13 +188,17 @@ ApplicationWindow { } } + DonateDialog { + visible: false + id: donate + } +} + + /* LoginDialog { id: login } - DonateDialog { - id: donate - } MessageDialog { id: about buttons: MessageDialog.Ok @@ -223,7 +234,3 @@ ApplicationWindow { visible: ctxSystray.errorInitMsg != "" } */ - - - -} -- cgit v1.2.3