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:
Róbert Kiss
2017-07-18 09:46:55 +02:00
committed by László Monda
parent 25257132a6
commit a4d41f36d5
18 changed files with 649 additions and 3536 deletions
+19 -2
View File
@@ -2,6 +2,7 @@ import { Action } from '@ngrx/store';
import { type } from '../../util';
import { Notification } from '../../models/notification';
import { CommandLineArgs } from '../../models/command-line-args';
const PREFIX = '[app] ';
@@ -9,7 +10,9 @@ const PREFIX = '[app] ';
export const ActionTypes = {
APP_BOOTSRAPPED: type(PREFIX + 'bootstrapped'),
APP_STARTED: type(PREFIX + 'started'),
APP_SHOW_NOTIFICATION: type(PREFIX + 'show notification')
APP_SHOW_NOTIFICATION: type(PREFIX + 'show notification'),
APP_TOGGLE_ADDON_MENU: type(PREFIX + 'toggle add-on menu'),
APP_PROCESS_COMMAND_LINE_ARGS: type(PREFIX + 'process command line args')
};
export class AppBootsrappedAction implements Action {
@@ -26,7 +29,21 @@ export class ShowNotificationAction implements Action {
constructor(public payload: Notification) { }
}
export class ToggleAddonMenuAction implements Action {
type = ActionTypes.APP_TOGGLE_ADDON_MENU;
constructor(public payload: boolean) { }
}
export class ProcessCommandLineArgsAction implements Action {
type = ActionTypes.APP_PROCESS_COMMAND_LINE_ARGS;
constructor(public payload: CommandLineArgs) { }
}
export type Actions
= AppStartedAction
| AppBootsrappedAction
| ShowNotificationAction;
| ShowNotificationAction
| ToggleAddonMenuAction
| ProcessCommandLineArgsAction;