forked from aclc-iriga/mmsanagustin-iriga
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/dev' into dev
# Conflicts: # src/components/nav/SideNav.vue # src/components/nav/TopNav.vue # src/views/Login.vue
- Loading branch information
Showing
8 changed files
with
148 additions
and
108 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// initialize screensaver variables | ||
let idleTime = null; | ||
let forced = false; | ||
|
||
// initialize screensaver | ||
const screensaver = document.getElementById("screensaver"); | ||
screensaver.style.display = "none"; | ||
|
||
// set idle time for 2 and a half minutes | ||
const startIdleTime = () => { | ||
idleTime = setTimeout(() => { | ||
// show styles for screen saver | ||
screensaver.style.display = "block"; | ||
}, 150000); | ||
} | ||
|
||
// clear idle time | ||
const clearIdleTime = () => { | ||
clearTimeout(idleTime); | ||
screensaver.style.display = "none"; | ||
// starts idle time again after idle time is cleared | ||
startIdleTime(); | ||
} | ||
|
||
// force screensaver | ||
const forceScreensaver = () => { | ||
screensaver.style.display = "block"; | ||
forced = true; | ||
setTimeout(() => { | ||
forced = false; | ||
}, 2400); | ||
} | ||
|
||
// starts idle time for screensaver | ||
startIdleTime(); | ||
|
||
// event handlers for screensaver | ||
window.addEventListener('mousemove', function() { | ||
if(!forced) | ||
clearIdleTime(); | ||
}); | ||
window.addEventListener('keypress', function() { | ||
if(!forced) | ||
clearIdleTime(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.