summaryrefslogtreecommitdiff
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
parent85e61a7d05d2617bb1a003fdfe756f5e56520b89 (diff)
[bug] show only bad_auth dialog
-rw-r--r--gui/qml/main.qml15
-rw-r--r--pkg/bitmask/init.go2
2 files changed, 14 insertions, 3 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()
+ }
+ }
}
}
diff --git a/pkg/bitmask/init.go b/pkg/bitmask/init.go
index bed98e5..7ac6f76 100644
--- a/pkg/bitmask/init.go
+++ b/pkg/bitmask/init.go
@@ -79,7 +79,7 @@ func ConfigureProvider(opts *ProviderOpts) {
emptyPass, err := strconv.ParseBool(opts.AuthEmptyPass)
if err == nil {
config.AuthEmptyPass = emptyPass
- log.Println("DEBUG: provider allows empty pass", emptyPass)
+ log.Println("DEBUG: provider allows empty pass:", emptyPass)
}
}