mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-04-11 19:51:47 -04:00
* Refactored all the code that opens the reader to use a unified function. Added new library and setup basic pdf reader route. * Progress saving is implemented. Targeting ES6 now. * Customized the toolbar to remove things we don't want, made the download button download with correct filename. Adjusted zoom setting to work well on first load regardless of device. * Stream the pdf file to the UI rather than handling the download ourselves. * Started implementing a custom toolbar. * Fixed up the jump bar calculations * Fixed filtering being broken * Pushing up for Robbie to cleanup the toolbar layout * Added an additional button. Working on logic while robbie takes styling * Tried to fix the code for robbie * Tweaks for fonts * Added button for book mode, but doesn't seem to work after renderer is built * Removed book mode * Removed the old image caching code for pdfs as it's not needed with new reader * Removed the interfaces to extract images from pdf. * Fixed original pagination area not scaling correctly * Integrated series remove events to library detail * Cleaned up the getter naming convention * Cleaned up some of the manga reader code to reduce cluter and improve re-use * Implemented Japanese parser support for volume and chapters. * Fixed a bug where resetting scroll in manga reader wasn't working * Fixed a bug where word count grew on each scan. * Removed unused variable * Ensure we calculate word count on files with their own cache timestamp * Adjusted size of reel headers * Put some code in for moving on original image with keyboard, but it's not in use. * Cleaned up the css for the pdf reader * Cleaned up the code * Tweaked the list item so we show scrollbar now when fully read
88 lines
3.1 KiB
TypeScript
88 lines
3.1 KiB
TypeScript
import { NgModule } from '@angular/core';
|
|
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
|
|
import { AuthGuard } from './_guards/auth.guard';
|
|
import { LibraryAccessGuard } from './_guards/library-access.guard';
|
|
import { AdminGuard } from './_guards/admin.guard';
|
|
|
|
const routes: Routes = [
|
|
{
|
|
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: 'announcements',
|
|
loadChildren: () => import('../app/announcements/announcements.module').then(m => m.AnnouncementsModule)
|
|
},
|
|
{
|
|
path: 'bookmarks',
|
|
loadChildren: () => import('../app/bookmark/bookmark.module').then(m => m.BookmarkModule)
|
|
},
|
|
{
|
|
path: 'all-series',
|
|
loadChildren: () => import('../app/all-series/all-series.module').then(m => m.AllSeriesModule)
|
|
},
|
|
{
|
|
path: 'libraries',
|
|
loadChildren: () => import('../app/dashboard/dashboard.module').then(m => m.DashboardModule)
|
|
},
|
|
{
|
|
path: 'library',
|
|
runGuardsAndResolvers: 'always',
|
|
canActivate: [AuthGuard, LibraryAccessGuard],
|
|
children: [
|
|
{
|
|
path: ':libraryId',
|
|
pathMatch: 'full',
|
|
loadChildren: () => import('../app/library-detail/library-detail.module').then(m => m.LibraryDetailModule)
|
|
},
|
|
{
|
|
path: ':libraryId/series/:seriesId',
|
|
pathMatch: 'full',
|
|
loadChildren: () => import('../app/series-detail/series-detail.module').then(m => m.SeriesDetailModule)
|
|
},
|
|
{
|
|
path: ':libraryId/series/:seriesId/manga',
|
|
loadChildren: () => import('../app/manga-reader/manga-reader.module').then(m => m.MangaReaderModule)
|
|
},
|
|
{
|
|
path: ':libraryId/series/:seriesId/book',
|
|
loadChildren: () => import('../app/book-reader/book-reader.module').then(m => m.BookReaderModule)
|
|
},
|
|
{
|
|
path: ':libraryId/series/:seriesId/pdf',
|
|
loadChildren: () => import('../app/pdf-reader/pdf-reader.module').then(m => m.PdfReaderModule)
|
|
},
|
|
]
|
|
},
|
|
{path: 'login', loadChildren: () => import('../app/registration/registration.module').then(m => m.RegistrationModule)},
|
|
//{path: '', pathMatch: 'full', redirectTo: 'login'}, // This shouldn't be needed
|
|
{path: '**', pathMatch: 'full', redirectTo: 'libraries'},
|
|
{path: '**', pathMatch: 'prefix', redirectTo: 'libraries'},
|
|
];
|
|
|
|
@NgModule({
|
|
imports: [RouterModule.forRoot(routes, {scrollPositionRestoration: 'enabled', preloadingStrategy: PreloadAllModules})],
|
|
exports: [RouterModule]
|
|
})
|
|
export class AppRoutingModule { }
|