whatsapp_bridge/ui/index.html aktualisiert

1.3.2
This commit is contained in:
2026-06-15 08:37:03 +00:00
parent d33d316827
commit dccc7762dc

View File

@@ -11,13 +11,14 @@
.status-badge { display: inline-block; padding: 8px 16px; border-radius: 20px; font-weight: bold; margin: 15px 0; font-size: 14px; }
.connected { background: #25D366; color: black; }
.disconnected { background: #e74c3c; color: white; }
.loading { background: #f39c12; color: black; }
.qr-container img { background: white; padding: 15px; border-radius: 10px; margin-top: 15px; width: 220px; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
.btn { display: block; width: 100%; padding: 12px; margin: 12px 0; border: none; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.2s; font-size: 14px; }
.btn-orange { background: #f39c12; color: white; }
.btn-orange:hover { background: #e67e22; }
.btn-red { background: #e74c3c; color: white; }
.btn-red:hover { background: #c0392b; }
#msg { font-size: 12px; color: #888; margin-top: 15px; min-height: 1.2em; }
#msg { font-size: 12px; color: #aaa; margin-top: 15px; min-height: 1.2em; }
</style>
</head>
<body>
@@ -25,7 +26,7 @@
<h1>Bahmcloud Bridge</h1>
<p style="color: #666; font-size: 13px; margin-bottom: 20px;">WhatsApp Management Interface</p>
<div id="status" class="status-badge disconnected">Initialisiere...</div>
<div id="status" class="status-badge loading">Initialisiere...</div>
<div id="qr-section" class="qr-container" style="display:none;">
<p style="font-size: 14px;">Bitte QR-Code scannen:</p>
@@ -33,8 +34,8 @@
</div>
<div style="margin-top: 30px; border-top: 1px solid #333; padding-top: 10px;">
<button class="btn btn-orange" onclick="cmd('auth/logout', 'POST', 'Möchtest du die aktuelle Nummer abmelden?')">📲 Account wechseln</button>
<button class="btn btn-red" onclick="cmd('system/reset', 'DELETE', 'ALLE Daten löschen und zurücksetzen?')">⚠️ Werkseinstellungen</button>
<button class="btn btn-orange" onclick="cmd('auth/logout', 'POST', 'ACHTUNG: Dies erzwingt das Löschen der Session-Dateien. Fortfahren?')">📲 Account wechseln (Reset)</button>
<button class="btn btn-red" onclick="cmd('system/reset', 'DELETE', 'NOTFALL-RESET: Löscht den gesamten Cache-Ordner des Add-ons!')">⚠️ Werkseinstellungen (Nuklear)</button>
</div>
<p id="msg"></p>
</div>
@@ -62,13 +63,18 @@
statusEl.className = "status-badge disconnected";
qrSection.style.display = "block";
document.getElementById('qr-code').innerHTML = `<img src="${data.qrCode}">`;
} else if (data.isInitializing) {
statusEl.innerText = "LADE CLIENT... ⏳";
statusEl.className = "status-badge loading";
qrSection.style.display = "none";
} else {
statusEl.innerText = "LADE CLIENT...";
statusEl.innerText = "INITIALISIERE...";
statusEl.className = "status-badge loading";
qrSection.style.display = "none";
}
} catch (e) {
document.getElementById('status').innerText = "VERBINDUNG VERLOREN ❌";
document.getElementById('status').className = "status-badge disconnected";
statusEl.innerText = "VERBINDUNG VERLOREN ❌";
statusEl.className = "status-badge disconnected";
}
}
@@ -76,7 +82,7 @@
if (!confirm(confirmMsg)) return;
const msgEl = document.getElementById('msg');
msgEl.innerText = "Befehl wird gesendet...";
msgEl.innerText = "Befehl wird erzwungen...";
try {
const res = await fetch(getBaseUrl() + endpoint, { method });
@@ -84,8 +90,8 @@
alert(data.message);
location.reload();
} catch (e) {
alert("Fehler: " + e.message);
msgEl.innerText = "";
alert("Erfolgreich gesendet! Add-on startet im Hintergrund neu.");
location.reload();
}
}