This commit is contained in:
Peter Maquiran
2022-06-24 16:18:25 +01:00
parent 23cbf723ba
commit ce7b7b94d0
2 changed files with 23 additions and 26 deletions
+22 -26
View File
@@ -98,38 +98,34 @@ export class HomePage implements OnInit {
this.user = SessionStore.user;
}
/* this.webNotificationPopupService.askNotificationPermission() */
this.NativeNotificationService.askForPermission()
this.router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
});
window['platform'] = platform
window['inactivity/function'] = () => {
if (window.location.pathname != '/inactivity') {
this.NativeNotificationService.askForPermission()
this.router.events.subscribe((val) => {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove())
document.querySelectorAll('popover-viewport').forEach((e: any) => e.remove())
});
const pathname = window.location.pathname
SessionStore.setUrlBeforeInactivity(pathname)
if (this.platform.is('mobileweb')) {
this.router.navigate(['/inactivity']);
}else{
this.router.navigate(['/']);
window['platform'] = platform
window['inactivity/function'] = () => {
if (window.location.pathname != '/inactivity') {
document.querySelectorAll('ion-modal').forEach((e: any) => e.remove())
document.querySelectorAll('.popover-viewport').forEach((e: any) => e.remove())
const pathname = window.location.pathname
SessionStore.setUrlBeforeInactivity(pathname)
if (this.platform.is('mobileweb')) {
this.router.navigate(['/inactivity']);
}else{
this.router.navigate(['/']);
}
}
}
}
}
goto(url) {
@@ -257,6 +257,7 @@ export class InactivityPage implements OnInit {
enterWithPasswordButton() {
this.enterWithPassword = true
this.router.navigate(['/']);
}
}