preferences and menu bar labels for mac
This commit is contained in:
parent
270588fdbc
commit
2bb71e6af1
|
@ -53,10 +53,10 @@
|
||||||
<label for="enableTray">
|
<label for="enableTray">
|
||||||
<input id="enableTray" type="checkbox" name="EnableTray" [(ngModel)]="enableTray"
|
<input id="enableTray" type="checkbox" name="EnableTray" [(ngModel)]="enableTray"
|
||||||
(change)="saveTray()">
|
(change)="saveTray()">
|
||||||
{{'enableTray' | i18n}}
|
{{enableTrayText}}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<small class="help-block">{{'enableTrayDesc' | i18n}}</small>
|
<small class="help-block">{{enableTrayDescText}}</small>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group" *ngIf="showMinToTray">
|
<div class="form-group" *ngIf="showMinToTray">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
|
|
|
@ -44,12 +44,18 @@ export class SettingsComponent implements OnInit {
|
||||||
themeOptions: any[];
|
themeOptions: any[];
|
||||||
clearClipboard: number;
|
clearClipboard: number;
|
||||||
clearClipboardOptions: any[];
|
clearClipboardOptions: any[];
|
||||||
|
enableTrayText: string;
|
||||||
|
enableTrayDescText: string;
|
||||||
|
|
||||||
constructor(private analytics: Angulartics2, private toasterService: ToasterService,
|
constructor(private analytics: Angulartics2, private toasterService: ToasterService,
|
||||||
private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
||||||
private storageService: StorageService, private lockService: LockService,
|
private storageService: StorageService, private lockService: LockService,
|
||||||
private stateService: StateService, private messagingService: MessagingService,
|
private stateService: StateService, private messagingService: MessagingService,
|
||||||
private userService: UserService, private cryptoService: CryptoService) {
|
private userService: UserService, private cryptoService: CryptoService) {
|
||||||
|
const trayKey = this.platformUtilsService.getDevice() === DeviceType.MacOsDesktop ?
|
||||||
|
'enableMenuBar' : 'enableTray';
|
||||||
|
this.enableTrayText = this.i18nService.t(trayKey);
|
||||||
|
this.enableTrayDescText = this.i18nService.t(trayKey + 'Desc');
|
||||||
this.lockOptions = [
|
this.lockOptions = [
|
||||||
// { name: i18nService.t('immediately'), value: 0 },
|
// { name: i18nService.t('immediately'), value: 0 },
|
||||||
{ name: i18nService.t('oneMinute'), value: 1 },
|
{ name: i18nService.t('oneMinute'), value: 1 },
|
||||||
|
|
|
@ -1218,5 +1218,14 @@
|
||||||
},
|
},
|
||||||
"lockWithMasterPassOnRestart": {
|
"lockWithMasterPassOnRestart": {
|
||||||
"message": "Lock with master password on restart"
|
"message": "Lock with master password on restart"
|
||||||
|
},
|
||||||
|
"preferences": {
|
||||||
|
"message": "Preferences"
|
||||||
|
},
|
||||||
|
"enableMenuBar": {
|
||||||
|
"message": "Enable Menu Bar Icon"
|
||||||
|
},
|
||||||
|
"enableMenuBarDesc": {
|
||||||
|
"message": "Always show an icon in the menu bar."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,7 +358,7 @@ export class MenuMain extends BaseMenu {
|
||||||
const firstMenuOptions: MenuItemConstructorOptions[] = [
|
const firstMenuOptions: MenuItemConstructorOptions[] = [
|
||||||
{ type: 'separator' },
|
{ type: 'separator' },
|
||||||
{
|
{
|
||||||
label: this.main.i18nService.t('settings'),
|
label: this.main.i18nService.t(process.platform === 'darwin' ? 'preferences' : 'settings'),
|
||||||
id: 'settings',
|
id: 'settings',
|
||||||
click: () => this.main.messagingService.send('openSettings'),
|
click: () => this.main.messagingService.send('openSettings'),
|
||||||
accelerator: 'CmdOrCtrl+,',
|
accelerator: 'CmdOrCtrl+,',
|
||||||
|
|
Loading…
Reference in New Issue