mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 600560 - Sync UI: Strength meter does not disappear when sync key field is cleared. r=mconnor a=blocking-beta8
This commit is contained in:
parent
af5b5c88a8
commit
29b2a937a6
@ -341,7 +341,7 @@ var gSyncSetup = {
|
||||
// xxxmpc - hack, sigh
|
||||
if (el1.value == document.getElementById("weavePassword").value) {
|
||||
valid = false;
|
||||
str = Weave.Utils.getErrorString("change.passphrase.ppSameAsPassword");
|
||||
str = Weave.Utils.getErrorString("change.synckey.sameAsPassword");
|
||||
}
|
||||
else {
|
||||
[valid, str] = gSyncUtils.validatePassphrase(el1);
|
||||
@ -349,8 +349,11 @@ var gSyncSetup = {
|
||||
|
||||
let feedback = document.getElementById("passphraseFeedbackRow");
|
||||
this._setFeedback(feedback, valid, str);
|
||||
if (!valid)
|
||||
if (!valid) {
|
||||
// Hide strength meter if we're displaying an error.
|
||||
document.getElementById("passphraseStrengthRow").hidden = true;
|
||||
return valid;
|
||||
}
|
||||
|
||||
// No passphrase strength meter for the generated key.
|
||||
if (!this._haveCustomSyncKey)
|
||||
|
@ -299,7 +299,9 @@ let gSyncUtils = {
|
||||
let val = el.value;
|
||||
let error = "";
|
||||
|
||||
if (val == Weave.Service.username)
|
||||
if (val.length < Weave.MIN_PP_LENGTH)
|
||||
error = "change.synckey.tooShort";
|
||||
else if (val == Weave.Service.username)
|
||||
error = "change.synckey.sameAsUsername";
|
||||
else if (val == Weave.Service.account)
|
||||
error = "change.synckey.sameAsEmail";
|
||||
@ -307,8 +309,6 @@ let gSyncUtils = {
|
||||
error = "change.synckey.sameAsPassword";
|
||||
else if (change && val == Weave.Service.passphrase)
|
||||
error = "change.synckey.sameAsSyncKey";
|
||||
else if (val.length < Weave.MIN_PP_LENGTH)
|
||||
error = "change.synckey.tooShort";
|
||||
else
|
||||
valid = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user