mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-05-24 00:52:23 -04:00
* Refactored manga reader to use a regular image element for all cases except for split page rendering * Fixed a weird issue where ordering of routes broke redireciton in one case. * Added comments to a lot of the enums and refactored READER_MODE to be ReaderMode and much more clearer on function. * Added bookmark effect on image renderer * Implemented keyboard shortcut modal * Introduced the new layout mode into the manga reader, updated preferences, and updated bookmark to work for said functionality. Need to implement renderer now * Hooked in ability to show double pages but all the css is broken. Committing for help from Robbie. * Fixed an issue where Language tag in metadata edit wasn't being updated * Fixed up some styling on mobile for edit series detail * Some css fixes * Hooked in ability to set background color on reader (not implemented in reader). Optimized some code in ArchiveService to avoid extra memory allocations. * Hooked in background color, generated the migration * Fixed a bug when paging to cover images, full height would be used instead of full-width for cover images * New option in reader to show screen hints (on by default). You can disable in user preferences which will stop showing pagination overlay hints * Lots of fixes for double rendering mode * Bumped the amount of cached pages to 8 * Fixed an issue where dropdowns weren't being locked on form manipulation
83 lines
3.1 KiB
TypeScript
83 lines
3.1 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule } from '@angular/router';
|
|
import { LibraryDetailComponent } from './library-detail/library-detail.component';
|
|
import { SeriesDetailComponent } from './series-detail/series-detail.component';
|
|
import { RecentlyAddedComponent } from './recently-added/recently-added.component';
|
|
import { UserLoginComponent } from './user-login/user-login.component';
|
|
import { AuthGuard } from './_guards/auth.guard';
|
|
import { LibraryAccessGuard } from './_guards/library-access.guard';
|
|
import { OnDeckComponent } from './on-deck/on-deck.component';
|
|
import { DashboardComponent } from './dashboard/dashboard.component';
|
|
import { AllSeriesComponent } from './all-series/all-series.component';
|
|
import { AdminGuard } from './_guards/admin.guard';
|
|
import { ThemeTestComponent } from './theme-test/theme-test.component';
|
|
|
|
// TODO: Once we modularize the components, use this and measure performance impact: https://angular.io/guide/lazy-loading-ngmodules#preloading-modules
|
|
|
|
const routes: Routes = [
|
|
{path: '', component: UserLoginComponent},
|
|
{
|
|
path: 'admin',
|
|
canActivate: [AdminGuard],
|
|
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule)
|
|
},
|
|
{
|
|
path: 'collections',
|
|
canActivate: [AuthGuard],
|
|
loadChildren: () => import('./collections/collections.module').then(m => m.CollectionsModule)
|
|
},
|
|
{
|
|
path: 'preferences',
|
|
canActivate: [AuthGuard],
|
|
loadChildren: () => import('./user-settings/user-settings.module').then(m => m.UserSettingsModule)
|
|
},
|
|
{
|
|
path: 'lists',
|
|
canActivate: [AuthGuard],
|
|
loadChildren: () => import('./reading-list/reading-list.module').then(m => m.ReadingListModule)
|
|
},
|
|
{
|
|
path: 'registration',
|
|
loadChildren: () => import('../app/registration/registration.module').then(m => m.RegistrationModule)
|
|
},
|
|
{
|
|
path: '',
|
|
runGuardsAndResolvers: 'always',
|
|
canActivate: [AuthGuard, LibraryAccessGuard],
|
|
children: [
|
|
{path: 'library/:id', component: LibraryDetailComponent},
|
|
{path: 'library/:libraryId/series/:seriesId', component: SeriesDetailComponent},
|
|
{
|
|
path: 'library/:libraryId/series/:seriesId/manga',
|
|
loadChildren: () => import('../app/manga-reader/manga-reader.module').then(m => m.MangaReaderModule)
|
|
},
|
|
{
|
|
path: 'library/:libraryId/series/:seriesId/book',
|
|
loadChildren: () => import('../app/book-reader/book-reader.module').then(m => m.BookReaderModule)
|
|
}
|
|
]
|
|
},
|
|
{
|
|
path: '',
|
|
runGuardsAndResolvers: 'always',
|
|
canActivate: [AuthGuard],
|
|
children: [
|
|
{path: 'library', component: DashboardComponent},
|
|
{path: 'recently-added', component: RecentlyAddedComponent},
|
|
{path: 'on-deck', component: OnDeckComponent},
|
|
{path: 'all-series', component: AllSeriesComponent},
|
|
|
|
]
|
|
},
|
|
{path: 'theme', component: ThemeTestComponent},
|
|
|
|
{path: 'login', component: UserLoginComponent}, // TODO: move this to registration module
|
|
{path: '**', component: UserLoginComponent, pathMatch: 'full'}
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled'})],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|