
* Updated ngx-virtual-scroller * Removed the karma test config as it's breaking migration * Reverted to pre angular 15 * Upgraded packages and reverted target to ES6 for older devices * It's broken. Need to also find the safari version for old Ipads * Fixes some code in default pipe and many updates to packages. Removed support for old iOS versions as it restricted Kavita from using newer features. Build still broken. * More progress in getting build working on Angular 15. Removed polyfills.ts for new angular config * Remove all.css for icons and use scss instead * Removed stuff that isn't needed * Migrated extended linting to eslint, ran on project and updated issues. Removed a duplicate component that did nothing. Fixed a few places where lifecycle hooks werent being called as interface wasn't implemented. * App builds correctly. Source maps are still needed. * Fixed source maps and removed more testing stuff. I will re-add later in another release when I figure out how to properly tackle dependencies on backend. * Reverted back to old source map definition
50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
import { BrowserModule, Title } from '@angular/platform-browser';
|
|
import { NgModule } from '@angular/core';
|
|
|
|
import { AppRoutingModule } from './app-routing.module';
|
|
import { AppComponent } from './app.component';
|
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
|
import { JwtInterceptor } from './_interceptors/jwt.interceptor';
|
|
import { ToastrModule } from 'ngx-toastr';
|
|
import { ErrorInterceptor } from './_interceptors/error.interceptor';
|
|
|
|
import { SAVER, getSaver } from './shared/_providers/saver.provider';
|
|
import { SidenavModule } from './sidenav/sidenav.module';
|
|
import { NavModule } from './nav/nav.module';
|
|
|
|
|
|
|
|
// Disable Web Animations if the user's browser (such as iOS 12.5.5) does not support this.
|
|
const disableAnimations = !('animate' in document.documentElement);
|
|
if (disableAnimations) console.error("Web Animations have been disabled as your current browser does not support this.");
|
|
|
|
|
|
@NgModule({
|
|
declarations: [
|
|
AppComponent,
|
|
],
|
|
imports: [
|
|
HttpClientModule,
|
|
BrowserModule,
|
|
AppRoutingModule,
|
|
BrowserAnimationsModule.withConfig({ disableAnimations }),
|
|
SidenavModule,
|
|
NavModule,
|
|
ToastrModule.forRoot({
|
|
positionClass: 'toast-bottom-right',
|
|
preventDuplicates: true,
|
|
timeOut: 6000,
|
|
countDuplicates: true,
|
|
autoDismiss: true
|
|
}),
|
|
],
|
|
providers: [
|
|
{ provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
|
|
{ provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
|
|
Title,
|
|
{ provide: SAVER, useFactory: getSaver },
|
|
],
|
|
bootstrap: [AppComponent]
|
|
})
|
|
export class AppModule { }
|