Compare commits
2 Commits
14cf8af14b
...
9066397cd4
Author | SHA1 | Date | |
---|---|---|---|
9066397cd4 | |||
cf7bd8da9c |
@ -16,6 +16,11 @@ document.body.addEventListener('click', () => {
|
||||
// Lock screen or show mode
|
||||
let screenState = 'lock';
|
||||
|
||||
let cookieScreen = getCookie('screen');
|
||||
if (cookieScreen) {
|
||||
screenState = cookieScreen;
|
||||
}
|
||||
|
||||
function handleImage() {
|
||||
if (screenState === 'lock') {
|
||||
fetch('https://staging.thegreydiamond.de/projects/photoPortfolio/api/getRand.php?uuid=01919dec-b2cd-7adc-8ca2-a071d1169cbc&unsplash=true&orientation=landscape')
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.7 MiB After Width: | Height: | Size: 637 KiB |
@ -689,6 +689,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
});
|
||||
});
|
||||
|
||||
function setCookie(name, value, days) {
|
||||
let expires = "";
|
||||
if(days) {
|
||||
let date = new Date();
|
||||
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
|
||||
expires = "; expires=" + date.toUTCString();
|
||||
}
|
||||
document.cookie = name + "=" + value + expires + "; path=/";
|
||||
}
|
||||
|
||||
function getCookie(name) {
|
||||
let value = "; " + document.cookie;
|
||||
let parts = value.split("; " + name + "=");
|
||||
|
@ -12,8 +12,22 @@ let pinInput4 = document.getElementById('pinInput4');
|
||||
|
||||
let pinError = document.getElementById('pinError');
|
||||
|
||||
let lastActivity = new Date().getTime();
|
||||
let lastActivityTimeout = 1000 * 60 * 5; // 5 minutes
|
||||
|
||||
let currentUser = null;
|
||||
|
||||
document.addEventListener('click', function() {
|
||||
lastActivity = new Date().getTime();
|
||||
});
|
||||
|
||||
setInterval(function() {
|
||||
let now = new Date().getTime();
|
||||
if(now - lastActivity > lastActivityTimeout) {
|
||||
window.location.href = '/';
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
// Attach event listeners to all numpad buttons
|
||||
let numpadButtons = numpad.getElementsByTagName('button');
|
||||
for(let i = 0; i < numpadButtons.length; i++) {
|
||||
|
@ -3,7 +3,8 @@
|
||||
<input id="scannerField" type="text"/>
|
||||
<section class="section container" id="mainSelect">
|
||||
<h1 class="title">Produktverwaltung</h1>
|
||||
<p class="heading"><button class="js-modal-trigger button" data-target="modal-js-example">
|
||||
<p class="heading buttons">
|
||||
<button class="js-modal-trigger button" data-target="modal-js-example">
|
||||
Neues Produkt anlegen
|
||||
</button><button class="js-modal-trigger button" data-target="modal-restock" id="btn_restock">
|
||||
Lager nachfüllen
|
||||
|
@ -10,7 +10,8 @@
|
||||
<div id="date"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/static/apiWrapper.js"></script>
|
||||
<script src="/static/pageDriver.js"></script>
|
||||
<script src="/static/js/lockscreenBgHandler.js"></script>
|
||||
|
||||
<%~ include("partials/base_foot.eta") %>
|
||||
<%~ include("partials/base_foot.eta") %>
|
||||
|
Loading…
x
Reference in New Issue
Block a user