* refactor(log): Refactor logging service Removed the InjectionToken and changed LogService as default logger. Finally ElectronLogService implements LogService directly. * refactor: Optimize imports * fix(app-update): Add missing rxjs imports * style: Remove extra line * refactor(store): Move app.actions.ts to shared module * feat(notification): Add notification panel Add angular-notifier to the app and created the ShowNotificationAction to manage notifications * style(notification): Fix tslint suggestion * fix(notification): Add missing rxjs imports
This commit is contained in:
committed by
László Monda
parent
6bc2bc8331
commit
c9a1e9853c
@@ -0,0 +1,32 @@
|
||||
import { Action } from '@ngrx/store';
|
||||
|
||||
import { type } from '../../util';
|
||||
import {Notification} from '../../models/notification';
|
||||
|
||||
const PREFIX = '[app] ';
|
||||
|
||||
// tslint:disable-next-line:variable-name
|
||||
export const ActionTypes = {
|
||||
APP_BOOTSRAPPED: type(PREFIX + 'bootstrapped'),
|
||||
APP_STARTED: type(PREFIX + 'started'),
|
||||
APP_SHOW_NOTIFICATION: type(PREFIX + 'show notification')
|
||||
};
|
||||
|
||||
export class AppBootsrappedAction implements Action {
|
||||
type = ActionTypes.APP_BOOTSRAPPED;
|
||||
}
|
||||
|
||||
export class AppStartedAction implements Action {
|
||||
type = ActionTypes.APP_STARTED;
|
||||
}
|
||||
|
||||
export class ShowNotificationAction implements Action {
|
||||
type = ActionTypes.APP_SHOW_NOTIFICATION;
|
||||
|
||||
constructor(public payload: Notification) {}
|
||||
}
|
||||
|
||||
export type Actions
|
||||
= AppStartedAction
|
||||
| AppBootsrappedAction
|
||||
| ShowNotificationAction;
|
||||
Reference in New Issue
Block a user