1
0
mirror of https://github.com/bitwarden/desktop synced 2025-12-21 02:33:15 +00:00

Merge branch 'master' into feature/fit-finish

This commit is contained in:
Chad Scharf
2020-12-04 12:39:44 -05:00
committed by GitHub
19 changed files with 787 additions and 96 deletions

View File

@@ -38,7 +38,7 @@ export class MessagingMain {
case 'minimizeOnCopy':
this.storageService.get<boolean>(ElectronConstants.minimizeOnCopyToClipboardKey).then(
(shouldMinimize) => {
if (shouldMinimize && this.main.windowMain.win != null) {
if (shouldMinimize && this.main.windowMain.win !== null) {
this.main.windowMain.win.minimize();
}
});
@@ -57,6 +57,16 @@ export class MessagingMain {
break;
case 'removeOpenAtLogin':
this.removeOpenAtLogin();
case 'setFocus':
this.setFocus();
break;
case 'enableBrowserIntegration':
this.main.nativeMessagingMain.generateManifests();
this.main.nativeMessagingMain.listen();
break;
case 'disableBrowserIntegration':
this.main.nativeMessagingMain.removeManifests();
this.main.nativeMessagingMain.stop();
break;
default:
break;
@@ -123,4 +133,9 @@ export class MessagingMain {
private linuxStartupFile(): string {
return path.join(app.getPath('home'), '.config', 'autostart', 'bitwarden.desktop');
}
private setFocus() {
this.main.trayMain.restoreFromTray();
this.main.windowMain.win.focusOnWebView();
}
}