X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fcore%2Fcore.module.ts;h=4a4c2321b5e0d870375603b5ae372754b69cd52e;hb=9c931cf0bb162aa4733584be96107cdcd922d308;hp=163a6bbde9e5299084733057bc7d5103ab8364af;hpb=f47bf2e142b0b22460558e23720f5aed8deb982c;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts index 163a6bbde..4a4c2321b 100644 --- a/client/src/app/core/core.module.ts +++ b/client/src/app/core/core.module.ts @@ -1,52 +1,107 @@ -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 { NgModule, Optional, SkipSelf } from '@angular/core' import { BrowserAnimationsModule } from '@angular/platform-browser/animations' - -import { SimpleNotificationsModule } from 'angular2-notifications' -import { ModalModule } from 'ngx-bootstrap/modal' - -import { AuthService, LoginGuard } from './auth' -import { ServerService } from './server' -import { ConfirmComponent, ConfirmService } from './confirm' -import { MenuComponent, MenuAdminComponent } from './menu' +import { PeerTubeSocket } from '@app/core/notification/peertube-socket.service' +import { HooksService, PluginService } from '@app/core/plugins' +import { AuthService } from './auth' +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 { + HomepageRedirectComponent, + LoginGuard, + MetaGuard, + MetaService, + PeerTubeRouterService, + RedirectService, + ScrollService, + 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 { UserLocalStorageService, UserService } from './users' +import { LocalStorageService, ScreenService, SessionStorageService } from './wrappers' @NgModule({ imports: [ CommonModule, - HttpModule, - RouterModule, BrowserAnimationsModule, - ModalModule, - SimpleNotificationsModule.forRoot() + ToastModule, + + HotkeyModule.forRoot({ + cheatSheetCloseEsc: true, + cheatSheetDescription: $localize`Show/hide this help menu`, + cheatSheetCloseEscDescription: $localize`Hide this help menu` + }) ], declarations: [ - ConfirmComponent, - MenuComponent, - MenuAdminComponent + CheatSheetComponent, + HomepageRedirectComponent ], exports: [ - SimpleNotificationsModule, + ToastModule, - ConfirmComponent, - MenuComponent, - MenuAdminComponent + CheatSheetComponent, + HomepageRedirectComponent ], providers: [ AuthService, + ScopedTokensService, ConfirmService, ServerService, - LoginGuard + ThemeService, + MenuService, + LoginGuard, + UserRightGuard, + UnloggedGuard, + + PluginService, + HooksService, + + HtmlRendererService, + LinkifierService, + MarkdownService, + + RestExtractor, + RestService, + + UserService, + UserLocalStorageService, + + ScreenService, + LocalStorageService, + SessionStorageService, + + RedirectService, + Notifier, + MessageService, + PeerTubeSocket, + ServerConfigResolver, + CanDeactivateGuard, + PeerTubeRouterService, + ScrollService, + + MetaService, + MetaGuard ] }) export class CoreModule { - constructor ( @Optional() @SkipSelf() parentModule: CoreModule) { + constructor (@Optional() @SkipSelf() parentModule: CoreModule) { throwIfAlreadyLoaded(parentModule, 'CoreModule') } }