1
0
Fork 0
peertube/client/src/app/core/core.module.ts

108 lines
2.7 KiB
TypeScript
Raw Normal View History

2020-06-23 12:10:17 +00:00
import { HotkeyModule } from 'angular2-hotkeys'
import { MessageService } from 'primeng/api'
import { ToastModule } from 'primeng/toast'
import { CommonModule } from '@angular/common'
2018-02-22 13:15:23 +00:00
import { NgModule, Optional, SkipSelf } from '@angular/core'
2017-08-28 18:28:12 +00:00
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 { ConfirmService } from './confirm'
2020-06-23 12:10:17 +00:00
import { CheatSheetComponent } from './hotkeys'
import { MenuService } from './menu'
import { throwIfAlreadyLoaded } from './module-import-guard'
2020-06-23 12:10:17 +00:00
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'
2020-06-23 12:10:17 +00:00
import { CanDeactivateGuard } from './routing/can-deactivate-guard.service'
import { ServerConfigResolver } from './routing/server-config-resolver.service'
2021-01-13 10:29:55 +00:00
import { ScopedTokensService } from './scoped-tokens'
2018-02-22 13:15:23 +00:00
import { ServerService } from './server'
2018-09-06 10:00:53 +00:00
import { ThemeService } from './theme'
import { UserLocalStorageService, UserService } from './users'
2020-06-23 12:10:17 +00:00
import { LocalStorageService, ScreenService, SessionStorageService } from './wrappers'
2016-11-20 16:18:15 +00:00
@NgModule({
imports: [
CommonModule,
2017-08-28 18:28:12 +00:00
BrowserAnimationsModule,
ToastModule,
2018-09-12 07:52:08 +00:00
HotkeyModule.forRoot({
2022-05-25 13:39:10 +00:00
cheatSheetCloseEsc: true,
cheatSheetDescription: $localize`Show/hide this help menu`,
cheatSheetCloseEscDescription: $localize`Hide this help menu`
2018-09-12 07:52:08 +00:00
})
2016-11-20 16:18:15 +00:00
],
2017-01-23 21:32:43 +00:00
declarations: [
2021-06-04 12:39:47 +00:00
CheatSheetComponent,
HomepageRedirectComponent
2017-01-23 21:32:43 +00:00
],
2017-01-23 21:32:43 +00:00
exports: [
ToastModule,
2021-06-04 12:39:47 +00:00
CheatSheetComponent,
HomepageRedirectComponent
2017-01-23 21:32:43 +00:00
],
providers: [
AuthService,
2020-11-09 15:25:27 +00:00
ScopedTokensService,
2017-04-04 19:37:03 +00:00
ConfirmService,
ServerService,
2018-09-06 10:00:53 +00:00
ThemeService,
MenuService,
LoginGuard,
2018-03-01 12:57:29 +00:00
UserRightGuard,
2019-05-29 12:39:49 +00:00
UnloggedGuard,
2019-07-08 13:54:08 +00:00
PluginService,
2019-07-22 13:40:13 +00:00
HooksService,
2019-07-08 13:54:08 +00:00
2020-06-23 12:10:17 +00:00
HtmlRendererService,
LinkifierService,
MarkdownService,
RestExtractor,
RestService,
UserService,
UserLocalStorageService,
2020-06-23 12:10:17 +00:00
ScreenService,
LocalStorageService,
SessionStorageService,
RedirectService,
Notifier,
MessageService,
PeerTubeSocket,
2020-06-23 12:10:17 +00:00
ServerConfigResolver,
2021-05-14 14:12:45 +00:00
CanDeactivateGuard,
PeerTubeRouterService,
ScrollService,
2021-05-14 14:12:45 +00:00
MetaService,
MetaGuard
]
2016-11-20 16:18:15 +00:00
})
export class CoreModule {
2017-10-31 15:37:37 +00:00
constructor (@Optional() @SkipSelf() parentModule: CoreModule) {
throwIfAlreadyLoaded(parentModule, 'CoreModule')
2016-11-20 16:18:15 +00:00
}
}