mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
save
This commit is contained in:
@@ -16,8 +16,7 @@ export class InactivityGuard implements CanActivate {
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
|
||||
|
||||
if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin) {
|
||||
if(SessionStore.exist && SessionStore.user.Inactivity && !SessionStore.hasPin ) {
|
||||
return true
|
||||
} else if(SessionStore.exist && !SessionStore.user.Inactivity) {
|
||||
return true
|
||||
|
||||
@@ -82,6 +82,7 @@ export class HomePage implements OnInit {
|
||||
|
||||
window['platform'] = platform
|
||||
window['inactivity/function'] = () => {
|
||||
|
||||
if(window.location.pathname != '/inactivity') {
|
||||
|
||||
const pathname = window.location.pathname
|
||||
|
||||
@@ -212,12 +212,11 @@ export class ProfilePage implements OnInit {
|
||||
}
|
||||
|
||||
logout() {
|
||||
|
||||
SessionStore.setInativity(false)
|
||||
this.router.navigateByUrl('/inactivity');
|
||||
|
||||
window['inactivity/function']()
|
||||
|
||||
setTimeout(() => {
|
||||
this.router.navigateByUrl('/', { replaceUrl: true });
|
||||
this.router.navigate(['/inactivity']);
|
||||
}, 100)
|
||||
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ export class InactivityPage implements OnInit {
|
||||
await this.authService.SetSession(attempt, this.userattempt);
|
||||
await this.authService.loginChat(this.userattempt);
|
||||
await this.getToken();
|
||||
SessionStore.setInativity(true)
|
||||
|
||||
this.goback()
|
||||
} else {
|
||||
@@ -142,6 +143,7 @@ export class InactivityPage implements OnInit {
|
||||
|
||||
goback() {
|
||||
const pathName = this.SessionStore.user.UrlBeforeInactivity
|
||||
alert(pathName)
|
||||
this.router.navigate([pathName]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user