preferences and menu bar labels for mac
This commit is contained in:
parent
270588fdbc
commit
2bb71e6af1
|
@ -53,10 +53,10 @@
|
|||
<label for="enableTray">
|
||||
<input id="enableTray" type="checkbox" name="EnableTray" [(ngModel)]="enableTray"
|
||||
(change)="saveTray()">
|
||||
{{'enableTray' | i18n}}
|
||||
{{enableTrayText}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'enableTrayDesc' | i18n}}</small>
|
||||
<small class="help-block">{{enableTrayDescText}}</small>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="showMinToTray">
|
||||
<div class="checkbox">
|
||||
|
|
|
@ -44,12 +44,18 @@ export class SettingsComponent implements OnInit {
|
|||
themeOptions: any[];
|
||||
clearClipboard: number;
|
||||
clearClipboardOptions: any[];
|
||||
enableTrayText: string;
|
||||
enableTrayDescText: string;
|
||||
|
||||
constructor(private analytics: Angulartics2, private toasterService: ToasterService,
|
||||
private i18nService: I18nService, private platformUtilsService: PlatformUtilsService,
|
||||
private storageService: StorageService, private lockService: LockService,
|
||||
private stateService: StateService, private messagingService: MessagingService,
|
||||
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 = [
|
||||
// { name: i18nService.t('immediately'), value: 0 },
|
||||
{ name: i18nService.t('oneMinute'), value: 1 },
|
||||
|
|
|
@ -1218,5 +1218,14 @@
|
|||
},
|
||||
"lockWithMasterPassOnRestart": {
|
||||
"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[] = [
|
||||
{ type: 'separator' },
|
||||
{
|
||||
label: this.main.i18nService.t('settings'),
|
||||
label: this.main.i18nService.t(process.platform === 'darwin' ? 'preferences' : 'settings'),
|
||||
id: 'settings',
|
||||
click: () => this.main.messagingService.send('openSettings'),
|
||||
accelerator: 'CmdOrCtrl+,',
|
||||
|
|
Loading…
Reference in New Issue