From 04db451cd93893519710cdabe93b0f1c557abbb5 Mon Sep 17 00:00:00 2001 From: _Bastler Date: Wed, 6 Oct 2021 12:14:47 +0200 Subject: [PATCH] top link --- src/app/app-routing.module.ts | 17 +++++++++-------- src/app/ui/main/main.ui.html | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 2f35db5..6635d3c 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -23,19 +23,20 @@ import { UiMain } from './ui/main/main.ui'; const routes: Routes = [ { path: '', component: UiMain, children: [ - { path: '', component: PageTop, canActivate: [ AuthenticatedGuard ] }, - { path: 'c/:id', component: PageComment, canActivate: [ AuthenticatedGuard ] }, - { path: 'e/:id', component: PageEntry, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/:username', component: PageUser, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/c/:username', component: PageUserComments, canActivate: [ AuthenticatedGuard ] }, - { path: 'u/e/:username', component: PageUserEntries, canActivate: [ AuthenticatedGuard ] }, + { path: '', redirectTo: "/top", pathMatch: 'full' }, + { path: 'login', component: PageLogin, canActivate: [ AnonymousGuard ] }, + { path: 'top', component: PageTop, canActivate: [ AuthenticatedGuard ] }, { path: 'hot', component: PageHot, canActivate: [ AuthenticatedGuard ] }, { path: 'last', component: PageLast, canActivate: [ AuthenticatedGuard ] }, { path: 'new', component: PageNew, canActivate: [ AuthenticatedGuard ] }, { path: 'bookmarks', component: PageBookmarks, canActivate: [ AuthenticatedGuard ] }, - { path: 'submit', component: PageSubmission, canActivate: [ AuthenticatedGuard ] }, - { path: 'login', component: PageLogin, canActivate: [ AnonymousGuard ] }, { path: 'settings', component: PageSettings, canActivate: [ AuthenticatedGuard ] }, + { path: 'submit', component: PageSubmission, canActivate: [ AuthenticatedGuard ] }, + { path: 'e/:id', component: PageEntry, canActivate: [ AuthenticatedGuard ] }, + { path: 'c/:id', component: PageComment, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/:username', component: PageUser, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/c/:username', component: PageUserComments, canActivate: [ AuthenticatedGuard ] }, + { path: 'u/e/:username', component: PageUserEntries, canActivate: [ AuthenticatedGuard ] }, { path: 'unavailable', component: PageUnavailable }, { path: '**', component: PageNotFound, pathMatch: 'full', canActivate: [ AuthUpdateGuard ] }, ] diff --git a/src/app/ui/main/main.ui.html b/src/app/ui/main/main.ui.html index 7ef1c27..28e3034 100644 --- a/src/app/ui/main/main.ui.html +++ b/src/app/ui/main/main.ui.html @@ -22,7 +22,7 @@ login {{'login' | i18n}} - + trending_up {{'page.top' | i18n}}