mirror of
https://github.com/bitwarden/desktop
synced 2026-01-16 23:43:14 +00:00
Close to Tray implemented
This commit is contained in:
@@ -52,6 +52,16 @@
|
||||
</div>
|
||||
<small class="help-block">{{'enableMinToTrayDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="showMinToTray">
|
||||
<div class="checkbox">
|
||||
<label for="enableCloseToTray">
|
||||
<input id="enableCloseToTray" type="checkbox" name="EnableCloseToTray"
|
||||
[(ngModel)]="enableCloseToTray" (change)="saveCloseToTray()">
|
||||
{{'enableCloseToTray' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'enableCloseToTrayDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="disableGa">
|
||||
|
||||
@@ -30,6 +30,7 @@ export class SettingsComponent implements OnInit {
|
||||
disableGa: boolean = false;
|
||||
disableFavicons: boolean = false;
|
||||
enableMinToTray: boolean = false;
|
||||
enableCloseToTray: boolean = false;
|
||||
enableTray: boolean = false;
|
||||
showMinToTray: boolean = false;
|
||||
locale: string;
|
||||
@@ -78,6 +79,7 @@ export class SettingsComponent implements OnInit {
|
||||
this.lockOption = await this.storageService.get<number>(ConstantsService.lockOptionKey);
|
||||
this.disableFavicons = await this.storageService.get<boolean>(ConstantsService.disableFaviconKey);
|
||||
this.enableMinToTray = await this.storageService.get<boolean>(ElectronConstants.enableMinimizeToTrayKey);
|
||||
this.enableCloseToTray = await this.storageService.get<boolean>(ElectronConstants.enableCloseToTrayKey);
|
||||
this.enableTray = await this.storageService.get<boolean>(ElectronConstants.enableTrayKey);
|
||||
this.locale = await this.storageService.get<string>(ConstantsService.localeKey);
|
||||
this.theme = await this.storageService.get<string>(ConstantsService.themeKey);
|
||||
@@ -113,6 +115,11 @@ export class SettingsComponent implements OnInit {
|
||||
this.callAnalytics('MinimizeToTray', this.enableMinToTray);
|
||||
}
|
||||
|
||||
async saveCloseToTray() {
|
||||
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
||||
this.callAnalytics('CloseToTray', this.enableCloseToTray);
|
||||
}
|
||||
|
||||
async saveTray() {
|
||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||
this.callAnalytics('Tray', this.enableTray);
|
||||
|
||||
@@ -806,6 +806,12 @@
|
||||
"enableMinToTrayDesc": {
|
||||
"message": "Zeige ein Symbol in der Taskleiste, wenn das Fenster minimiert wird."
|
||||
},
|
||||
"enableCloseToTray": {
|
||||
"message": "Beim Schließen minimieren"
|
||||
},
|
||||
"enableCloseToTrayDesc": {
|
||||
"message": "Bitwarden zu einem Symbol in der Taskleiste minimieren sobald das Fenster geschlossen wird."
|
||||
},
|
||||
"enableTray": {
|
||||
"message": "Taskleisten-Symbol einschalten"
|
||||
},
|
||||
@@ -1149,4 +1155,4 @@
|
||||
"weakMasterPasswordDesc": {
|
||||
"message": "The master password you have chosen is weak. You should use a strong master password (or a passphrase) to properly protect your Bitwarden account. Are you sure you want to use this master password?"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -806,6 +806,12 @@
|
||||
"enableMinToTrayDesc": {
|
||||
"message": "When minimizing the window, show an icon in the system tray instead."
|
||||
},
|
||||
"enableCloseToTray": {
|
||||
"message": "Close to Tray Icon"
|
||||
},
|
||||
"enableCloseToTrayDesc": {
|
||||
"message": "When closing the window, show an icon in the system tray instead."
|
||||
},
|
||||
"enableTray": {
|
||||
"message": "Enable Tray Icon"
|
||||
},
|
||||
|
||||
@@ -365,6 +365,10 @@ export class MenuMain extends BaseMenu {
|
||||
click: () => this.main.messagingService.send('lockVault'),
|
||||
accelerator: 'CmdOrCtrl+L',
|
||||
},
|
||||
{
|
||||
label: this.i18nService.t('quitBitwarden'),
|
||||
role: 'quit',
|
||||
},
|
||||
];
|
||||
|
||||
const updateMenuItem = {
|
||||
|
||||
Reference in New Issue
Block a user