Updated 4 files (automated)

mane
Mia Raindrops 4 months ago
parent d99ce89ce4
commit 02a5c7caf8
Signed by: Mia Raindrops
GPG Key ID: EFBDC68435A574B7

3
.gitignore vendored

@ -1 +1,2 @@
video.mp4
video.mp4
delta-kiosk-*

@ -6,10 +6,59 @@
<style>
* {
font-family: system-ui, -apple-system, sans-serif;
user-select: none;
cursor: default;
}
.users-list-user {
cursor: pointer;
background: rgba(0, 0, 0, .1);
padding: 10px 20px;
border-bottom: 1px solid rgba(0, 0, 0, .1);
}
.users-list-user:nth-child(1) {
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.users-list-user:nth-last-child(1) {
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
border-bottom-color: transparent;
}
.users-list-user:hover {
background: rgba(0, 0, 0, .2);
}
.users-list-user:active, .users-list-user:focus {
background: rgba(0, 0, 0, .3);
}
#users {
font-size: 24px;
position: fixed;
inset: 0;
background: rgba(255, 255, 255, .5);
display: flex;
align-items: center;
justify-content: center;
text-align: center;
z-index: 9999;
backdrop-filter: blur(50px);
}
#users-inner {
background: white;
border-radius: 10px;
padding: 50px;
width: 50vw;
}
#users-list {
list-style: none;
padding: 0;
}
</style>
</head>
@ -20,16 +69,18 @@
<div style="position: fixed; inset: 0; z-index: 999; cursor: pointer;" onclick="start();"></div>
</div>
<div id="users" style="display: none; margin: 10px 20px; font-size: 24px;">
<h1 id="users-title">Bienvenue sur Delta</h1>
<div id="users" style="display: none;">
<div id="users-inner">
<h1 id="users-title">Bienvenue sur Delta</h1>
<div id="users-list-outer">
<p id="users-text">Cliquez sur votre nom pour commencer.</p>
<ul id="users-list"></ul>
</div>
<div id="users-list-outer">
<p id="users-text">Cliquez sur votre nom pour commencer.</p>
<ul id="users-list"></ul>
</div>
<div id="users-loader" style="display: none;">
<p>Veuillez patienter... En attente d'approbation par un administrateur.</p>
<div id="users-loader" style="display: none;">
<p>Veuillez patienter... En attente d'approbation par un administrateur.</p>
</div>
</div>
</div>
@ -67,8 +118,7 @@
}
function start() {
document.getElementById("welcome").style.display = "none";
document.getElementById("users").style.display = "block";
document.getElementById("users").style.display = "flex";
clearTimeout(window.authTimeout);
window.authTimeout = setTimeout(end, 60000);
}
@ -104,6 +154,8 @@
})
await document.getElementById("webview").loadURL("https://delta.equestria.dev");
document.getElementById("webview").style.display = "flex";
document.getElementById("users").style.display = "none";
document.getElementById("welcome").style.display = "none";
clearInterval(window.authApprovalInterval);
clearTimeout(window.authTimeout);
@ -111,6 +163,10 @@
if (document.getElementById("webview").getURL().endsWith("/login/")) {
end();
}
if (document.getElementById("webview").getURL().endsWith("/_dev.equestria.delta.kiosk.ShutdownKiosk")) {
window.close();
}
});
window.browsingTimeout2 = setTimeout(() => {
@ -119,6 +175,12 @@
}
}, 1000);
}
window.onerror = (event, source, lineno, colno, error) => {
try { end(); } catch (e) {}
console.error(error);
alert("Une erreur s'est produite, l'application est peut-être devenue instable. Si vous rencontrez d'autres problèmes, contacter un administrateur.");
}
</script>
<webview id="webview" src="about:blank" style="display: none;position: fixed;inset: 0;height: 100vh;"></webview>
</body>

@ -23,12 +23,8 @@ const createWindow = () => {
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) createWindow()
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') app.quit();
app.quit();
})

@ -1,4 +1,5 @@
{
"name": "delta-kiosk",
"scripts": {
"start": "electron index.js"
},

Loading…
Cancel
Save