Structural refactoring (#68)
* Moved html in scss to separate files * Moved components to designated folders * Moved logic from html to ts
This commit is contained in:
committed by
József Farkas
parent
036c2d0a70
commit
baaec669e0
@@ -16,79 +16,19 @@ import {NgSwitch, NgSwitchCase} from '@angular/common';
|
||||
|
||||
import {KeyAction} from '../../../config-serializer/config-items/KeyAction';
|
||||
|
||||
import {KeypressTabComponent} from './tab/keypress-tab.component';
|
||||
import {LayerTabComponent} from './tab/layer-tab.component';
|
||||
import {MouseTabComponent} from './tab/mouse-tab.component';
|
||||
import {MacroTabComponent} from './tab/macro-tab.component';
|
||||
import {KeymapTabComponent} from './tab/keymap-tab.component';
|
||||
import {NoneTabComponent} from './tab/none-tab.component';
|
||||
import {KeypressTabComponent} from './tab/keypress/keypress-tab.component';
|
||||
import {LayerTabComponent} from './tab/layer/layer-tab.component';
|
||||
import {MouseTabComponent} from './tab/mouse/mouse-tab.component';
|
||||
import {MacroTabComponent} from './tab/macro/macro-tab.component';
|
||||
import {KeymapTabComponent} from './tab/keymap/keymap-tab.component';
|
||||
import {NoneTabComponent} from './tab/none/none-tab.component';
|
||||
|
||||
import {KeyActionSaver} from './key-action-saver';
|
||||
|
||||
@Component({
|
||||
moduleId: module.id,
|
||||
selector: 'popover',
|
||||
template:
|
||||
`
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="popover-title menu-tabs">
|
||||
<ul class="nav nav-tabs popover-menu">
|
||||
<li #keypress (click)="onListItemClick(0)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
Keypress
|
||||
</a>
|
||||
</li>
|
||||
<li #layer (click)="onListItemClick(1)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-clone"></i>
|
||||
Layer
|
||||
</a>
|
||||
</li>
|
||||
<li #mouse (click)="onListItemClick(2)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-mouse-pointer"></i>
|
||||
Mouse
|
||||
</a>
|
||||
</li>
|
||||
<li #macro (click)="onListItemClick(3)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-play"></i>
|
||||
Macro
|
||||
</a>
|
||||
</li>
|
||||
<li #keymap (click)="onListItemClick(4)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-keyboard-o"></i>
|
||||
Keymap
|
||||
</a>
|
||||
</li>
|
||||
<li #none (click)="onListItemClick(5)">
|
||||
<a class="menu-tabs--item">
|
||||
<i class="fa fa-ban"></i>
|
||||
None
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" [ngSwitch]="activeListItemIndex">
|
||||
<keypress-tab #tab *ngSwitchCase="0" class="popover-content"></keypress-tab>
|
||||
<layer-tab #tab *ngSwitchCase="1" class="popover-content"></layer-tab>
|
||||
<mouse-tab #tab *ngSwitchCase="2" class="popover-content"></mouse-tab>
|
||||
<macro-tab #tab *ngSwitchCase="3" class="popover-content"></macro-tab>
|
||||
<keymap-tab #tab *ngSwitchCase="4" class="popover-content"></keymap-tab>
|
||||
<none-tab #tab *ngSwitchCase="5" class="popover-content"></none-tab>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="popover-action">
|
||||
<button class="btn btn-sm btn-default" type="button" (click)="onCancelClick()"> Cancel </button>
|
||||
<button class="btn btn-sm btn-primary" type="button" (click)="onRemapKey()"> Remap Key </button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
template: require('./popover.component.html'),
|
||||
styles: [require('./popover.component.scss')],
|
||||
host: { 'class': 'popover' },
|
||||
directives:
|
||||
|
||||
Reference in New Issue
Block a user