ing
This commit is contained in:
parent
f1c4eda652
commit
b2e745d049
|
@ -1,4 +1,4 @@
|
||||||
<p-blockUI [blocked]="block"></p-blockUI>
|
<p-blockUI [blocked]="blockAppContent$ | async"></p-blockUI>
|
||||||
|
|
||||||
<div id="app-container">
|
<div id="app-container">
|
||||||
<div id="app-chrome" class="focused">
|
<div id="app-chrome" class="focused">
|
||||||
|
|
|
@ -9,7 +9,8 @@ import { TranslateService } from '@ngx-translate/core';
|
||||||
|
|
||||||
import { ElectronProxyService } from './service/electron-proxy.service';
|
import { ElectronProxyService } from './service/electron-proxy.service';
|
||||||
import { MenuEvent } from '../commons/type';
|
import { MenuEvent } from '../commons/type';
|
||||||
import * as AppStore from './store/app';
|
import * as AppStore from './store';
|
||||||
|
import * as _AppStore from './store/app';
|
||||||
import * as UserStore from './store/environment/user';
|
import * as UserStore from './store/environment/user';
|
||||||
|
|
||||||
import * as log from './core/util/log';
|
import * as log from './core/util/log';
|
||||||
|
@ -22,7 +23,6 @@ import * as log from './core/util/log';
|
||||||
export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
|
export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, OnDestroy {
|
||||||
title = 'scanner-app';
|
title = 'scanner-app';
|
||||||
showTitleBar: boolean;
|
showTitleBar: boolean;
|
||||||
block: boolean;
|
|
||||||
|
|
||||||
menuSubscription: Subscription;
|
menuSubscription: Subscription;
|
||||||
displayAbout: boolean;
|
displayAbout: boolean;
|
||||||
|
@ -32,6 +32,8 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On
|
||||||
displayPreferences: boolean;
|
displayPreferences: boolean;
|
||||||
displayPrint: boolean;
|
displayPrint: boolean;
|
||||||
|
|
||||||
|
blockAppContent$ = this.store.pipe(select(AppStore.UISelector.LayoutSelector.selectBlockAppContent));
|
||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
private changeDetector: ChangeDetectorRef,
|
private changeDetector: ChangeDetectorRef,
|
||||||
private store: Store<any>,
|
private store: Store<any>,
|
||||||
|
@ -40,24 +42,9 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On
|
||||||
) {
|
) {
|
||||||
// this.showTitleBar = !__LINUX__;
|
// this.showTitleBar = !__LINUX__;
|
||||||
this.showTitleBar = false;
|
this.showTitleBar = false;
|
||||||
this.block = false;
|
|
||||||
|
|
||||||
this.translateService.addLangs(['en', 'ko']);
|
this.translateService.addLangs(['en', 'ko']);
|
||||||
this.translateService.setDefaultLang('en');
|
this.translateService.setDefaultLang('en');
|
||||||
// this.translateService.onLangChange.subscribe((e) => {
|
|
||||||
// this.changeDetector.markForCheck();
|
|
||||||
// });
|
|
||||||
// this.translateService.onTranslationChange.subscribe((e) => {
|
|
||||||
// this.changeDetector.detectChanges();
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
// const i18ns = ['en', 'ko'];
|
|
||||||
// i18ns.forEach((lang) => {
|
|
||||||
// this.translateService.use(lang);
|
|
||||||
// });
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
@ -69,7 +56,7 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On
|
||||||
__this.changeDetector.detectChanges();
|
__this.changeDetector.detectChanges();
|
||||||
});
|
});
|
||||||
|
|
||||||
this.store.dispatch(new AppStore.AppInit());
|
this.store.dispatch(new _AppStore.AppInit());
|
||||||
this.store.dispatch(new UserStore.SetMemberID({ memberID: 'scannerUser' }));
|
this.store.dispatch(new UserStore.SetMemberID({ memberID: 'scannerUser' }));
|
||||||
// this.probeService.connect();
|
// this.probeService.connect();
|
||||||
this.electronProxyService.sendReady(performance.now());
|
this.electronProxyService.sendReady(performance.now());
|
||||||
|
@ -124,17 +111,17 @@ export class AppComponent implements OnInit, AfterContentInit, AfterViewInit, On
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterContentInit(): void {
|
ngAfterContentInit(): void {
|
||||||
this.store.dispatch(new AppStore.AppAfterContentInit());
|
this.store.dispatch(new _AppStore.AppAfterContentInit());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngAfterViewInit(): void {
|
ngAfterViewInit(): void {
|
||||||
this.store.dispatch(new AppStore.AppAfterViewInit());
|
this.store.dispatch(new _AppStore.AppAfterViewInit());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.store.dispatch(new AppStore.AppDestroy());
|
this.store.dispatch(new _AppStore.AppDestroy());
|
||||||
|
|
||||||
this.menuSubscription.unsubscribe();
|
this.menuSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user