diff --git a/electron/src/app.module.ts b/electron/src/app.module.ts index 68d01baf..dba59920 100644 --- a/electron/src/app.module.ts +++ b/electron/src/app.module.ts @@ -11,6 +11,7 @@ import { DragulaModule } from 'ng2-dragula/ng2-dragula'; import { Select2Module } from 'ng2-select2/ng2-select2'; import { MissingDeviceComponent } from './components/missing-device/missing-device.component'; +import { UhkMessageComponent } from './components/uhk-message'; import { AddOnComponent } from './shared/components/add-on'; import { KeyboardSliderComponent } from './shared/components/keyboard/slider'; import { KeymapAddComponent, KeymapHeaderComponent } from './shared/components/keymap'; @@ -140,6 +141,7 @@ const storeConfig = { SettingsComponent, KeyboardSliderComponent, MissingDeviceComponent, + UhkMessageComponent, CancelableDirective ], imports: [ diff --git a/electron/src/components/missing-device/missing-device.component.html b/electron/src/components/missing-device/missing-device.component.html index 55a0fef0..7e3389f6 100644 --- a/electron/src/components/missing-device/missing-device.component.html +++ b/electron/src/components/missing-device/missing-device.component.html @@ -1,7 +1 @@ - - - - Cannot find your UHK - Please plug it in! - - + diff --git a/electron/src/components/missing-device/missing-device.component.ts b/electron/src/components/missing-device/missing-device.component.ts index 14a9ed77..b0dd9b8e 100644 --- a/electron/src/components/missing-device/missing-device.component.ts +++ b/electron/src/components/missing-device/missing-device.component.ts @@ -10,8 +10,7 @@ import { UhkDeviceService } from './../../services/uhk-device.service'; @Component({ selector: 'missing-device', - templateUrl: 'missing-device.component.html', - styleUrls: ['missing-device.component.scss'] + templateUrl: 'missing-device.component.html' }) export class MissingDeviceComponent { diff --git a/electron/src/components/uhk-message/index.ts b/electron/src/components/uhk-message/index.ts new file mode 100644 index 00000000..5fec31d5 --- /dev/null +++ b/electron/src/components/uhk-message/index.ts @@ -0,0 +1 @@ +export * from './uhk-message.component'; diff --git a/electron/src/components/uhk-message/uhk-message.component.html b/electron/src/components/uhk-message/uhk-message.component.html new file mode 100644 index 00000000..69a7a911 --- /dev/null +++ b/electron/src/components/uhk-message/uhk-message.component.html @@ -0,0 +1,7 @@ + + + + {{ title }} + {{ subtitle }} + + diff --git a/electron/src/components/missing-device/missing-device.component.scss b/electron/src/components/uhk-message/uhk-message.component.scss similarity index 89% rename from electron/src/components/missing-device/missing-device.component.scss rename to electron/src/components/uhk-message/uhk-message.component.scss index 3a204fa2..bfcaeac4 100644 --- a/electron/src/components/missing-device/missing-device.component.scss +++ b/electron/src/components/uhk-message/uhk-message.component.scss @@ -1,4 +1,4 @@ -.missing-device-wrapper { +.uhk-message-wrapper { display: flex; height: 100%; align-items: center; diff --git a/electron/src/components/uhk-message/uhk-message.component.ts b/electron/src/components/uhk-message/uhk-message.component.ts new file mode 100644 index 00000000..3958b2fc --- /dev/null +++ b/electron/src/components/uhk-message/uhk-message.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit, Input, ChangeDetectionStrategy } from '@angular/core'; + +@Component({ + selector: 'uhk-message', + templateUrl: 'uhk-message.component.html', + styleUrls: ['uhk-message.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush +}) +export class UhkMessageComponent { + @Input() title: string; + @Input() subtitle: string; +}