mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-25 16:59:17 +01:00
a few cleanup items for full width setting change (#547)
This commit is contained in:
parent
f895916fbb
commit
2cc0aa6f3d
@ -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');
|
||||
|
@ -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' });
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user