refactor: Create uhk-header component (#354)
Create a header wrapper component that will contains the undo notification component.
This commit is contained in:
committed by
László Monda
parent
3b0540f0d4
commit
131fdea0c5
@@ -105,7 +105,8 @@ import { ElectronErrorHandlerService } from './services/electron-error-handler.s
|
|||||||
import { AppUpdateRendererService } from './services/app-update-renderer.service';
|
import { AppUpdateRendererService } from './services/app-update-renderer.service';
|
||||||
import { reducer } from './store';
|
import { reducer } from './store';
|
||||||
import { AutoUpdateSettings } from './shared/components/auto-update-settings/auto-update-settings';
|
import { AutoUpdateSettings } from './shared/components/auto-update-settings/auto-update-settings';
|
||||||
import { angularNotifierConfig } from '../../shared/src/models/angular-notifier-config';
|
import { angularNotifierConfig } from './shared/models/angular-notifier-config';
|
||||||
|
import { UhkHeader } from './shared/components/uhk-header/uhk-header';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -163,7 +164,8 @@ import { angularNotifierConfig } from '../../shared/src/models/angular-notifier-
|
|||||||
TooltipDirective,
|
TooltipDirective,
|
||||||
SafeStylePipe,
|
SafeStylePipe,
|
||||||
UpdateAvailableComponent,
|
UpdateAvailableComponent,
|
||||||
AutoUpdateSettings
|
AutoUpdateSettings,
|
||||||
|
UhkHeader
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<uhk-header>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h1 class="col-xs-12 pane-title">
|
<h1 class="col-xs-12 pane-title">
|
||||||
<i class="fa fa-keyboard-o"></i>
|
<i class="fa fa-keyboard-o"></i>
|
||||||
@@ -34,6 +35,8 @@
|
|||||||
data-original-title="Duplicate keymap"
|
data-original-title="Duplicate keymap"
|
||||||
(click)="duplicateKeymap()"
|
(click)="duplicateKeymap()"
|
||||||
></i>
|
></i>
|
||||||
<i class="fa fa-download keymap__download pull-right" title="Download keymap" (click)="onDownloadIconClick()"></i>
|
<i class="fa fa-download keymap__download pull-right" title="Download keymap"
|
||||||
|
(click)="onDownloadIconClick()"></i>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
</uhk-header>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<uhk-header>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h1 class="col-xs-12 pane-title">
|
<h1 class="col-xs-12 pane-title">
|
||||||
<i class="fa fa-play"></i>
|
<i class="fa fa-play"></i>
|
||||||
@@ -22,3 +23,4 @@
|
|||||||
></i>
|
></i>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
</uhk-header>
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<uhk-header></uhk-header>
|
||||||
<div class="not-found">
|
<div class="not-found">
|
||||||
You don't have any macros. Try to add one!
|
You don't have any macros. Try to add one!
|
||||||
</div>
|
</div>
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
<div>
|
||||||
|
<ng-content></ng-content>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'uhk-header',
|
||||||
|
templateUrl: './uhk-header.html',
|
||||||
|
changeDetection: ChangeDetectionStrategy.OnPush
|
||||||
|
})
|
||||||
|
export class UhkHeader {
|
||||||
|
}
|
||||||
@@ -86,7 +86,8 @@ import { DefaultUserConfigurationService } from './shared/services/default-user-
|
|||||||
import { reducer } from './shared/store/reducers/index';
|
import { reducer } from './shared/store/reducers/index';
|
||||||
import { LogService } from './shared/services/logger.service';
|
import { LogService } from './shared/services/logger.service';
|
||||||
import { AutoUpdateSettings } from './shared/components/auto-update-settings/auto-update-settings';
|
import { AutoUpdateSettings } from './shared/components/auto-update-settings/auto-update-settings';
|
||||||
import { angularNotifierConfig } from '../../shared/src/models/angular-notifier-config';
|
import { angularNotifierConfig } from './shared/models/angular-notifier-config';
|
||||||
|
import { UhkHeader } from './shared/components/uhk-header/uhk-header';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
declarations: [
|
declarations: [
|
||||||
@@ -139,7 +140,8 @@ import { angularNotifierConfig } from '../../shared/src/models/angular-notifier-
|
|||||||
CancelableDirective,
|
CancelableDirective,
|
||||||
TooltipDirective,
|
TooltipDirective,
|
||||||
SafeStylePipe,
|
SafeStylePipe,
|
||||||
AutoUpdateSettings
|
AutoUpdateSettings,
|
||||||
|
UhkHeader
|
||||||
],
|
],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
|
|||||||
Reference in New Issue
Block a user