Wip start on login
This commit is contained in:
parent
2cbe7f3d0a
commit
f926f80d8c
|
@ -128,6 +128,16 @@
|
|||
</div>
|
||||
<small class="help-block">{{startToTrayDescText}}</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="checkbox">
|
||||
<label for="startOnLogin">
|
||||
<input id="startOnLogin" type="checkbox" name="StartOnLogin" [(ngModel)]="startOnLogin"
|
||||
(change)="saveStartOnLogin()">
|
||||
{{'startOnLogin' | i18n}}
|
||||
</label>
|
||||
</div>
|
||||
<small class="help-block">{{'startOnLoginDesc' | i18n}}</small>
|
||||
</div>
|
||||
<div class="form-group" *ngIf="showAlwaysShowDock">
|
||||
<div class="checkbox">
|
||||
<label for="alwaysShowDock">
|
||||
|
|
|
@ -51,6 +51,7 @@ export class SettingsComponent implements OnInit {
|
|||
biometricText: string;
|
||||
alwaysShowDock: boolean;
|
||||
showAlwaysShowDock: boolean = false;
|
||||
startOnLogin: boolean;
|
||||
|
||||
enableTrayText: string;
|
||||
enableTrayDescText: string;
|
||||
|
@ -306,6 +307,10 @@ export class SettingsComponent implements OnInit {
|
|||
await this.storageService.save(ElectronConstants.alwaysShowDock, this.alwaysShowDock);
|
||||
}
|
||||
|
||||
async saveStartOnLogin() {
|
||||
this.messagingService.send(this.startOnLogin ? 'addOpenAtLogin' : 'removeOpenAtLogin');
|
||||
}
|
||||
|
||||
private callAnalytics(name: string, enabled: boolean) {
|
||||
const status = enabled ? 'Enabled' : 'Disabled';
|
||||
this.analytics.eventTrack.next({ action: `${status} ${name}` });
|
||||
|
|
|
@ -888,6 +888,12 @@
|
|||
"startToMenuBarDesc": {
|
||||
"message": "When the application is first started, only show an icon in the menu bar."
|
||||
},
|
||||
"startOnLogin": {
|
||||
"message": "Start automatically on login"
|
||||
},
|
||||
"startOnLoginDesc": {
|
||||
"message": "Start the Bitwarden Desktop application automatically on login."
|
||||
},
|
||||
"alwaysShowDock": {
|
||||
"message": "Always show in the Dock"
|
||||
},
|
||||
|
|
|
@ -44,6 +44,10 @@ export class MessagingMain {
|
|||
case 'hideToTray':
|
||||
this.main.trayMain.hideToTray();
|
||||
break;
|
||||
case 'addStartOnLogin':
|
||||
break;
|
||||
case 'removeStartOnLogin':
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue