mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Additional keyboard shortcuts
This commit is contained in:
parent
65044321e8
commit
d146b6830a
3 changed files with 14 additions and 3 deletions
|
|
@ -109,7 +109,7 @@ const contextMenuItems = [
|
|||
{ title: tr('contextMenuFillTOTP'), action: 'fill_totp' },
|
||||
{ title: tr('contextMenuFillAttribute'), id: 'fill_attribute', visible: false },
|
||||
{ title: tr('contextMenuShowPasswordGenerator'), action: 'show_password_generator' },
|
||||
{ title: tr('contextMenuSaveCredentials'), action: 'remember_credentials' }
|
||||
{ title: tr('contextMenuSaveCredentials'), action: 'save_credentials' }
|
||||
];
|
||||
|
||||
const menuContexts = [ 'editable' ];
|
||||
|
|
@ -137,7 +137,9 @@ for (const item of contextMenuItems) {
|
|||
|
||||
// Listen for keyboard shortcuts specified by user
|
||||
browser.commands.onCommand.addListener(async (command) => {
|
||||
if (contextMenuItems.some(e => e.action === command)) {
|
||||
if (contextMenuItems.some(e => e.action === command)
|
||||
|| command === 'redetect_fields'
|
||||
|| command === 'choose_credential_fields') {
|
||||
const tabs = await browser.tabs.query({ active: true, currentWindow: true });
|
||||
if (tabs.length) {
|
||||
browser.tabs.sendMessage(tabs[0].id, { action: command });
|
||||
|
|
|
|||
|
|
@ -1899,7 +1899,7 @@ browser.runtime.onMessage.addListener(async function(req, sender) {
|
|||
kpxc.inputs = [];
|
||||
kpxc.combinations = [];
|
||||
kpxc.initCredentialFields();
|
||||
} else if (req.action === 'remember_credentials') {
|
||||
} else if (req.action === 'save_credentials') {
|
||||
kpxc.rememberCredentialsFromContextMenu();
|
||||
} else if (req.action === 'retrive_credentials_forced') {
|
||||
await kpxc.retrieveCredentials(true);
|
||||
|
|
|
|||
|
|
@ -107,6 +107,15 @@
|
|||
"default": "Alt+Shift+G",
|
||||
"mac": "MacCtrl+Shift+G"
|
||||
}
|
||||
},
|
||||
"save_credentials": {
|
||||
"description": "__MSG_contextMenuSaveCredentials__"
|
||||
},
|
||||
"redetect_fields": {
|
||||
"description": "__MSG_popupRedetectButton__"
|
||||
},
|
||||
"choose_credential_fields": {
|
||||
"description": "__MSG_popupChooseCredentialsText__"
|
||||
}
|
||||
},
|
||||
"web_accessible_resources": [
|
||||
|
|
|
|||
Loading…
Reference in a new issue