move dev menu slider and show it only in dev mode env

This commit is contained in:
Baptiste Lemoine 2020-10-21 17:02:01 +02:00
parent e5214fdd97
commit 6059533c36
4 changed files with 14 additions and 7 deletions

View File

@ -6,10 +6,14 @@
<mat-sidenav-content>
<div id="big_container" [class]="themeClass">
<div class="container">
<mat-slide-toggle (change)="sidenav.toggle()">Dev Menu</mat-slide-toggle>
<app-header [appTitle]="appTitle" [appLogo]="appLogo"></app-header>
<main>
<router-outlet></router-outlet>
<div *ngIf="devModeEnabled">
<br />
<mat-slide-toggle (change)="sidenav.toggle()" label="dev menu"> </mat-slide-toggle> menu
développeur
</div>
</main>
<app-footer></app-footer>
<app-feedback></app-feedback>

View File

@ -18,20 +18,18 @@ export class AppComponent implements OnInit, OnDestroy {
public appLogo: string = environment.appLogo;
public themeClass: string;
public isSidebarOpened = false;
public devModeEnabled = !environment.production;
private themeSubscription: Subscription;
constructor(
private titleService: Title,
private themeService: ThemeService,
private languageService: LanguageService
) // private mockingService: MockingService
{}
private languageService: LanguageService // private mockingService: MockingService
) {}
ngOnInit(): void {
if (!environment.production) {
this.appTitle += ' [DEV]';
// TODO: to be removed
// this.mockingService.init();
}
this.titleService.setTitle(this.appTitle);
this.languageService.configureAndInitTranslations();

View File

@ -1,5 +1,8 @@
:host {
header {
nav {
padding-right: 1em;
}
.container {
padding: 0;
}

View File

@ -18,5 +18,7 @@ export class UserPollsComponent implements OnInit {
ngOnInit(): void {}
sendRetrieveEmail() {}
sendRetrieveEmail() {
alert('TODO');
}
}