mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-30 13:03:53 +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 lastActivity: number = null;
|
||||||
private idleTimer: number = null;
|
private idleTimer: number = null;
|
||||||
private isIdle = false;
|
private isIdle = false;
|
||||||
private enableFullWidth = false;
|
|
||||||
|
|
||||||
constructor(private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics,
|
constructor(private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics,
|
||||||
private broadcasterService: BroadcasterService, private userService: UserService,
|
private broadcasterService: BroadcasterService, private userService: UserService,
|
||||||
@ -170,6 +169,7 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.setFullWidth();
|
this.setFullWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,8 +269,8 @@ export class AppComponent implements OnDestroy, OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async setFullWidth() {
|
private async setFullWidth() {
|
||||||
this.enableFullWidth = await this.storageService.get<boolean>('enableFullWidth');
|
const enableFullWidth = await this.storageService.get<boolean>('enableFullWidth');
|
||||||
if (this.enableFullWidth) {
|
if (enableFullWidth) {
|
||||||
document.body.classList.add('full-width');
|
document.body.classList.add('full-width');
|
||||||
} else {
|
} else {
|
||||||
document.body.classList.remove('full-width');
|
document.body.classList.remove('full-width');
|
||||||
|
@ -80,7 +80,6 @@ export class OptionsComponent implements OnInit {
|
|||||||
await this.storageService.save('enableGravatars', this.enableGravatars);
|
await this.storageService.save('enableGravatars', this.enableGravatars);
|
||||||
await this.stateService.save('enableGravatars', this.enableGravatars);
|
await this.stateService.save('enableGravatars', this.enableGravatars);
|
||||||
await this.storageService.save('enableFullWidth', this.enableFullWidth);
|
await this.storageService.save('enableFullWidth', this.enableFullWidth);
|
||||||
await this.stateService.save('enableFullWidth', this.enableFullWidth);
|
|
||||||
this.messagingService.send('setFullWidth');
|
this.messagingService.send('setFullWidth');
|
||||||
await this.storageService.save(ConstantsService.localeKey, this.locale);
|
await this.storageService.save(ConstantsService.localeKey, this.locale);
|
||||||
this.analytics.eventTrack.next({ action: 'Saved Options' });
|
this.analytics.eventTrack.next({ action: 'Saved Options' });
|
||||||
|
@ -1049,7 +1049,7 @@
|
|||||||
"description": "Allows scaling the web vault UI's width"
|
"description": "Allows scaling the web vault UI's width"
|
||||||
},
|
},
|
||||||
"enableFullWidthDesc": {
|
"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": {
|
"default": {
|
||||||
"message": "Default"
|
"message": "Default"
|
||||||
|
Loading…
Reference in New Issue
Block a user