Polish Part 3 (#2424)
This commit is contained in:
parent
a018d6828e
commit
944830ca73
62 changed files with 518 additions and 493 deletions
|
|
@ -6,22 +6,82 @@ import { AdminGuard } from './_guards/admin.guard';
|
|||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: 'admin',
|
||||
canActivate: [AdminGuard],
|
||||
loadChildren: () => import('./_routes/admin-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'preferences',
|
||||
path: '',
|
||||
canActivate: [AuthGuard],
|
||||
loadChildren: () => import('./_routes/user-settings-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'collections',
|
||||
loadChildren: () => import('./_routes/collections-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'lists',
|
||||
loadChildren: () => import('./_routes/reading-list-routing.module').then(m => m.routes)
|
||||
runGuardsAndResolvers: 'always',
|
||||
children: [
|
||||
{
|
||||
path: 'admin',
|
||||
canActivate: [AdminGuard],
|
||||
loadChildren: () => import('./_routes/admin-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'preferences',
|
||||
loadChildren: () => import('./_routes/user-settings-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'collections',
|
||||
loadChildren: () => import('./_routes/collections-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'lists',
|
||||
loadChildren: () => import('./_routes/reading-list-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'announcements',
|
||||
canActivate: [AdminGuard],
|
||||
loadChildren: () => import('./_routes/announcements-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'bookmarks',
|
||||
loadChildren: () => import('./_routes/bookmark-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'all-series',
|
||||
loadChildren: () => import('./_routes/all-series-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'all-filters',
|
||||
loadChildren: () => import('./_routes/all-filters-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'want-to-read',
|
||||
loadChildren: () => import('./_routes/want-to-read-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'home',
|
||||
loadChildren: () => import('./_routes/dashboard-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'library',
|
||||
runGuardsAndResolvers: 'always',
|
||||
canActivate: [AuthGuard, LibraryAccessGuard],
|
||||
children: [
|
||||
{
|
||||
path: ':libraryId',
|
||||
pathMatch: 'full',
|
||||
loadChildren: () => import('./_routes/library-detail-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId',
|
||||
pathMatch: 'full',
|
||||
loadComponent: () => import('../app/series-detail/_components/series-detail/series-detail.component').then(c => c.SeriesDetailComponent)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/manga',
|
||||
loadChildren: () => import('./_routes/manga-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/book',
|
||||
loadChildren: () => import('./_routes/book-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/pdf',
|
||||
loadChildren: () => import('./_routes/pdf-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: 'registration',
|
||||
|
|
@ -31,55 +91,6 @@ const routes: Routes = [
|
|||
path: 'login',
|
||||
loadChildren: () => import('./_routes/registration.router.module').then(m => m.routes) // TODO: Refactor so we just use /registration/login going forward
|
||||
},
|
||||
{
|
||||
path: 'announcements',
|
||||
loadChildren: () => import('./_routes/announcements-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'bookmarks',
|
||||
loadChildren: () => import('./_routes/bookmark-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'all-series',
|
||||
loadChildren: () => import('./_routes/all-series-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'want-to-read',
|
||||
loadChildren: () => import('./_routes/want-to-read-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'home',
|
||||
loadChildren: () => import('./_routes/dashboard-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: 'library',
|
||||
runGuardsAndResolvers: 'always',
|
||||
canActivate: [AuthGuard, LibraryAccessGuard],
|
||||
children: [
|
||||
{
|
||||
path: ':libraryId',
|
||||
pathMatch: 'full',
|
||||
loadChildren: () => import('./_routes/library-detail-routing.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId',
|
||||
pathMatch: 'full',
|
||||
loadComponent: () => import('../app/series-detail/_components/series-detail/series-detail.component').then(c => c.SeriesDetailComponent)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/manga',
|
||||
loadChildren: () => import('./_routes/manga-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/book',
|
||||
loadChildren: () => import('./_routes/book-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
{
|
||||
path: ':libraryId/series/:seriesId/pdf',
|
||||
loadChildren: () => import('./_routes/pdf-reader.router.module').then(m => m.routes)
|
||||
},
|
||||
]
|
||||
},
|
||||
{path: '**', pathMatch: 'full', redirectTo: 'home'},
|
||||
{path: 'libraries', pathMatch: 'full', redirectTo: 'home'},
|
||||
{path: '**', pathMatch: 'prefix', redirectTo: 'home'},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue