summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
}
}