fix: save auto-refreshes cameras and switches to Live Wall — no restart needed

This commit is contained in:
Claus Lohmar 2026-08-05 12:06:12 +01:00
parent e94d49253e
commit 9de8536bdf

View file

@ -326,8 +326,14 @@ document.getElementById('btn-save').addEventListener('click', async () => {
});
const j = await r.json();
if (j.success) {
status.textContent = '✅ Configuration saved! Restart may be required.';
// Reload cameras from the server (in-memory config is now updated).
await loadCameras();
renderLiveGrid();
renderPlaybackCameras();
renderCameraCards();
status.textContent = '✅ Cameras saved! Switching to Live Wall...';
status.style.color = 'var(--green)';
setTimeout(() => switchTab('live'), 800);
} else {
status.textContent = '❌ Save failed: ' + j.error;
status.style.color = 'var(--red)';