diff --git a/angular.json b/angular.json index 3440256d..8864f04b 100644 --- a/angular.json +++ b/angular.json @@ -28,6 +28,7 @@ "node_modules/primeicons/primeicons.css", "node_modules/primeng/resources/themes/nova-light/theme.css", "node_modules/primeng/resources/primeng.min.css", + "node_modules/primeflex/primeflex.css", "src/styles.scss" ], "scripts": [ diff --git a/package.json b/package.json index eea091af..3bcda40e 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "ngx-clipboard": "^13.0.0", "ngx-markdown": "^9.0.0", "ngx-webstorage": "^5.0.0", + "primeflex": "^1.0.0", "primeicons": "^2.0.0", "primeng": "^9.0.6", "quill": "^1.3.7", @@ -67,12 +68,12 @@ "@types/uuid": "^7.0.2", "@typescript-eslint/eslint-plugin": "^2.27.0", "@typescript-eslint/parser": "^2.27.0", - "babel-jest": "^25.4.0", + "babel-jest": "^26.0.0", "eslint": "^6.8.0", "eslint-config-prettier": "^6.11.0", "eslint-plugin-prettier": "^3.1.3", "husky": "^4.2.5", - "jest": "^25.5.1", + "jest": "^26.0.0", "jest-environment-jsdom-sixteen": "^1.0.3", "jest-preset-angular": "^8.1.3", "lint-staged": "^10.1.7", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 93f2c91c..ca478a7f 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -2,12 +2,10 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { HomeComponent } from './core/components/home/home.component'; -import { LoginComponent } from './core/components/login/login.component'; import { PageNotFoundComponent } from './shared/components/page-not-found/page-not-found.component'; const routes: Routes = [ { path: '', component: HomeComponent }, - { path: 'login', component: LoginComponent }, { path: 'administration', loadChildren: () => diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8cd65e6f..0059d36d 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -5,6 +5,8 @@ import { Subscription } from 'rxjs'; import { environment } from '../environments/environment'; import { Theme } from './core/enums/theme.enum'; import { UserRole } from './core/enums/user-role.enum'; +import { User } from './core/models/user.model'; +import { LanguageService } from './core/services/language.service'; import { MockingService } from './core/services/mocking.service'; import { ThemeService } from './core/services/theme.service'; @@ -22,15 +24,18 @@ export class AppComponent implements OnInit, OnDestroy { constructor( private titleService: Title, private themeService: ThemeService, + private languageService: LanguageService, private mockingService: MockingService ) {} ngOnInit(): void { if (!environment.production) { this.appTitle += ' [DEV]'; - this.mockingService.loadUser(UserRole.REGISTERED); + // TODO: to be removed + this.mockingService.loadUser(new User('TOTO', 'toto@gafam.com', UserRole.REGISTERED, false)); } this.titleService.setTitle(this.appTitle); + this.languageService.configureAndInitTranslations(); this.themeSubscription = this.themeService.theme.subscribe((theme: Theme) => { switch (theme) { case Theme.DARK: diff --git a/src/app/core/components/header/header.component.html b/src/app/core/components/header/header.component.html index c5a76c78..ffc65486 100644 --- a/src/app/core/components/header/header.component.html +++ b/src/app/core/components/header/header.component.html @@ -40,8 +40,12 @@ Administration - - Participation + + Participation à citron_ou_orange Old stuff @@ -50,22 +54,14 @@ - - -