mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1198908 - Add an unverified state to the sync status bar in the hamburger menu. r=markh
This commit is contained in:
parent
e85decbcd3
commit
5b354b3d5c
@ -263,6 +263,7 @@ let gFxAccounts = {
|
||||
|
||||
let defaultLabel = this.panelUIStatus.getAttribute("defaultlabel");
|
||||
let errorLabel = this.panelUIStatus.getAttribute("errorlabel");
|
||||
let unverifiedLabel = this.panelUIStatus.getAttribute("unverifiedlabel");
|
||||
let signedInTooltiptext = this.panelUIStatus.getAttribute("signedinTooltiptext");
|
||||
|
||||
let updateWithUserData = (userData) => {
|
||||
@ -287,6 +288,13 @@ let gFxAccounts = {
|
||||
this.panelUILabel.setAttribute("label", errorLabel);
|
||||
this.panelUIStatus.setAttribute("tooltiptext", tooltipDescription);
|
||||
showErrorBadge = true;
|
||||
} else if (!userData.verified) {
|
||||
let tooltipDescription = this.strings.formatStringFromName("verifyDescription", [userData.email], 1);
|
||||
this.panelUIFooter.setAttribute("fxastatus", "error");
|
||||
this.panelUIFooter.setAttribute("unverified", "true");
|
||||
this.panelUILabel.setAttribute("label", unverifiedLabel);
|
||||
this.panelUIStatus.setAttribute("tooltiptext", tooltipDescription);
|
||||
showErrorBadge = true;
|
||||
} else {
|
||||
this.panelUIFooter.setAttribute("fxastatus", "signedin");
|
||||
this.panelUILabel.setAttribute("label", userData.email);
|
||||
@ -438,7 +446,11 @@ let gFxAccounts = {
|
||||
this.openPreferences();
|
||||
break;
|
||||
case "error":
|
||||
this.openSignInAgainPage("menupanel");
|
||||
if (this.panelUIFooter.getAttribute("unverified")) {
|
||||
this.openPreferences();
|
||||
} else {
|
||||
this.openSignInAgainPage("menupanel");
|
||||
}
|
||||
break;
|
||||
case "migrate-signup":
|
||||
case "migrate-verify":
|
||||
|
@ -25,6 +25,7 @@
|
||||
defaultlabel="&fxaSignIn.label;"
|
||||
signedinTooltiptext="&fxaSignedIn.tooltip;"
|
||||
errorlabel="&fxaSignInError.label;"
|
||||
unverifiedlabel="&fxaUnverified.label;"
|
||||
onclick="if (event.which == 1) gFxAccounts.onMenuPanelCommand();">
|
||||
<image id="PanelUI-fxa-avatar"/>
|
||||
<toolbarbutton id="PanelUI-fxa-label"
|
||||
|
@ -27,6 +27,9 @@ resendVerificationEmail.accessKey = R
|
||||
# LOCALIZATION NOTE (reconnectDescription) - %S = Email address of user's Firefox Account
|
||||
reconnectDescription = Reconnect %S
|
||||
|
||||
# LOCALIZATION NOTE (verifyDescription) - %S = Email address of user's Firefox Account
|
||||
verifyDescription = Verify %S
|
||||
|
||||
forgetMigration.label = Forget
|
||||
forgetMigration.accessKey = F
|
||||
|
||||
|
@ -112,6 +112,7 @@ These should match what Safari and other Apple applications use on OS X Lion. --
|
||||
<!ENTITY fxaSignIn.label "Sign in to &syncBrand.shortName.label;">
|
||||
<!ENTITY fxaSignedIn.tooltip "Open &syncBrand.shortName.label; preferences">
|
||||
<!ENTITY fxaSignInError.label "Reconnect to &syncBrand.shortName.label;">
|
||||
<!ENTITY fxaUnverified.label "Verify Your Account">
|
||||
<!ENTITY syncStartPanel2.heading "&syncBrand.shortName.label; enabled">
|
||||
<!ENTITY syncStartPanel2.subTitle "&brandShortName; will begin syncing momentarily.">
|
||||
<!ENTITY syncErrorPanel.heading "Cannot connect to &syncBrand.shortName.label;">
|
||||
|
Loading…
Reference in New Issue
Block a user