mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
remote inactivity
This commit is contained in:
@@ -104,15 +104,16 @@ export class HomePage implements OnInit {
|
||||
|
||||
if (window.location.pathname != '/inactivity') {
|
||||
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove())
|
||||
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove());
|
||||
document.querySelectorAll('.loading-blocker').forEach((e: any) => e.remove());
|
||||
|
||||
const pathname = window.location.pathname
|
||||
SessionStore.setUrlBeforeInactivity(pathname)
|
||||
|
||||
if (this.platform.is('mobileweb')) {
|
||||
this.router.navigate(['/inactivity']);
|
||||
}else{
|
||||
} else {
|
||||
this.router.navigate(['/']);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,14 +22,17 @@ export class InativityService {
|
||||
|
||||
function userIsNotActive() {
|
||||
// your function for too long inactivity goes here
|
||||
SessionStore.setInativity(false)
|
||||
// SessionStore.setInativity(false)
|
||||
// alert('go out')
|
||||
window['inactivity/function']()
|
||||
try {
|
||||
// window['inactivity/function']()
|
||||
} catch (error) {}
|
||||
|
||||
}
|
||||
|
||||
function resetTimer() {
|
||||
clearTimeout(time);
|
||||
time = setTimeout(userIsNotActive, 60000 * 5); // time is in milliseconds
|
||||
time = setTimeout(userIsNotActive, 60000 * 1); // time is in milliseconds
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user