WIP: Create settings tab
This commit is contained in:
@@ -1,23 +1,28 @@
|
||||
import { Routes } from '@angular/router';
|
||||
import { PdfViewerComponent } from './book/components/pdf-viewer/pdf-viewer.component';
|
||||
import { BookBrowserComponent } from './book/components/book-browser/book-browser.component';
|
||||
import { MainDashboardComponent } from './dashboard/components/main-dashboard/main-dashboard.component';
|
||||
import { AppLayoutComponent } from './layout/component/layout-main/app.layout.component';
|
||||
import { EpubViewerComponent } from './epub-viewer/component/epub-viewer.component';
|
||||
import { SettingsComponent } from './core/component/settings/settings.component';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { AuthGuard } from './auth.guard';
|
||||
import {Routes} from '@angular/router';
|
||||
import {BookBrowserComponent} from './book/components/book-browser/book-browser.component';
|
||||
import {MainDashboardComponent} from './dashboard/components/main-dashboard/main-dashboard.component';
|
||||
import {AppLayoutComponent} from './layout/component/layout-main/app.layout.component';
|
||||
import {LoginComponent} from './login/login.component';
|
||||
import {AuthGuard} from './auth.guard';
|
||||
import {SettingsComponent} from './core/component/settings/settings.component';
|
||||
import {PdfViewerComponent} from './book/components/pdf-viewer/pdf-viewer.component';
|
||||
import {EpubViewerComponent} from './epub-viewer/component/epub-viewer.component';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'dashboard',
|
||||
pathMatch: 'full'
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
component: AppLayoutComponent,
|
||||
children: [
|
||||
{ path: '', component: MainDashboardComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'all-books', component: BookBrowserComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'settings', component: SettingsComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'library/:libraryId/books', component: BookBrowserComponent, canActivate: [AuthGuard] },
|
||||
{ path: 'shelf/:shelfId/books', component: BookBrowserComponent, canActivate: [AuthGuard] },
|
||||
{path: 'dashboard', component: MainDashboardComponent, canActivate: [AuthGuard]},
|
||||
{path: 'all-books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'settings', component: SettingsComponent, canActivate: [AuthGuard]},
|
||||
{path: 'library/:libraryId/books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
{path: 'shelf/:shelfId/books', component: BookBrowserComponent, canActivate: [AuthGuard]},
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -30,6 +35,6 @@ export const routes: Routes = [
|
||||
component: EpubViewerComponent,
|
||||
canActivate: [AuthGuard]
|
||||
},
|
||||
{ path: 'login', component: LoginComponent },
|
||||
{ path: '**', redirectTo: 'login', pathMatch: 'full' }
|
||||
{path: 'login', component: LoginComponent},
|
||||
{path: '**', redirectTo: 'login', pathMatch: 'full'}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user