feat(app): Show add-on menu if start app with --addons arg (#359)
* refactor(store): Move app reducer from electron to shared module * feat(app): Show add-on menu if start app with --addons arg close: #351
This commit is contained in:
committed by
László Monda
parent
25257132a6
commit
a4d41f36d5
@@ -32,7 +32,7 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="sidebar__level-1--item">
|
||||
<li class="sidebar__level-1--item" *ngIf="showAddonMenu$ | async">
|
||||
<div class="sidebar__level-1">
|
||||
<i class="fa fa-puzzle-piece"></i> Add-on modules
|
||||
<i class="fa fa-chevron-up pull-right" (click)="toggleHide($event, 'addon')"></i>
|
||||
|
||||
@@ -12,7 +12,7 @@ import { runInElectron } from '../../util/index';
|
||||
import { Keymap } from '../../config-serializer/config-items/keymap';
|
||||
import { Macro } from '../../config-serializer/config-items/macro';
|
||||
|
||||
import { AppState } from '../../store';
|
||||
import { AppState, showAddonMenu } from '../../store';
|
||||
import { MacroActions } from '../../store/actions';
|
||||
import { getKeymaps, getMacros } from '../../store/reducers/user-configuration';
|
||||
|
||||
@@ -33,6 +33,7 @@ import { getKeymaps, getMacros } from '../../store/reducers/user-configuration';
|
||||
styleUrls: ['./side-menu.component.scss']
|
||||
})
|
||||
export class SideMenuComponent {
|
||||
showAddonMenu$: Observable<boolean>;
|
||||
runInElectron = runInElectron();
|
||||
|
||||
private keymaps$: Observable<Keymap[]>;
|
||||
@@ -57,6 +58,8 @@ export class SideMenuComponent {
|
||||
.do((macros: Macro[]) => {
|
||||
macros.sort((first: Macro, second: Macro) => first.name.localeCompare(second.name));
|
||||
});
|
||||
|
||||
this.showAddonMenu$ = this.store.select(showAddonMenu);
|
||||
}
|
||||
|
||||
toggleHide(event: Event, type: string) {
|
||||
|
||||
Reference in New Issue
Block a user