diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts index bf6599285..14f722496 100644 --- a/src/app/modals/profile/profile.page.ts +++ b/src/app/modals/profile/profile.page.ts @@ -31,6 +31,7 @@ export class ProfilePage implements OnInit { location: "Gabinete"; isProfileOpen = false hideImage = false + logoutOut = false constructor(private modalController: ModalController, private authService: AuthService, @@ -47,6 +48,7 @@ export class ProfilePage implements OnInit { this.loggeduser = SessionStore.user; router.events.subscribe((val) => { this.isProfileOpen = false + this.logoutOut = true }); setTimeout(()=>{ @@ -210,9 +212,19 @@ export class ProfilePage implements OnInit { logout() { SessionStore.setInativity(false) SessionStore.setUrlBeforeInactivity(this.router.url); + this.logoutOut == false + setTimeout(() => { // alert('logout') this.router.navigateByUrl('/', { replaceUrl: true }); + this.router.navigate(['/']); + + setTimeout(() =>{ + if(this.logoutOut == false) { + window.location.pathname = '/' + } + }, 500) + }, 100) } diff --git a/src/app/services/inativity.service.ts b/src/app/services/inativity.service.ts index 3f2c00cbc..b916e493d 100644 --- a/src/app/services/inativity.service.ts +++ b/src/app/services/inativity.service.ts @@ -11,28 +11,28 @@ export class InativityService { private router: Router, ) { - var time; - window.onload = resetTimer; - window.onmousemove = resetTimer; - window.onmousedown = resetTimer; // catches touchscreen presses as well - window.ontouchstart = resetTimer; // catches touchscreen swipes as well - window.onclick = resetTimer; // catches touchpad clicks as well - window.onkeydown = resetTimer; - window.addEventListener('scroll', resetTimer, true); // improved; see comments + // var time; + // window.onload = resetTimer; + // window.onmousemove = resetTimer; + // window.onmousedown = resetTimer; // catches touchscreen presses as well + // window.ontouchstart = resetTimer; // catches touchscreen swipes as well + // window.onclick = resetTimer; // catches touchpad clicks as well + // window.onkeydown = resetTimer; + // window.addEventListener('scroll', resetTimer, true); // improved; see comments - function userIsNotActive() { - // your function for too long inactivity goes here - // SessionStore.setInativity(false) - // alert('go out') - try { - // window['inactivity/function']() - } catch (error) {} + // function userIsNotActive() { + // // your function for too long inactivity goes here + // // SessionStore.setInativity(false) + // // alert('go out') + // try { + // // window['inactivity/function']() + // } catch (error) {} - } + // } - function resetTimer() { - clearTimeout(time); - time = setTimeout(userIsNotActive, 60000 * 1); // time is in milliseconds - } + // function resetTimer() { + // clearTimeout(time); + // time = setTimeout(userIsNotActive, 60000 * 1); // time is in milliseconds + // } } } diff --git a/version/git-version.ts b/version/git-version.ts index 6d5e824c2..febe08028 100644 --- a/version/git-version.ts +++ b/version/git-version.ts @@ -1,12 +1,12 @@ export let versionData = { - "shortSHA": "3709de00e", - "SHA": "3709de00ed6b3fe9153de6edcc6befe392cfb2d8", + "shortSHA": "2f13e82c9", + "SHA": "2f13e82c96626aa0088dc2c9afeb0fcc491aa6d6", "branch": "develop_bitOut-fix", "lastCommitAuthor": "'Peter Maquiran'", - "lastCommitTime": "'Wed Jan 4 11:27:40 2023 +0100'", - "lastCommitMessage": "save", - "lastCommitNumber": "4610", + "lastCommitTime": "'Wed Jan 4 12:16:44 2023 +0100'", + "lastCommitMessage": "chat loader", + "lastCommitNumber": "4611", "change": "", - "changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/modals/preview-camera/preview-camera.page.html\n\tmodified: src/app/pages/chat/chat.page.html", + "changeStatus": "On branch develop_bitOut-fix\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/modals/profile/profile.page.ts\n\tmodified: src/app/services/inativity.service.ts", "changeAuthor": "peter.maquiran" } \ No newline at end of file