]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame_incremental - client/src/app/core/core.module.ts
Client calls revoke-token endpoint on logout
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
... / ...
CommitLineData
1import { CommonModule } from '@angular/common'
2import { NgModule, Optional, SkipSelf } from '@angular/core'
3import { FormsModule } from '@angular/forms'
4import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
5import { RouterModule } from '@angular/router'
6import { LoadingBarModule } from '@ngx-loading-bar/core'
7import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
8import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
9
10import { AuthService } from './auth'
11import { ConfirmService } from './confirm'
12import { throwIfAlreadyLoaded } from './module-import-guard'
13import { LoginGuard, RedirectService, UserRightGuard } from './routing'
14import { ServerService } from './server'
15import { ThemeService } from './theme'
16import { MenuService } from './menu'
17import { HotkeyModule } from 'angular2-hotkeys'
18import { CheatSheetComponent } from './hotkeys'
19import { ToastModule } from 'primeng/toast'
20import { Notifier } from './notification'
21import { MessageService } from 'primeng/api'
22import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
23import { ServerConfigResolver } from './routing/server-config-resolver.service'
24import { UnloggedGuard } from '@app/core/routing/unlogged-guard.service'
25import { PluginService } from '@app/core/plugins/plugin.service'
26import { HooksService } from '@app/core/plugins/hooks.service'
27
28@NgModule({
29 imports: [
30 CommonModule,
31 RouterModule,
32 FormsModule,
33 BrowserAnimationsModule,
34
35 LoadingBarHttpClientModule,
36 LoadingBarRouterModule,
37 LoadingBarModule,
38 ToastModule,
39
40 HotkeyModule.forRoot({
41 cheatSheetCloseEsc: true
42 })
43 ],
44
45 declarations: [
46 CheatSheetComponent
47 ],
48
49 exports: [
50 LoadingBarHttpClientModule,
51 LoadingBarModule,
52
53 ToastModule,
54
55 CheatSheetComponent
56 ],
57
58 providers: [
59 AuthService,
60 ConfirmService,
61 ServerService,
62 ThemeService,
63 MenuService,
64 LoginGuard,
65 UserRightGuard,
66 UnloggedGuard,
67
68 PluginService,
69 HooksService,
70
71 RedirectService,
72 Notifier,
73 MessageService,
74 UserNotificationSocket,
75 ServerConfigResolver
76 ]
77})
78export class CoreModule {
79 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
80 throwIfAlreadyLoaded(parentModule, 'CoreModule')
81 }
82}