Added effects

This commit is contained in:
NejcZdovc
2016-09-28 14:52:34 +02:00
committed by József Farkas
parent c28f564e3f
commit f93477487c
11 changed files with 199 additions and 89 deletions

View File

@@ -15,6 +15,7 @@ import { Keymap } from '../../config-serializer/config-items/Keymap';
import { Tab } from './tab/tab';
import { AppState } from '../../store';
import { getKeymapEntities } from '../../store/reducers';
import { Observable } from 'rxjs/Observable';
enum TabName {
@@ -48,7 +49,7 @@ export class PopoverComponent implements OnInit {
private keymaps$: Observable<Keymap[]>;
constructor(private store: Store<AppState>) {
this.keymaps$ = store.select((appState: AppState) => appState.keymaps);
this.keymaps$ = store.let(getKeymapEntities());
}
ngOnInit() {

View File

@@ -4,6 +4,7 @@ import { Keymap } from '../../config-serializer/config-items/Keymap';
import { Macro } from '../../config-serializer/config-items/Macro';
import { AppState } from '../../store';
import { getKeymapEntities, getMacroEntities } from '../../store/reducers';
import { Store } from '@ngrx/store';
import { Observable } from 'rxjs/Observable';
@@ -35,8 +36,8 @@ export class SideMenuComponent {
addon: 'active'
};
this.keymaps$ = store.select(appState => appState.keymaps);
this.macros$ = store.select(appState => appState.macros);
this.keymaps$ = store.let(getKeymapEntities());
this.macros$ = store.let(getMacroEntities());
}
toggleHide(event: Event, type: string) {