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
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user