diff --git a/data/settings.html b/data/settings.html
index 1a7abff..fc9dec1 100644
--- a/data/settings.html
+++ b/data/settings.html
@@ -344,6 +344,7 @@
loadCurrentTime();
updateCurrentTimeDisplay();
loadWifiSettings();
+ loadMode();
};
// Aktuelle Zeit anzeigen (Live-Update)
@@ -525,6 +526,23 @@
.catch(error => showMessage('Verbindungsfehler', 'error'));
});
+ function loadMode() {
+ fetch("/api/get-mode")
+ .then((response) => response.json())
+ .then((data) => {
+ const mode = data.mode || "individual";
+ document.querySelectorAll('.mode-button').forEach(button => {
+ button.classList.remove('active');
+ });
+ const btn = document.querySelector(`.mode-button[data-mode="${mode}"]`);
+ if (btn) btn.classList.add('active');
+ })
+ .catch((error) => {
+ showMessage("Fehler beim Laden des Modus", "error");
+ });
+}
+
+
// Einstellungen laden
function loadSettings() {
fetch("/api/get-settings")
diff --git a/src/communication.h b/src/communication.h
index 614ebb1..5e299a0 100644
--- a/src/communication.h
+++ b/src/communication.h
@@ -12,6 +12,7 @@
#include "statusled.h"
#include "timesync.h"
#include "webserverrouter.h"
+#include
#include