From 6ba46743264ad88132f4492b904b10542842e284 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 15:56:25 +0200 Subject: [bug] show only bad_auth dialog --- gui/qml/main.qml | 15 +++++++++++++-- pkg/bitmask/init.go | 2 +- 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) } } -- cgit v1.2.3