From d3f9b35a7f00fa40b6ece253f8f831774b9a6d2f Mon Sep 17 00:00:00 2001 From: Peter Maquiran Date: Mon, 19 Dec 2022 00:07:05 +0100 Subject: [PATCH] save --- .../document-set-up-meeting.page.html | 2 +- src/app/pages/inactivity/inactivity.page.html | 3 +- src/app/pages/inactivity/inactivity.page.ts | 61 ++----------------- src/app/store/session.service.ts | 5 ++ 4 files changed, 12 insertions(+), 59 deletions(-) diff --git a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html index 0bf2a7447..2d8ecca3f 100644 --- a/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html +++ b/src/app/modals/document-set-up-meeting/document-set-up-meeting.page.html @@ -227,7 +227,7 @@
- +
-
Digite o PIN
Digite o novo PIN
@@ -26,7 +25,7 @@
-
+
1
2
3
diff --git a/src/app/pages/inactivity/inactivity.page.ts b/src/app/pages/inactivity/inactivity.page.ts index 27255c30d..a78c96b8a 100644 --- a/src/app/pages/inactivity/inactivity.page.ts +++ b/src/app/pages/inactivity/inactivity.page.ts @@ -39,41 +39,10 @@ export class InactivityPage implements OnInit { ngOnInit() { - - // window.addEventListener('resize', (event) => { - // if(this.router.url != '/login') return false - - // if(this.loop == false) { - // this.loop = true - // this.runloop() - // } - - // }, true); - } runloop() { - // const containerHeight = 651 - // let circleHeight = document.querySelector('.circle')['offsetHeight'] - // let circleWidth = document.querySelector('.circle')['offsetWidth'] - // - - // - - // document.querySelectorAll('.circle').forEach(e=>{ - // e['style']['height'] = (circleHeight -1 )+'px' - // e['style']['width'] = (circleWidth -1 )+'px' - // }) - - - // if( window.innerHeight< containerHeight) { - // setTimeout(()=>{ - // this.runloop() - // }, 100) - // } else { - // this.loop = false - // } } @@ -165,8 +134,8 @@ export class InactivityPage implements OnInit { if(!SessionStore.hasPin) { // this.storePin() + this.pinLogin() } else { - // this.pinLogin() } } @@ -187,7 +156,7 @@ export class InactivityPage implements OnInit { setTimeout(() => { this.clearCode() - }, 1000) + }, 5000) } else { this.toastService._badRequest('Pin incorreto') @@ -222,7 +191,7 @@ export class InactivityPage implements OnInit { } - }, 5000) + }, 100) } @@ -230,28 +199,8 @@ export class InactivityPage implements OnInit { storePin() { - setTimeout(() => { - const code = this.code.join(''); - SessionStore.setPin(code); - - if(this.p.userPermission(this.p.permissionList.Agenda.access) || this.p.userPermission(this.p.permissionList.Gabinete.access)){ - //When user has got access to Agenda but does not have their own calendar, goes to Agenda - if(this.p.userPermission(this.p.permissionList.Agenda.access) && SessionStore.user.OwnerCalendars.length == 0){ - this.router.navigate(['/home/agenda']); - } - else{ - this.router.navigate(['/home/events']); - } - } - //If user has access permission to both Chat and Action, goes to Chat by default. - else if((this.p.userPermission(this.p.permissionList.Chat.access) && this.p.userPermission(this.p.permissionList.Actions.access)) || this.p.userPermission(this.p.permissionList.Chat.access)){ - this.router.navigate(['/home/chat']); - } - else if(this.p.userPermission(this.p.permissionList.Actions.access)){ - this.router.navigate(['/home/publications']); - } - - }, 5000) + const code = this.code.join(''); + SessionStore.setPin(code); } diff --git a/src/app/store/session.service.ts b/src/app/store/session.service.ts index eff78096c..955428411 100644 --- a/src/app/store/session.service.ts +++ b/src/app/store/session.service.ts @@ -56,6 +56,11 @@ class SessionService { return this._user.Inactivity } + + isUserActive() { + return this._user.Inactivity + } + setInativity(value: boolean) { this._user.Inactivity = value this._user.UrlBeforeInactivity = ''