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