Browse Source

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

develop
Baptiste Lemoine 2 years ago
parent
commit
6059533c36
  1. 6
      src/app/app.component.html
  2. 8
      src/app/app.component.ts
  3. 3
      src/app/core/components/header/header.component.scss
  4. 4
      src/app/features/user-profile/user-polls/user-polls.component.ts

6
src/app/app.component.html

@ -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>

8
src/app/app.component.ts

@ -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();

3
src/app/core/components/header/header.component.scss

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

4
src/app/features/user-profile/user-polls/user-polls.component.ts

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

Loading…
Cancel
Save