aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/core
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-09-12 09:52:08 +0200
committerChocobozzz <me@florianbigard.com>2018-09-12 09:52:08 +0200
commitbcb0c8958fa624ce815a1e2ba1b0acda0bf6aaa8 (patch)
treebe6e9a4bbb7d1aceb41d4796168bcbb4623a4a84 /client/src/app/core
parentc13e2bf340644a28012ac7ee3cf1d57763342baa (diff)
downloadPeerTube-bcb0c8958fa624ce815a1e2ba1b0acda0bf6aaa8.tar.gz
PeerTube-bcb0c8958fa624ce815a1e2ba1b0acda0bf6aaa8.tar.zst
PeerTube-bcb0c8958fa624ce815a1e2ba1b0acda0bf6aaa8.zip
Fix client build
Diffstat (limited to 'client/src/app/core')
-rw-r--r--client/src/app/core/core.module.ts14
-rw-r--r--client/src/app/core/hotkeys/hotkeys.component.ts2
-rw-r--r--client/src/app/core/hotkeys/hotkeys.module.ts23
-rw-r--r--client/src/app/core/hotkeys/index.ts2
4 files changed, 13 insertions, 28 deletions
diff --git a/client/src/app/core/core.module.ts b/client/src/app/core/core.module.ts
index d4917f902..df2ec696d 100644
--- a/client/src/app/core/core.module.ts
+++ b/client/src/app/core/core.module.ts
@@ -15,6 +15,8 @@ import { throwIfAlreadyLoaded } from './module-import-guard'
15import { LoginGuard, RedirectService, UserRightGuard } from './routing' 15import { LoginGuard, RedirectService, UserRightGuard } from './routing'
16import { ServerService } from './server' 16import { ServerService } from './server'
17import { ThemeService } from './theme' 17import { ThemeService } from './theme'
18import { HotkeyModule } from 'angular2-hotkeys'
19import { CheatSheetComponent } from '@app/core/hotkeys'
18 20
19@NgModule({ 21@NgModule({
20 imports: [ 22 imports: [
@@ -27,11 +29,16 @@ import { ThemeService } from './theme'
27 29
28 LoadingBarHttpClientModule, 30 LoadingBarHttpClientModule,
29 LoadingBarRouterModule, 31 LoadingBarRouterModule,
30 LoadingBarModule.forRoot() 32 LoadingBarModule.forRoot(),
33
34 HotkeyModule.forRoot({
35 cheatSheetCloseEsc: true
36 })
31 ], 37 ],
32 38
33 declarations: [ 39 declarations: [
34 ConfirmComponent 40 ConfirmComponent,
41 CheatSheetComponent
35 ], 42 ],
36 43
37 exports: [ 44 exports: [
@@ -39,7 +46,8 @@ import { ThemeService } from './theme'
39 LoadingBarHttpClientModule, 46 LoadingBarHttpClientModule,
40 LoadingBarModule, 47 LoadingBarModule,
41 48
42 ConfirmComponent 49 ConfirmComponent,
50 CheatSheetComponent
43 ], 51 ],
44 52
45 providers: [ 53 providers: [
diff --git a/client/src/app/core/hotkeys/hotkeys.component.ts b/client/src/app/core/hotkeys/hotkeys.component.ts
index f6f299965..fd62289fa 100644
--- a/client/src/app/core/hotkeys/hotkeys.component.ts
+++ b/client/src/app/core/hotkeys/hotkeys.component.ts
@@ -9,8 +9,8 @@ import { HotkeysService, Hotkey } from 'angular2-hotkeys'
9 styleUrls: [ './hotkeys.component.scss' ] 9 styleUrls: [ './hotkeys.component.scss' ]
10}) 10})
11export class CheatSheetComponent implements OnInit, OnDestroy { 11export class CheatSheetComponent implements OnInit, OnDestroy {
12 helpVisible = false
13 @Input() title = this.i18n('Keyboard Shortcuts:') 12 @Input() title = this.i18n('Keyboard Shortcuts:')
13 helpVisible = false
14 subscription: Subscription 14 subscription: Subscription
15 15
16 hotkeys: Hotkey[] 16 hotkeys: Hotkey[]
diff --git a/client/src/app/core/hotkeys/hotkeys.module.ts b/client/src/app/core/hotkeys/hotkeys.module.ts
deleted file mode 100644
index 7d420587e..000000000
--- a/client/src/app/core/hotkeys/hotkeys.module.ts
+++ /dev/null
@@ -1,23 +0,0 @@
1import { NgModule, ModuleWithProviders } from '@angular/core'
2import { CommonModule } from '@angular/common'
3import { HotkeysDirective, IHotkeyOptions, HotkeyOptions, HotkeysService } from 'angular2-hotkeys'
4import { CheatSheetComponent } from './hotkeys.component'
5
6export * from './hotkeys.component'
7
8@NgModule({
9 imports : [CommonModule],
10 exports : [HotkeysDirective, CheatSheetComponent],
11 declarations : [HotkeysDirective, CheatSheetComponent]
12})
13export class HotkeyModule {
14 static forRoot (options: IHotkeyOptions = {}): ModuleWithProviders {
15 return {
16 ngModule : HotkeyModule,
17 providers : [
18 HotkeysService,
19 { provide : HotkeyOptions, useValue : options }
20 ]
21 }
22 }
23}
diff --git a/client/src/app/core/hotkeys/index.ts b/client/src/app/core/hotkeys/index.ts
index 4f2796766..bd2ab5b7a 100644
--- a/client/src/app/core/hotkeys/index.ts
+++ b/client/src/app/core/hotkeys/index.ts
@@ -1 +1 @@
export * from './hotkeys.module' export * from './hotkeys.component' \ No newline at end of file