authPrompt: Do not enable sensitivity if retries are disallowed

Set the sensitivity of the UI according to the canRetry parameter and thus
if no more logins are allowed don't take any input.

Fixes #311
This commit is contained in:
Marco Trevisan (Treviño) 2018-05-29 03:00:04 +03:00 committed by Marco Trevisan
parent d21657fe61
commit 8f848925f6
2 changed files with 3 additions and 3 deletions

View File

@ -242,11 +242,11 @@ var AuthPrompt = new Lang.Class({
this.emit('prompted'); this.emit('prompted');
}, },
_onVerificationFailed() { _onVerificationFailed(userVerifier, canRetry) {
this._queryingService = null; this._queryingService = null;
this.clear(); this.clear();
this.updateSensitivity(true); this.updateSensitivity(canRetry);
this.setActorInDefaultButtonWell(null); this.setActorInDefaultButtonWell(null);
this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED; this.verificationStatus = AuthPromptStatus.VERIFICATION_FAILED;
}, },

View File

@ -565,7 +565,7 @@ var ShellUserVerifier = new Lang.Class({
} }
} }
this.emit('verification-failed'); this.emit('verification-failed', canRetry);
}, },
_onConversationStopped(client, serviceName) { _onConversationStopped(client, serviceName) {