зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1595915 - Move the password generation context menu item to the top-level. r=sfoster,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D60640 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
c035458265
Коммит
3248d7392d
|
@ -233,6 +233,11 @@
|
|||
data-l10n-id="main-context-menu-view-background-image"
|
||||
oncommand="gContextMenu.viewBGImage(event);"
|
||||
onclick="checkForMiddleClick(this, event);"/>
|
||||
<menuitem id="fill-login-generated-password"
|
||||
data-l10n-id="main-context-menu-generate-new-password"
|
||||
hidden="true"
|
||||
oncommand="gContextMenu.useGeneratedPassword();"/>
|
||||
<menuseparator id="generated-password-separator"/>
|
||||
<menuitem id="context-undo"
|
||||
data-l10n-id="text-action-undo"
|
||||
command="cmd_undo"/>
|
||||
|
@ -365,12 +370,6 @@
|
|||
label="&noLoginSuggestions.label;"
|
||||
disabled="true"
|
||||
hidden="true"/>
|
||||
<menuseparator id="generated-password-separator"/>
|
||||
<menuitem id="fill-login-generated-password"
|
||||
label="&useGeneratedPassword.label;"
|
||||
accesskey="&useGeneratedPassword.accesskey;"
|
||||
hidden="true"
|
||||
oncommand="gContextMenu.useGeneratedPassword();"/>
|
||||
<menuseparator id="saved-logins-separator"/>
|
||||
<menuitem id="fill-login-saved-passwords"
|
||||
label="&viewSavedLogins.label;"
|
||||
|
|
|
@ -949,16 +949,7 @@ class nsContextMenu {
|
|||
);
|
||||
}
|
||||
|
||||
if (!showFill || disableFill) {
|
||||
return;
|
||||
}
|
||||
|
||||
let formOrigin = LoginHelper.getLoginOrigin(documentURI.spec);
|
||||
let fragment = nsContextMenu.LoginManagerContextMenu.addLoginsToMenu(
|
||||
this.targetIdentifier,
|
||||
this.browser,
|
||||
formOrigin
|
||||
);
|
||||
let isGeneratedPasswordEnabled =
|
||||
LoginHelper.generationAvailable && LoginHelper.generationEnabled;
|
||||
let canFillGeneratedPassword =
|
||||
|
@ -966,10 +957,22 @@ class nsContextMenu {
|
|||
isGeneratedPasswordEnabled &&
|
||||
Services.logins.getLoginSavingEnabled(formOrigin);
|
||||
|
||||
this.showItem("fill-login-no-logins", !fragment);
|
||||
this.showItem("fill-login-generated-password", canFillGeneratedPassword);
|
||||
this.showItem("generated-password-separator", canFillGeneratedPassword);
|
||||
|
||||
if (!showFill || disableFill) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Update sub-menu items.
|
||||
let fragment = nsContextMenu.LoginManagerContextMenu.addLoginsToMenu(
|
||||
this.targetIdentifier,
|
||||
this.browser,
|
||||
formOrigin
|
||||
);
|
||||
|
||||
this.showItem("fill-login-no-logins", !fragment);
|
||||
|
||||
if (!fragment) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -285,6 +285,10 @@ main-context-menu-view-background-image =
|
|||
.label = View Background Image
|
||||
.accesskey = w
|
||||
|
||||
main-context-menu-generate-new-password =
|
||||
.label = Use Generated Password…
|
||||
.accesskey = G
|
||||
|
||||
main-context-menu-keyword =
|
||||
.label = Add a Keyword for this Search…
|
||||
.accesskey = K
|
||||
|
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
<!ENTITY fillLoginMenu.label "Fill Login">
|
||||
<!ENTITY fillLoginMenu.accesskey "F">
|
||||
<!ENTITY useGeneratedPassword.label "Use a Securely Generated Password…">
|
||||
<!ENTITY useGeneratedPassword.accesskey "S">
|
||||
<!ENTITY fillPasswordMenu.label "Fill Password">
|
||||
<!ENTITY fillPasswordMenu.accesskey "F">
|
||||
<!ENTITY fillUsernameMenu.label "Fill Username">
|
||||
|
|
Загрузка…
Ссылка в новой задаче