Fix client build
authorChocobozzz <me@florianbigard.com>
Wed, 12 Sep 2018 07:52:08 +0000 (09:52 +0200)
committerChocobozzz <me@florianbigard.com>
Wed, 12 Sep 2018 07:52:08 +0000 (09:52 +0200)
client/src/app/app.module.ts
client/src/app/core/core.module.ts
client/src/app/core/hotkeys/hotkeys.component.ts
client/src/app/core/hotkeys/hotkeys.module.ts [deleted file]
client/src/app/core/hotkeys/index.ts

index e5a1883213d8337614f52628547282b2d2a384c6..34e890b40d8b4adfd91c0538298c2e9d850bf8dd 100644 (file)
@@ -5,8 +5,6 @@ import { ResetPasswordModule } from '@app/reset-password'
 
 import { MetaLoader, MetaModule, MetaStaticLoader, PageTitlePositioning } from '@ngx-meta/core'
 import { ClipboardModule } from 'ngx-clipboard'
-import { HotkeyModule } from '@app/core/hotkeys'
-import { IHotkeyOptions } from 'angular2-hotkeys'
 import 'focus-visible'
 
 import { AppRoutingModule } from './app-routing.module'
@@ -48,9 +46,6 @@ export function metaFactory (serverService: ServerService): MetaLoader {
     BrowserModule,
     // FIXME: https://github.com/maxisam/ngx-clipboard/issues/133
     ClipboardModule,
-    HotkeyModule.forRoot({
-      cheatSheetCloseEsc: true
-    } as IHotkeyOptions),
 
     CoreModule,
     SharedModule,
index d4917f902b8dd85303737048a1334408e04effa8..df2ec696d1a620f758276a4e754527e64014b2bf 100644 (file)
@@ -15,6 +15,8 @@ import { throwIfAlreadyLoaded } from './module-import-guard'
 import { LoginGuard, RedirectService, UserRightGuard } from './routing'
 import { ServerService } from './server'
 import { ThemeService } from './theme'
+import { HotkeyModule } from 'angular2-hotkeys'
+import { CheatSheetComponent } from '@app/core/hotkeys'
 
 @NgModule({
   imports: [
@@ -27,11 +29,16 @@ import { ThemeService } from './theme'
 
     LoadingBarHttpClientModule,
     LoadingBarRouterModule,
-    LoadingBarModule.forRoot()
+    LoadingBarModule.forRoot(),
+
+    HotkeyModule.forRoot({
+      cheatSheetCloseEsc: true
+    })
   ],
 
   declarations: [
-    ConfirmComponent
+    ConfirmComponent,
+    CheatSheetComponent
   ],
 
   exports: [
@@ -39,7 +46,8 @@ import { ThemeService } from './theme'
     LoadingBarHttpClientModule,
     LoadingBarModule,
 
-    ConfirmComponent
+    ConfirmComponent,
+    CheatSheetComponent
   ],
 
   providers: [
index f6f299965a82b12e7e34865feaf49777ada9bb03..fd62289fa256ea54e342554b9caa1777eb22f890 100644 (file)
@@ -9,8 +9,8 @@ import { HotkeysService, Hotkey } from 'angular2-hotkeys'
   styleUrls: [ './hotkeys.component.scss' ]
 })
 export class CheatSheetComponent implements OnInit, OnDestroy {
-  helpVisible = false
   @Input() title = this.i18n('Keyboard Shortcuts:')
+  helpVisible = false
   subscription: Subscription
 
   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 (file)
index 7d42058..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-import { NgModule, ModuleWithProviders } from '@angular/core'
-import { CommonModule } from '@angular/common'
-import { HotkeysDirective, IHotkeyOptions, HotkeyOptions, HotkeysService } from 'angular2-hotkeys'
-import { CheatSheetComponent } from './hotkeys.component'
-
-export * from './hotkeys.component'
-
-@NgModule({
-  imports : [CommonModule],
-  exports : [HotkeysDirective, CheatSheetComponent],
-  declarations : [HotkeysDirective, CheatSheetComponent]
-})
-export class HotkeyModule {
-  static forRoot (options: IHotkeyOptions = {}): ModuleWithProviders {
-    return {
-      ngModule : HotkeyModule,
-      providers : [
-        HotkeysService,
-        { provide : HotkeyOptions, useValue : options }
-      ]
-    }
-  }
-}
index 4f2796766c30e4ed33766cd71f5988cb9b7f1fd5..bd2ab5b7a9ba8ee5953d403a4c0dc049fa285e1b 100644 (file)
@@ -1 +1 @@
-export * from './hotkeys.module'
+export * from './hotkeys.component'
\ No newline at end of file