1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 09:13:33 +00:00

Add main menu copy and shortcut and context copy for totp

This commit is contained in:
Matt Gibson
2021-02-08 11:20:12 -06:00
parent ab9b87acf3
commit ba173f9da5
4 changed files with 36 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ export class MenuMain extends BaseMenu {
searchVault: MenuItem;
copyUsername: MenuItem;
copyPassword: MenuItem;
copyTotp: MenuItem;
unlockedRequiredMenuItems: MenuItem[] = [];
constructor(private main: Main) {
@@ -67,6 +68,7 @@ export class MenuMain extends BaseMenu {
this.searchVault = this.menu.getMenuItemById('searchVault');
this.copyUsername = this.menu.getMenuItemById('copyUsername');
this.copyPassword = this.menu.getMenuItemById('copyPassword');
this.copyTotp = this.menu.getMenuItemById('copyTotp');
this.unlockedRequiredMenuItems = [
this.addNewLogin, this.addNewItem, this.addNewFolder,
@@ -170,6 +172,12 @@ export class MenuMain extends BaseMenu {
click: () => this.main.messagingService.send('copyPassword'),
accelerator: 'CmdOrCtrl+P',
},
{
label: this.main.i18nService.t('copyVerificationCodeTotp'),
id: 'copyTotp',
click: () => this.main.messagingService.send('copyTotp'),
accelerator: 'CmdOrCtrl+T'
}
]);
if (!isWindowsStore() && !isMacAppStore()) {