mise en place code panda sur html

This commit is contained in:
2026-03-27 15:00:11 +01:00
parent 9d3c201672
commit afee1262eb
2 changed files with 30 additions and 4 deletions

View File

@@ -257,6 +257,11 @@
<span class="a-label">💡 LED</span>
<span class="a-sub">Contrôler la LED</span>
<span class="a-arrow"></span>
</button>
<button class="action-btn" onclick="callAlarm()">
<span class="a-label">💡 Alarme</span>
<span class="a-sub">Contrôler la alarme</span>
<span class="a-arrow"></span>
</button>
<button class="action-btn" onclick="showToast('Fonction à venir...')">
<span class="a-label">⚙️ Paramètres</span>
@@ -292,7 +297,8 @@
updateClock();
setInterval(updateClock, 1000);
async function callLed() {
async function callLed() {
try {
const res = await fetch('/led', {
method: 'POST',
@@ -302,6 +308,16 @@
} catch {
showToast("Erreur lors de l'appel LED.");
}
} async function callAlarm() {
try {
const res = await fetch('/alarme', {
method: 'POST',
headers: { 'Content-Type': 'application/json' }
});
showToast("alarme activée !");
} catch {
showToast("Erreur lors de l'appel alarme.");
}
}
function go_admin() {