@resolveio/client-lib-core 1.1.11 → 1.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/lib/account-manager.service.mjs +1 -1
- package/esm2020/lib/home/home.component.mjs +29 -20
- package/esm2020/lib/widgets/navbar-main/navbar-main.component.mjs +1 -2
- package/fesm2015/resolveio-client-lib-core.mjs +28 -20
- package/fesm2015/resolveio-client-lib-core.mjs.map +1 -1
- package/fesm2020/resolveio-client-lib-core.mjs +28 -20
- package/fesm2020/resolveio-client-lib-core.mjs.map +1 -1
- package/lib/home/home.component.d.ts +2 -1
- package/package.json +1 -1
|
@@ -4577,7 +4577,6 @@ class NavbarMainComponent extends BaseComponent {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
async logout() {
|
|
4579
4579
|
this._app.isLoggingOut.next(true);
|
|
4580
|
-
this._services._router.navigateByUrl('/home');
|
|
4581
4580
|
await this._services._account.logOut();
|
|
4582
4581
|
this._app.isLoggingOut.next(false);
|
|
4583
4582
|
}
|
|
@@ -7411,35 +7410,44 @@ class HomeComponent extends BaseComponent {
|
|
|
7411
7410
|
]
|
|
7412
7411
|
};
|
|
7413
7412
|
this.selectedSolution = 'Asset';
|
|
7414
|
-
this.
|
|
7413
|
+
this.loggingOut$ = null;
|
|
7414
|
+
this.subscription$ = null;
|
|
7415
7415
|
}
|
|
7416
7416
|
ngOnInit() {
|
|
7417
7417
|
this._services._app.setNavbarModuleData(this.menuData);
|
|
7418
|
-
|
|
7419
|
-
if (this.
|
|
7420
|
-
if (this._services._account.getUser()
|
|
7421
|
-
this._services.
|
|
7422
|
-
|
|
7423
|
-
else if (this._services._router.url !== '/home') {
|
|
7424
|
-
this._services._router.navigateByUrl('/home');
|
|
7425
|
-
}
|
|
7426
|
-
}
|
|
7427
|
-
else {
|
|
7428
|
-
this.subscription$.push(this._services._account.user.subscribe(user => {
|
|
7429
|
-
if (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {
|
|
7430
|
-
this._services._router.navigateByUrl(user.settings.opening_route);
|
|
7418
|
+
this.loggingOut$ = this._app.isLoggingOut.subscribe(isLoggingOut => {
|
|
7419
|
+
if (!this._app.isLoggingOut.getValue()) {
|
|
7420
|
+
if (this._services._account.getUser()) {
|
|
7421
|
+
if (this._services._account.getUser().settings && this._services._account.getUser().settings.opening_route && this._services._account.getUser().settings.opening_route !== '/home') {
|
|
7422
|
+
this._services._router.navigateByUrl(this._services._account.getUser().settings.opening_route);
|
|
7431
7423
|
}
|
|
7432
7424
|
else if (this._services._router.url !== '/home') {
|
|
7433
7425
|
this._services._router.navigateByUrl('/home');
|
|
7434
7426
|
}
|
|
7435
|
-
}
|
|
7427
|
+
}
|
|
7428
|
+
else {
|
|
7429
|
+
if (this.subscription$) {
|
|
7430
|
+
this.subscription$.unsubscribe();
|
|
7431
|
+
}
|
|
7432
|
+
this.subscription$ = this._services._account.user.subscribe(user => {
|
|
7433
|
+
if (user && user.settings && user.settings.opening_route && user.settings.opening_route !== '/home') {
|
|
7434
|
+
this._services._router.navigateByUrl(user.settings.opening_route);
|
|
7435
|
+
}
|
|
7436
|
+
else if (this._services._router.url !== '/home') {
|
|
7437
|
+
this._services._router.navigateByUrl('/home');
|
|
7438
|
+
}
|
|
7439
|
+
}, () => { });
|
|
7440
|
+
}
|
|
7436
7441
|
}
|
|
7437
|
-
}
|
|
7442
|
+
});
|
|
7438
7443
|
}
|
|
7439
7444
|
ngOnDestroy() {
|
|
7440
|
-
this.subscription
|
|
7441
|
-
|
|
7442
|
-
}
|
|
7445
|
+
if (this.subscription$) {
|
|
7446
|
+
this.subscription$.unsubscribe();
|
|
7447
|
+
}
|
|
7448
|
+
if (this.loggingOut$) {
|
|
7449
|
+
this.loggingOut$.unsubscribe();
|
|
7450
|
+
}
|
|
7443
7451
|
}
|
|
7444
7452
|
}
|
|
7445
7453
|
HomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.1", ngImport: i0, type: HomeComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: AuthService }, { token: ProviderService }, { token: i4.HttpClient }, { token: CoreService }], target: i0.ɵɵFactoryTarget.Component });
|