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";
|
||||
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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 <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"
|
||||
}
|
||||
Reference in New Issue
Block a user