fix: admin panel light/dark theme support, improved contrast, and backup confirmation

a) Admin panel now respects the site's light/dark theme toggle via CSS
   custom properties that respond to [data-theme='light'] on <html>.
   All hardcoded dark colors replaced with semantic CSS variables.

b) Improved contrast in dark mode: secondary text changed from #666/#555
   to #a0a0a0, muted text from #555 to #707070. All text is now clearly
   readable against dark backgrounds.

c) Backup system was already implemented in yaml-service.ts (creates
   timestamped backups in content/.backups/ before each save, keeps last
   10 versions). Now the UI shows a confirmation message that a backup
   was created after each successful save.
This commit is contained in:
ralksta
2026-05-29 17:20:56 +02:00
parent 4a0b57b932
commit b4fa37d680
5 changed files with 172 additions and 121 deletions

View File

@@ -123,9 +123,10 @@ export default function SettingsEditor() {
});
if (res.ok) {
const data = await res.json();
setDirty(false);
setSaveMessage('Saved!');
setTimeout(() => setSaveMessage(''), 3000);
setSaveMessage(data.message || 'Saved!');
setTimeout(() => setSaveMessage(''), 5000);
} else {
const err = await res.json();
setSaveMessage(`Error: ${err.error}`);