2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-15 18:13:00 +00:00
RTL/src/app/app.module.ts

62 lines
2.5 KiB
TypeScript
Raw Normal View History

2021-08-28 21:03:18 +00:00
import { HammerModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
2021-12-29 23:08:41 +00:00
import { LayoutModule } from '@angular/cdk/layout';
import { StoreModule } from '@ngrx/store';
import { EffectsModule } from '@ngrx/effects';
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
import { UserIdleModule } from 'angular-user-idle';
import { routing } from './app.routing';
import { SharedModule } from './shared/shared.module';
2019-08-12 01:57:49 +00:00
import { AppComponent } from './app.component';
import { environment } from '../environments/environment';
import { AuthGuard } from './shared/services/auth.guard';
import { AuthInterceptor } from './shared/services/auth.interceptor';
import { SessionService } from './shared/services/session.service';
import { LoopService } from './shared/services/loop.service';
import { DataService } from './shared/services/data.service';
2021-12-29 23:08:41 +00:00
import { WebSocketClientService } from './shared/services/web-socket.service';
import { CommonService } from './shared/services/common.service';
import { BoltzService } from './shared/services/boltz.service';
import { RTLEffects } from './store/rtl.effects';
import { LNDEffects } from './lnd/store/lnd.effects';
import { CLNEffects } from './cln/store/cln.effects';
import { ECLEffects } from './eclair/store/ecl.effects';
2021-12-29 23:08:41 +00:00
import { RootReducer } from './store/rtl.reducers';
import { LNDReducer } from './lnd/store/lnd.reducers';
import { CLNReducer } from './cln/store/cln.reducers';
2021-12-29 23:08:41 +00:00
import { ECLReducer } from './eclair/store/ecl.reducers';
@NgModule({
imports: [
BrowserAnimationsModule,
SharedModule,
routing,
LayoutModule,
HammerModule,
2021-08-28 21:03:18 +00:00
UserIdleModule.forRoot({ idle: 3590, timeout: 10, ping: 12000 }), // One hour
2021-12-29 23:08:41 +00:00
StoreModule.forRoot(
{ root: RootReducer, lnd: LNDReducer, cln: CLNReducer, ecl: ECLReducer },
2021-12-29 23:08:41 +00:00
{
runtimeChecks: {
strictStateImmutability: false,
strictActionImmutability: false
}
}),
EffectsModule.forRoot([RTLEffects, LNDEffects, CLNEffects, ECLEffects]),
!environment.production ? StoreDevtoolsModule.instrument() : []
],
declarations: [AppComponent],
providers: [
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
2021-12-29 23:08:41 +00:00
AuthGuard, SessionService, DataService, WebSocketClientService, LoopService, CommonService, BoltzService
],
bootstrap: [AppComponent]
})
2021-12-29 23:08:41 +00:00
export class AppModule { }