Add macro
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<li class="sidebar__level-1--item">
|
||||
<div class="sidebar__level-1">
|
||||
<i class="fa fa-play"></i> Macros
|
||||
<a [routerLink]="['/macro/add']" class="btn btn-default pull-right btn-sm">
|
||||
<a (click)="addMacro()" class="btn btn-default pull-right btn-sm">
|
||||
<i class="fa fa-plus"></i>
|
||||
</a>
|
||||
<i class="fa fa-chevron-up pull-right" (click)="toggleHide($event, 'macro')"></i>
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
import { Component, Renderer, animate, state, style, transition, trigger } from '@angular/core';
|
||||
|
||||
import { Store } from '@ngrx/store';
|
||||
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { Keymap } from '../../config-serializer/config-items/Keymap';
|
||||
import { Macro } from '../../config-serializer/config-items/Macro';
|
||||
|
||||
import { AppState } from '../../store';
|
||||
import { MacroActions } from '../../store/actions';
|
||||
import { getKeymapEntities, getMacroEntities } from '../../store/reducers';
|
||||
import { Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
@Component({
|
||||
animations: [
|
||||
@@ -54,4 +57,8 @@ export class SideMenuComponent {
|
||||
this.renderer.setElementClass(event.target, 'fa-chevron-up', show);
|
||||
this.renderer.setElementClass(event.target, 'fa-chevron-down', !show);
|
||||
}
|
||||
|
||||
addMacro() {
|
||||
this.store.dispatch(MacroActions.addMacro());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user