mirror of
https://github.com/bitwarden/desktop.git
synced 2024-09-30 04:18:01 +02:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
dabd39625c |
10
src/main.ts
10
src/main.ts
@ -16,7 +16,6 @@ import { ElectronLogService } from 'jslib/electron/services/electronLog.service'
|
|||||||
import { ElectronMainMessagingService } from 'jslib/electron/services/electronMainMessaging.service';
|
import { ElectronMainMessagingService } from 'jslib/electron/services/electronMainMessaging.service';
|
||||||
import { ElectronStorageService } from 'jslib/electron/services/electronStorage.service';
|
import { ElectronStorageService } from 'jslib/electron/services/electronStorage.service';
|
||||||
import { TrayMain } from 'jslib/electron/tray.main';
|
import { TrayMain } from 'jslib/electron/tray.main';
|
||||||
import { UpdaterMain } from 'jslib/electron/updater.main';
|
|
||||||
import { WindowMain } from 'jslib/electron/window.main';
|
import { WindowMain } from 'jslib/electron/window.main';
|
||||||
import { NativeMessagingMain } from './main/nativeMessaging.main';
|
import { NativeMessagingMain } from './main/nativeMessaging.main';
|
||||||
|
|
||||||
@ -29,7 +28,6 @@ export class Main {
|
|||||||
|
|
||||||
windowMain: WindowMain;
|
windowMain: WindowMain;
|
||||||
messagingMain: MessagingMain;
|
messagingMain: MessagingMain;
|
||||||
updaterMain: UpdaterMain;
|
|
||||||
menuMain: MenuMain;
|
menuMain: MenuMain;
|
||||||
powerMonitorMain: PowerMonitorMain;
|
powerMonitorMain: PowerMonitorMain;
|
||||||
trayMain: TrayMain;
|
trayMain: TrayMain;
|
||||||
@ -94,13 +92,6 @@ export class Main {
|
|||||||
this.windowMain = new WindowMain(this.storageService, true, undefined, undefined,
|
this.windowMain = new WindowMain(this.storageService, true, undefined, undefined,
|
||||||
(arg) => this.processDeepLink(arg), (win) => this.trayMain.setupWindowListeners(win));
|
(arg) => this.processDeepLink(arg), (win) => this.trayMain.setupWindowListeners(win));
|
||||||
this.messagingMain = new MessagingMain(this, this.storageService);
|
this.messagingMain = new MessagingMain(this, this.storageService);
|
||||||
this.updaterMain = new UpdaterMain(this.i18nService, this.windowMain, 'desktop', () => {
|
|
||||||
this.menuMain.updateMenuItem.enabled = false;
|
|
||||||
}, () => {
|
|
||||||
this.menuMain.updateMenuItem.enabled = true;
|
|
||||||
}, () => {
|
|
||||||
this.menuMain.updateMenuItem.label = this.i18nService.t('restartToUpdate');
|
|
||||||
}, 'bitwarden');
|
|
||||||
this.menuMain = new MenuMain(this);
|
this.menuMain = new MenuMain(this);
|
||||||
this.powerMonitorMain = new PowerMonitorMain(this);
|
this.powerMonitorMain = new PowerMonitorMain(this);
|
||||||
this.trayMain = new TrayMain(this.windowMain, this.i18nService, this.storageService);
|
this.trayMain = new TrayMain(this.windowMain, this.i18nService, this.storageService);
|
||||||
@ -139,7 +130,6 @@ export class Main {
|
|||||||
this.trayMain.hideToTray();
|
this.trayMain.hideToTray();
|
||||||
}
|
}
|
||||||
this.powerMonitorMain.init();
|
this.powerMonitorMain.init();
|
||||||
await this.updaterMain.init();
|
|
||||||
if (this.biometricMain != null) {
|
if (this.biometricMain != null) {
|
||||||
await this.biometricMain.init();
|
await this.biometricMain.init();
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,6 @@ import { ConstantsService } from 'jslib/services/constants.service';
|
|||||||
|
|
||||||
export class MenuMain extends BaseMenu {
|
export class MenuMain extends BaseMenu {
|
||||||
menu: Menu;
|
menu: Menu;
|
||||||
updateMenuItem: MenuItem;
|
|
||||||
addNewLogin: MenuItem;
|
addNewLogin: MenuItem;
|
||||||
addNewItem: MenuItem;
|
addNewItem: MenuItem;
|
||||||
addNewFolder: MenuItem;
|
addNewFolder: MenuItem;
|
||||||
@ -49,7 +48,6 @@ export class MenuMain extends BaseMenu {
|
|||||||
this.initContextMenu();
|
this.initContextMenu();
|
||||||
this.initApplicationMenu();
|
this.initApplicationMenu();
|
||||||
|
|
||||||
this.updateMenuItem = this.menu.getMenuItemById('checkForUpdates');
|
|
||||||
this.addNewLogin = this.menu.getMenuItemById('addNewLogin');
|
this.addNewLogin = this.menu.getMenuItemById('addNewLogin');
|
||||||
this.addNewItem = this.menu.getMenuItemById('addNewItem');
|
this.addNewItem = this.menu.getMenuItemById('addNewItem');
|
||||||
this.addNewFolder = this.menu.getMenuItemById('addNewFolder');
|
this.addNewFolder = this.menu.getMenuItemById('addNewFolder');
|
||||||
@ -405,12 +403,6 @@ export class MenuMain extends BaseMenu {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
const updateMenuItem = {
|
|
||||||
label: this.main.i18nService.t('checkForUpdates'),
|
|
||||||
click: () => this.main.updaterMain.checkForUpdate(true),
|
|
||||||
id: 'checkForUpdates',
|
|
||||||
};
|
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
const firstMenuPart: MenuItemConstructorOptions[] = [
|
const firstMenuPart: MenuItemConstructorOptions[] = [
|
||||||
{
|
{
|
||||||
@ -419,10 +411,6 @@ export class MenuMain extends BaseMenu {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!isMacAppStore()) {
|
|
||||||
firstMenuPart.push(updateMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
template.unshift({
|
template.unshift({
|
||||||
label: 'Bitwarden',
|
label: 'Bitwarden',
|
||||||
submenu: firstMenuPart.concat(firstMenuOptions, [
|
submenu: firstMenuPart.concat(firstMenuOptions, [
|
||||||
@ -445,10 +433,6 @@ export class MenuMain extends BaseMenu {
|
|||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
];
|
];
|
||||||
|
|
||||||
if (!isWindowsStore() && !isSnapStore()) {
|
|
||||||
aboutMenuAdditions.push(updateMenuItem);
|
|
||||||
}
|
|
||||||
|
|
||||||
aboutMenuAdditions.push({
|
aboutMenuAdditions.push({
|
||||||
label: this.i18nService.t('aboutBitwarden'),
|
label: this.i18nService.t('aboutBitwarden'),
|
||||||
click: async () => {
|
click: async () => {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "bitwarden",
|
"name": "bitwarden",
|
||||||
"productName": "Bitwarden",
|
"productName": "Bitwarden",
|
||||||
"description": "A secure and free password manager for all of your devices.",
|
"description": "A secure and free password manager for all of your devices.",
|
||||||
"version": "1.24.6",
|
"version": "1.24.7",
|
||||||
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
"author": "Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)",
|
||||||
"homepage": "https://bitwarden.com",
|
"homepage": "https://bitwarden.com",
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user