26 lines
1.2 KiB
JavaScript
26 lines
1.2 KiB
JavaScript
|
|
export class LockdownWall extends HTMLElement {
|
||
|
|
connectedCallback() {
|
||
|
|
fetch("/artemis/lockdown")
|
||
|
|
.then((r) => r.json())
|
||
|
|
.then((result) => {
|
||
|
|
if(result.lockdown) {
|
||
|
|
if (!document.querySelector('lockdown-wall-item')) {
|
||
|
|
let sound = new Audio("/sound/alert.mp3")
|
||
|
|
let wall = document.createElement('lockdown-wall-item');
|
||
|
|
wall.innerHTML = `
|
||
|
|
<div class="content" style="padding: 20px; background: #ffcccc; color: #900; font-weight: bold; text-align: center; border: 2px solid #900; border-radius: 8px; max-width: 600px; margin: 30px auto; font-family: Arial, sans-serif;">
|
||
|
|
<h2><warn>/!\\ </warn> - Protection MAINFRAME - <warn>/!\\ </warn></h2>
|
||
|
|
<p>Verrouillage complet de l'application est en cours, aucune action n'est possible.</p>
|
||
|
|
</div>
|
||
|
|
`;
|
||
|
|
document.body.appendChild(wall);
|
||
|
|
|
||
|
|
setInterval(() => {
|
||
|
|
sound.play();
|
||
|
|
}, 30000)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|