diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 2c694d95fe..b17a685538 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -69,6 +69,7 @@ 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, @@ -148,6 +149,9 @@ export class AppComponent implements OnDestroy, OnInit { properties: { label: message.label }, }); break; + case 'setFullWidth': + this.setFullWidth(); + break; default: break; } @@ -166,6 +170,7 @@ export class AppComponent implements OnDestroy, OnInit { } } }); + this.setFullWidth(); } ngOnDestroy() { @@ -262,4 +267,13 @@ export class AppComponent implements OnDestroy, OnInit { this.notificationsService.reconnectFromActivity(); } } + + private async setFullWidth() { + this.enableFullWidth = await this.storageService.get('enableFullWidth'); + if (this.enableFullWidth) { + document.body.classList.add('full-width'); + } else { + document.body.classList.remove('full-width'); + } + } } diff --git a/src/app/settings/options.component.html b/src/app/settings/options.component.html index 79a6c35bbe..b369b90f6f 100644 --- a/src/app/settings/options.component.html +++ b/src/app/settings/options.component.html @@ -76,6 +76,16 @@ {{'enableGravatarsDesc' | i18n}} + +
+
+ + +
+ {{'enableFullWidthDesc' | i18n}}