]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/core/core.module.ts
Add plugin placeholder elements support
[github/Chocobozzz/PeerTube.git] / client / src / app / core / core.module.ts
index 382febe5c86aa4f8346053a02073a233ac6e0134..3152a70037579da0929d665daa8f0c1ee3ef3170 100644 (file)
@@ -1,49 +1,87 @@
-import { NgModule, Optional, SkipSelf } from '@angular/core'
+import { HotkeyModule } from 'angular2-hotkeys'
+import { MessageService } from 'primeng/api'
+import { ToastModule } from 'primeng/toast'
 import { CommonModule } from '@angular/common'
-import { HttpModule } from '@angular/http'
-import { RouterModule } from '@angular/router'
-
-import { SimpleNotificationsModule } from 'angular2-notifications'
-import { ModalModule } from 'ngx-bootstrap/modal'
-
+import { NgModule, Optional, SkipSelf } from '@angular/core'
+import { BrowserAnimationsModule } from '@angular/platform-browser/animations'
+import { PeerTubeSocket } from '@app/core/notification/peertube-socket.service'
+import { HooksService, PluginService } from '@app/core/plugins'
 import { AuthService } from './auth'
-import { ConfigService } from './config'
-import { ConfirmComponent, ConfirmService } from './confirm'
-import { MenuComponent, MenuAdminComponent } from './menu'
+import { ConfirmService } from './confirm'
+import { CheatSheetComponent } from './hotkeys'
+import { MenuService } from './menu'
 import { throwIfAlreadyLoaded } from './module-import-guard'
+import { Notifier } from './notification'
+import { HtmlRendererService, LinkifierService, MarkdownService } from './renderer'
+import { RestExtractor, RestService } from './rest'
+import { LoginGuard, RedirectService, UnloggedGuard, UserRightGuard } from './routing'
+import { CanDeactivateGuard } from './routing/can-deactivate-guard.service'
+import { ServerConfigResolver } from './routing/server-config-resolver.service'
+import { ScopedTokensService } from './scoped-tokens'
+import { ServerService } from './server'
+import { ThemeService } from './theme'
+import { UserService } from './users'
+import { LocalStorageService, ScreenService, SessionStorageService } from './wrappers'
 
 @NgModule({
   imports: [
     CommonModule,
-    HttpModule,
-    RouterModule,
+    BrowserAnimationsModule,
+
+    ToastModule,
 
-    ModalModule,
-    SimpleNotificationsModule.forRoot()
+    HotkeyModule.forRoot({
+      cheatSheetCloseEsc: true
+    })
   ],
 
   declarations: [
-    ConfirmComponent,
-    MenuComponent,
-    MenuAdminComponent
+    CheatSheetComponent
   ],
 
   exports: [
-    SimpleNotificationsModule,
+    ToastModule,
 
-    ConfirmComponent,
-    MenuComponent,
-    MenuAdminComponent
+    CheatSheetComponent
   ],
 
   providers: [
     AuthService,
+    ScopedTokensService,
     ConfirmService,
-    ConfigService
+    ServerService,
+    ThemeService,
+    MenuService,
+    LoginGuard,
+    UserRightGuard,
+    UnloggedGuard,
+
+    PluginService,
+    HooksService,
+
+    HtmlRendererService,
+    LinkifierService,
+    MarkdownService,
+
+    RestExtractor,
+    RestService,
+
+    UserService,
+
+    ScreenService,
+    LocalStorageService,
+    SessionStorageService,
+
+    RedirectService,
+    Notifier,
+    MessageService,
+    PeerTubeSocket,
+    ServerConfigResolver,
+    CanDeactivateGuard
   ]
 })
 export class CoreModule {
-  constructor ( @Optional() @SkipSelf() parentModule: CoreModule) {
+  constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
     throwIfAlreadyLoaded(parentModule, 'CoreModule')
   }
 }