* feat(notification): Add undoable notification * feat(notification): Add undoable notification * feat(notification): Use uhk-header to the notification * half ready solution * - fix: "Keymap has been deleted" is displayed for macros. - When a keymap/macro deletion gets undone, please set the route of the restored keymap/macro. - When the user switches to another route, please make the undo notification disappear. * fix(keymap): Store prev user configuration in the application reducer Store the previous state in application reducer, because refactoring the user-config reducer is not easy * feat(keymap): Fix review request
This commit is contained in:
committed by
László Monda
parent
ce55cac380
commit
42683e32f9
@@ -12,7 +12,10 @@ export const ActionTypes = {
|
||||
APP_STARTED: type(PREFIX + 'started'),
|
||||
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')
|
||||
APP_PROCESS_COMMAND_LINE_ARGS: type(PREFIX + 'process command line args'),
|
||||
UNDO_LAST: type(PREFIX + 'undo last action'),
|
||||
UNDO_LAST_SUCCESS: type(PREFIX + 'undo last action success'),
|
||||
DISMISS_UNDO_NOTIFICATION: type(PREFIX + 'dismiss notification action')
|
||||
};
|
||||
|
||||
export class AppBootsrappedAction implements Action {
|
||||
@@ -41,9 +44,26 @@ export class ProcessCommandLineArgsAction implements Action {
|
||||
constructor(public payload: CommandLineArgs) { }
|
||||
}
|
||||
|
||||
export class UndoLastAction implements Action {
|
||||
type = ActionTypes.UNDO_LAST;
|
||||
|
||||
constructor(public payload: any) {}
|
||||
}
|
||||
|
||||
export class UndoLastSuccessAction implements Action {
|
||||
type = ActionTypes.UNDO_LAST_SUCCESS;
|
||||
}
|
||||
|
||||
export class DismissUndoNotificationAction implements Action {
|
||||
type = ActionTypes.DISMISS_UNDO_NOTIFICATION;
|
||||
}
|
||||
|
||||
export type Actions
|
||||
= AppStartedAction
|
||||
| AppBootsrappedAction
|
||||
| ShowNotificationAction
|
||||
| ToggleAddonMenuAction
|
||||
| ProcessCommandLineArgsAction;
|
||||
| ProcessCommandLineArgsAction
|
||||
| UndoLastAction
|
||||
| UndoLastSuccessAction
|
||||
| DismissUndoNotificationAction;
|
||||
|
||||
Reference in New Issue
Block a user