refactor(frontend): decouple app shell from PrimeNG layout system (#307)
* refactor(layout): decouple shell from PrimeNG * fix(frontend): review fixes for layout decoupling - Rewrite layout service spec to match new API surface - Remove dead ToastModule import from AppLayoutComponent - Add missing type="button" to profile and logout buttons - Add missing i18n keys to all non-English locales * chore(frontend): Layout shell consistency * chore(frontend): shell and routing improvements * chore(frontend): remove stray shimmer effect * chore(frontend): code cleanup * chore(ui): Fix navitem types consistency * chore(frontend): simplify layout structure + imports * chore(frontend): remove empty files * chore(frontend): Menu component cleanup * chore(frontend): remove nav translation layer * chore(frontend): revert stray artwork change * chore(frontend): revert author animation tweak * chore(frontend): review fixes * fix(frontend): restore topbar template after rebase conflict
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import {Routes} from '@angular/router';
|
||||
import {BookBrowserComponent} from './features/book/components/book-browser/book-browser.component';
|
||||
import {AppLayoutComponent} from './shared/layout/component/layout-main/app.layout.component';
|
||||
import {AppLayoutComponent} from './shared/layout/layout-main/app.layout.component';
|
||||
import {LoginComponent} from './shared/components/login/login.component';
|
||||
import {AuthGuard} from './core/security/auth.guard';
|
||||
import {ChangePasswordComponent} from './shared/components/change-password/change-password.component';
|
||||
@@ -16,6 +15,9 @@ import {LibraryStatsGuard} from './core/security/guards/library-stats.guard';
|
||||
import {UserStatsGuard} from './core/security/guards/user-stats.guard';
|
||||
import {EditMetadataGuard} from './core/security/guards/edit-metdata.guard';
|
||||
|
||||
const loadBookBrowserComponent = () =>
|
||||
import('./features/book/components/book-browser/book-browser.component').then(m => m.BookBrowserComponent);
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
@@ -34,16 +36,16 @@ export const routes: Routes = [
|
||||
component: AppLayoutComponent,
|
||||
children: [
|
||||
{path: 'dashboard', component: MainDashboardComponent, canActivate: [AuthGuard]},
|
||||
{path: 'all-books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'all-books', loadComponent: loadBookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'settings', loadComponent: () => import('./features/settings/settings.component').then(m => m.SettingsComponent), canActivate: [AuthGuard]},
|
||||
{path: 'library/:libraryId/books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'shelf/:shelfId/books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'unshelved-books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'library/:libraryId/books', loadComponent: loadBookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'shelf/:shelfId/books', loadComponent: loadBookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'unshelved-books', loadComponent: loadBookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'series', loadComponent: () => import('./features/series-browser/components/series-browser/series-browser.component').then(m => m.SeriesBrowserComponent), canActivate: [AuthGuard]},
|
||||
{path: 'series/:seriesName', loadComponent: () => import('./features/book/components/series-page/series-page.component').then(m => m.SeriesPageComponent), canActivate: [AuthGuard]},
|
||||
{path: 'authors', loadComponent: () => import('./features/author-browser/components/author-browser/author-browser.component').then(m => m.AuthorBrowserComponent), canActivate: [AuthGuard]},
|
||||
{path: 'author/:authorId', loadComponent: () => import('./features/author-browser/components/author-detail/author-detail.component').then(m => m.AuthorDetailComponent), canActivate: [AuthGuard]},
|
||||
{path: 'magic-shelf/:magicShelfId/books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'magic-shelf/:magicShelfId/books', loadComponent: loadBookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'book/:bookId', loadComponent: () => import('./features/metadata/component/book-metadata-center/book-metadata-center.component').then(m => m.BookMetadataCenterComponent), canActivate: [AuthGuard]},
|
||||
{path: 'bookdrop', loadComponent: () => import('./features/bookdrop/component/bookdrop-file-review/bookdrop-file-review.component').then(m => m.BookdropFileReviewComponent), canActivate: [BookdropGuard]},
|
||||
{path: 'metadata-manager', loadComponent: () => import('./features/metadata/component/metadata-manager/metadata-manager.component').then(m => m.MetadataManagerComponent), canActivate: [EditMetadataGuard]},
|
||||
|
||||
Reference in New Issue
Block a user