refactor(auto-update): Show notification messages with the angular-notifier (#334)
* 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 * refactor(app-update): Refactor app-update notification * fix(auto-update): Add missing rxjs imports
This commit is contained in:
committed by
László Monda
parent
c9a1e9853c
commit
f7212320e6
@@ -12,7 +12,6 @@ export class AutoUpdateSettings {
|
||||
@Input() version: string;
|
||||
@Input() settings: State;
|
||||
@Input() checkingForUpdate: boolean;
|
||||
@Input() message: string;
|
||||
|
||||
@Output() toggleCheckForUpdateOnStartUp = new EventEmitter<boolean>();
|
||||
@Output() toggleUsePreReleaseUpdate = new EventEmitter<boolean>();
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
[version]="version"
|
||||
[settings]="autoUpdateSettings$ | async"
|
||||
[checkingForUpdate]="checkingForUpdate$ | async"
|
||||
[message]="autoUpdateMessage$ | async"
|
||||
(toggleCheckForUpdateOnStartUp)="toogleCheckForUpdateOnStartUp($event)"
|
||||
(toggleUsePreReleaseUpdate)="toogleUsePreReleaseUpdate($event)"
|
||||
(checkForUpdate)="checkForUpdate()">
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Store } from '@ngrx/store';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
|
||||
import { runInElectron } from '../../util/index';
|
||||
import { AppState, getAutoUpdateMessage, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
|
||||
import { AppState, getAutoUpdateSettings, getCheckingForUpdate } from '../../store';
|
||||
import {
|
||||
CheckForUpdateNowAction,
|
||||
ToggleCheckForUpdateOnStartupAction,
|
||||
@@ -25,12 +25,10 @@ export class SettingsComponent {
|
||||
version = '1.0.0';
|
||||
autoUpdateSettings$: Observable<AutoUpdateSettings>;
|
||||
checkingForUpdate$: Observable<boolean>;
|
||||
autoUpdateMessage$: Observable<string>;
|
||||
|
||||
constructor(private store: Store<AppState>) {
|
||||
this.autoUpdateSettings$ = store.select(getAutoUpdateSettings);
|
||||
this.checkingForUpdate$ = store.select(getCheckingForUpdate);
|
||||
this.autoUpdateMessage$ = store.select(getAutoUpdateMessage);
|
||||
}
|
||||
|
||||
toogleCheckForUpdateOnStartUp(value: boolean) {
|
||||
|
||||
Reference in New Issue
Block a user