From 30f70296ba2f7b55ae9f7cc19f90f9c00833081d Mon Sep 17 00:00:00 2001 From: Romain Verger Date: Tue, 1 Mar 2022 15:31:13 +0100 Subject: [PATCH 1/4] modif app-routing-module --- src/app/app-routing.module.ts | 6 +++--- src/app/app.component.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index f4eae8e..388143a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -11,7 +11,8 @@ import { AdminPageComponent } from './pages/admin-page/admin-page.component'; import { AuthGuard } from './services/auth.guard'; const routes: Routes = [ - { path: '', redirectTo: 'home', pathMatch: 'full' }, + { path: '', redirectTo: 'signin', pathMatch: 'full' }, + {path: 'signin', component: SigninComponent}, { path: 'home', component: HomePageComponent }, { path: 'categories', component: ListCategoriesComponent }, { path: 'favoris', component: FavorisUserComponent }, @@ -19,8 +20,7 @@ const routes: Routes = [ { path: 'Deconnexion', redirectTo: 'home'}, {path: 'restaurants', canActivate: [AuthGuard], component: RestoPageComponent}, {path: 'page-not-found',component: PageNotFoundComponent}, - {path: 'signin', component: SigninComponent}, - {path: 'admin', component: AdminPageComponent}, + {path: 'admin', component: AdminPageComponent}, {path: '**', redirectTo: 'page-not-found' } ]; diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 7d60f78..33e703c 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -16,7 +16,7 @@ export class AppComponent { //console.log(e); if(e instanceof NavigationEnd){ console.log(e.url) - if (e.url == "/signin") { + if (e.url == "/") { this.dontShow = false; } else { this.dontShow = true; From 547f6aee585f1e4d1f29b04ea724f00059dcd79f Mon Sep 17 00:00:00 2001 From: Romain Verger Date: Wed, 2 Mar 2022 10:25:30 +0100 Subject: [PATCH 2/4] module deconnexion --- src/app/app.component.html | 6 +++--- src/app/footer/footer.component.html | 2 +- src/app/footer/footer.component.ts | 3 ++- .../header/components/nav-bar/nav-bar.component.html | 8 ++++---- .../header/components/nav-bar/nav-bar.component.ts | 12 +++++++++++- .../components/search-bar/search-bar.component.html | 4 ++-- .../components/search-bar/search-bar.component.ts | 4 +++- src/app/services/token.service.ts | 5 +++++ 8 files changed, 31 insertions(+), 13 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index cc2f543..a555773 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -1,4 +1,4 @@ - - + + - + diff --git a/src/app/footer/footer.component.html b/src/app/footer/footer.component.html index c0ed86d..f17079e 100644 --- a/src/app/footer/footer.component.html +++ b/src/app/footer/footer.component.html @@ -1,4 +1,4 @@ -