1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

a few cleanup items for full width setting change (#547)

This commit is contained in:
Kyle Spearrin 2020-06-02 09:56:16 -04:00 committed by GitHub
parent f895916fbb
commit 2cc0aa6f3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -69,7 +69,6 @@ export class AppComponent implements OnDestroy, OnInit {
private lastActivity: number = null;
private idleTimer: number = null;
private isIdle = false;
private enableFullWidth = false;
constructor(private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics,
private broadcasterService: BroadcasterService, private userService: UserService,
@ -170,6 +169,7 @@ export class AppComponent implements OnDestroy, OnInit {
}
}
});
this.setFullWidth();
}
@ -269,8 +269,8 @@ export class AppComponent implements OnDestroy, OnInit {
}
private async setFullWidth() {
this.enableFullWidth = await this.storageService.get<boolean>('enableFullWidth');
if (this.enableFullWidth) {
const enableFullWidth = await this.storageService.get<boolean>('enableFullWidth');
if (enableFullWidth) {
document.body.classList.add('full-width');
} else {
document.body.classList.remove('full-width');

View File

@ -80,7 +80,6 @@ export class OptionsComponent implements OnInit {
await this.storageService.save('enableGravatars', this.enableGravatars);
await this.stateService.save('enableGravatars', this.enableGravatars);
await this.storageService.save('enableFullWidth', this.enableFullWidth);
await this.stateService.save('enableFullWidth', this.enableFullWidth);
this.messagingService.send('setFullWidth');
await this.storageService.save(ConstantsService.localeKey, this.locale);
this.analytics.eventTrack.next({ action: 'Saved Options' });

View File

@ -1049,7 +1049,7 @@
"description": "Allows scaling the web vault UI's width"
},
"enableFullWidthDesc": {
"message": "Allows expanding the web vault view to fill the full width of the browser window."
"message": "Allow the web vault to expand the full width of the browser window."
},
"default": {
"message": "Default"