mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-28 12:35:40 +01:00
Merge branch 'master' of https://github.com/bitwarden/desktop into hotfix/multiple-extensions
This commit is contained in:
commit
87d399a3f9
2
package-lock.json
generated
2
package-lock.json
generated
@ -3638,7 +3638,7 @@
|
||||
"dev": true
|
||||
},
|
||||
"duo_web_sdk": {
|
||||
"version": "git+https://github.com/duosecurity/duo_web_sdk.git#410a9186cc34663c4913b17d6528067cd3331f1d",
|
||||
"version": "git+https://github.com/duosecurity/duo_web_sdk.git#4c5df7a4001b8b03e2d7130d9096b697c4032e77",
|
||||
"from": "git+https://github.com/duosecurity/duo_web_sdk.git"
|
||||
},
|
||||
"duplexer3": {
|
||||
|
@ -221,6 +221,7 @@
|
||||
"artifactName": "${productName}-${version}-${arch}.${ext}"
|
||||
},
|
||||
"snap": {
|
||||
"autoStart": true,
|
||||
"confinement": "strict",
|
||||
"plugs": [
|
||||
"default",
|
||||
|
@ -54,6 +54,7 @@ export class SettingsComponent implements OnInit {
|
||||
alwaysShowDock: boolean;
|
||||
showAlwaysShowDock: boolean = false;
|
||||
openAtLogin: boolean;
|
||||
requireEnableTray: boolean = false;
|
||||
|
||||
enableTrayText: string;
|
||||
enableTrayDescText: string;
|
||||
@ -71,6 +72,9 @@ export class SettingsComponent implements OnInit {
|
||||
private userService: UserService, private cryptoService: CryptoService) {
|
||||
const isMac = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop;
|
||||
|
||||
// Workaround to avoid ghosting trays https://github.com/electron/electron/issues/17622
|
||||
this.requireEnableTray = this.platformUtilsService.getDevice() === DeviceType.LinuxDesktop;
|
||||
|
||||
const trayKey = isMac ? 'enableMenuBar' : 'enableTray';
|
||||
this.enableTrayText = this.i18nService.t(trayKey);
|
||||
this.enableTrayDescText = this.i18nService.t(trayKey + 'Desc');
|
||||
@ -271,17 +275,44 @@ export class SettingsComponent implements OnInit {
|
||||
}
|
||||
|
||||
async saveCloseToTray() {
|
||||
if (this.requireEnableTray) {
|
||||
this.enableTray = true;
|
||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||
}
|
||||
|
||||
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
||||
this.callAnalytics('CloseToTray', this.enableCloseToTray);
|
||||
}
|
||||
|
||||
async saveTray() {
|
||||
if (this.requireEnableTray && !this.enableTray && (this.startToTray || this.enableCloseToTray)) {
|
||||
const confirm = await this.platformUtilsService.showDialog(
|
||||
this.i18nService.t('confirmTrayDesc'), this.i18nService.t('confirmTrayTitle'),
|
||||
this.i18nService.t('yes'), this.i18nService.t('no'), 'warning');
|
||||
|
||||
if (confirm) {
|
||||
this.startToTray = false;
|
||||
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
|
||||
this.enableCloseToTray = false;
|
||||
await this.storageService.save(ElectronConstants.enableCloseToTrayKey, this.enableCloseToTray);
|
||||
} else {
|
||||
this.enableTray = true;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||
this.callAnalytics('Tray', this.enableTray);
|
||||
this.messagingService.send(this.enableTray ? 'showTray' : 'removeTray');
|
||||
}
|
||||
|
||||
async saveStartToTray() {
|
||||
if (this.requireEnableTray) {
|
||||
this.enableTray = true;
|
||||
await this.storageService.save(ElectronConstants.enableTrayKey, this.enableTray);
|
||||
}
|
||||
|
||||
await this.storageService.save(ElectronConstants.enableStartToTrayKey, this.startToTray);
|
||||
this.callAnalytics('StartToTray', this.startToTray);
|
||||
}
|
||||
|
@ -50,15 +50,16 @@
|
||||
<i class="fa fa-plus fa-fw" aria-hidden="true"></i>
|
||||
</button>
|
||||
</div>
|
||||
<ul class="fa-ul">
|
||||
<ul>
|
||||
<ng-template #recursiveFolders let-folders>
|
||||
<li *ngFor="let f of folders"
|
||||
[ngClass]="{active: selectedFolder && f.node.id === selectedFolderId}">
|
||||
<a href="#" appStopClick appBlurClick (click)="selectFolder(f.node)">
|
||||
<i *ngIf="f.children.length" class="fa-li fa" title="{{'toggleCollapse' | i18n}}" aria-hidden="true"
|
||||
<i *ngIf="f.children.length" class="fa-fw fa" title="{{'toggleCollapse' | i18n}}" aria-hidden="true"
|
||||
[ngClass]="{'fa-caret-right': isCollapsed(f.node), 'fa-caret-down': !isCollapsed(f.node)}"
|
||||
(click)="collapse(f.node)" appStopProp></i>
|
||||
{{f.node.name}}
|
||||
<i *ngIf="f.children.length === 0" class="fa-fw fa fa-folder-o" aria-hidden="true"></i>
|
||||
{{f.node.name}}
|
||||
<span appStopProp appStopClick (click)="editFolder(f.node)" role="button"
|
||||
appA11yTitle="{{'editFolder' | i18n}}" *ngIf="f.node.id">
|
||||
<i class="fa fa-pencil fa-fw" aria-hidden="true"></i>
|
||||
@ -74,14 +75,15 @@
|
||||
</ul>
|
||||
<div *ngIf="collections && collections.length">
|
||||
<h2>{{'collections' | i18n}}</h2>
|
||||
<ul class="fa-ul">
|
||||
<ul>
|
||||
<ng-template #recursiveCollections let-collections>
|
||||
<li *ngFor="let c of collections" [ngClass]="{active: c.node.id === selectedCollectionId}">
|
||||
<a href="#" appStopClick appBlurClick (click)="selectCollection(c.node)">
|
||||
<i *ngIf="c.children.length" class="fa-li fa" title="{{'toggleCollapse' | i18n}}" aria-hidden="true"
|
||||
<i *ngIf="c.children.length" class="fa-fw fa" title="{{'toggleCollapse' | i18n}}" aria-hidden="true"
|
||||
[ngClass]="{'fa-caret-right': isCollapsed(c.node), 'fa-caret-down': !isCollapsed(c.node)}"
|
||||
(click)="collapse(c.node)" appStopProp></i>
|
||||
{{c.node.name}}
|
||||
<i *ngIf="c.children.length === 0" class="fa-fw fa fa-cube" aria-hidden="true"></i>
|
||||
{{c.node.name}}
|
||||
</a>
|
||||
<ul class="fa-ul" *ngIf="c.children.length && !isCollapsed(c.node)">
|
||||
<ng-container
|
||||
|
@ -900,6 +900,12 @@
|
||||
"alwaysShowDockDesc": {
|
||||
"message": "Show the Bitwarden icon in the Dock even when minimized to the menu bar."
|
||||
},
|
||||
"confirmTrayTitle": {
|
||||
"message": "Confirm disable tray"
|
||||
},
|
||||
"confirmTrayDesc": {
|
||||
"message": "Disabling this setting will also disable all other tray related settings."
|
||||
},
|
||||
"language": {
|
||||
"message": "Language"
|
||||
},
|
||||
@ -1476,5 +1482,8 @@
|
||||
},
|
||||
"personalOwnershipSubmitError": {
|
||||
"message": "Due to an Enterprise Policy, you are restricted from saving items to your personal vault. Change the Ownership option to an organization and choose from available Collections."
|
||||
},
|
||||
"hintEqualsPassword": {
|
||||
"message": "Your password hint cannot be the same as your password."
|
||||
}
|
||||
}
|
||||
|
@ -97,6 +97,7 @@ export class MessagingMain {
|
||||
if (lockNowTrayMenuItem != null) {
|
||||
lockNowTrayMenuItem.enabled = isAuthenticated && !isLocked;
|
||||
}
|
||||
this.main.trayMain.updateContextMenu();
|
||||
}
|
||||
|
||||
private addOpenAtLogin() {
|
||||
|
Loading…
Reference in New Issue
Block a user