]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/app/core/core.module.ts
Fix notification socket
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
CommitLineData
df98563e 1import { CommonModule } from '@angular/common'
78967fca 2import { NgModule, Optional, SkipSelf } from '@angular/core'
1f30a185 3import { FormsModule } from '@angular/forms'
e7dbeae8 4import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
78967fca 5import { RouterModule } from '@angular/router'
68e24d72
C
6import { LoadingBarModule } from '@ngx-loading-bar/core'
7import { LoadingBarHttpClientModule } from '@ngx-loading-bar/http-client'
998acc22 8import { LoadingBarRouterModule } from '@ngx-loading-bar/router'
693b1aba 9
954605a8 10import { AuthService } from './auth'
df98563e 11import { ConfirmComponent, ConfirmService } from './confirm'
df98563e 12import { throwIfAlreadyLoaded } from './module-import-guard'
901637bb 13import { LoginGuard, RedirectService, UserRightGuard } from './routing'
78967fca 14import { ServerService } from './server'
1a00c561 15import { ThemeService } from './theme'
bcb0c895 16import { HotkeyModule } from 'angular2-hotkeys'
f8b2c1b4
C
17import { CheatSheetComponent } from './hotkeys'
18import { ToastModule } from 'primeng/toast'
19import { Notifier } from './notification'
20import { MessageService } from 'primeng/api'
9a39392a 21import { UserNotificationSocket } from '@app/core/notification/user-notification-socket.service'
693b1aba
C
22
23@NgModule({
24 imports: [
25 CommonModule,
7ddd02c9 26 RouterModule,
1f30a185 27 FormsModule,
e7dbeae8 28 BrowserAnimationsModule,
7ddd02c9 29
68e24d72 30 LoadingBarHttpClientModule,
998acc22 31 LoadingBarRouterModule,
06471769 32 LoadingBarModule,
f8b2c1b4 33 ToastModule,
bcb0c895
C
34
35 HotkeyModule.forRoot({
36 cheatSheetCloseEsc: true
37 })
693b1aba 38 ],
5769e1db 39
b99290b1 40 declarations: [
bcb0c895
C
41 ConfirmComponent,
42 CheatSheetComponent
b99290b1 43 ],
5769e1db 44
b99290b1 45 exports: [
68e24d72
C
46 LoadingBarHttpClientModule,
47 LoadingBarModule,
7ddd02c9 48
f8b2c1b4
C
49 ToastModule,
50
bcb0c895
C
51 ConfirmComponent,
52 CheatSheetComponent
b99290b1 53 ],
5769e1db
C
54
55 providers: [
56 AuthService,
92fb909c 57 ConfirmService,
f47bf2e1 58 ServerService,
1a00c561 59 ThemeService,
954605a8 60 LoginGuard,
901637bb 61 UserRightGuard,
f8b2c1b4
C
62 RedirectService,
63 Notifier,
9a39392a
C
64 MessageService,
65 UserNotificationSocket
5769e1db 66 ]
693b1aba
C
67})
68export class CoreModule {
7a8032bb 69 constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
df98563e 70 throwIfAlreadyLoaded(parentModule, 'CoreModule')
693b1aba
C
71 }
72}