summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-08 15:56:25 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-08 20:10:15 +0200
commit6ba46743264ad88132f4492b904b10542842e284 (patch)
treed90469c7a008a4e1c6416cacfaddf987a9c760c6 /gui
parent85e61a7d05d2617bb1a003fdfe756f5e56520b89 (diff)
[bug] show only bad_auth dialog
Diffstat (limited to 'gui')
-rw-r--r--gui/qml/main.qml15
1 files changed, 13 insertions, 2 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index da6b9ee..f0a2b5c 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -17,6 +17,8 @@ ApplicationWindow {
onDataChanged: {
ctx = JSON.parse(jsonModel.getJson());
+ // FIXME -- we need to inform the backend that we've already seen
+ // this. Otherwise this keeps popping randonmly on state changes.
if (ctx.donateDialog == 'true') {
console.debug(jsonModel.getJson())
donate.visible = true
@@ -28,6 +30,7 @@ ApplicationWindow {
loginOk.visible = true
}
if (ctx.errors ) {
+ login.visible = false
if ( ctx.errors == "nohelpers" ) {
showInitFailure(qsTr("Could not find helpers. Check your installation"))
} else if ( ctx.errors == "nopolkit" ) {
@@ -268,7 +271,15 @@ ApplicationWindow {
title: qsTr("Initialization Error")
text: ""
visible: false
- onAccepted: backend.quit()
- onRejected: backend.quit()
+ onAccepted: retryOrQuit()
+ onRejected: retryOrQuit()
+
+ function retryOrQuit() {
+ if (ctx.loginDialog == 'true') {
+ login.visible = true
+ } else {
+ backend.quit()
+ }
+ }
}
}