Restyle admin UI to dark theme, fix Docker /data volume permissions
- Rework the admin UI (topbar, sidebar, cards, tables, badges, stat tiles) into a dark theme with a light/dark toggle, matching the visual style requested for the project. - Fix Dockerfile: chown /data to the distroless nonroot uid/gid before the VOLUME declaration so a freshly created named volume is seeded with writable permissions instead of root:root (was causing "unable to open database file" on first run). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QTXFrNP1imCW7jtfL5SZrw
This commit is contained in:
@@ -2,6 +2,24 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
// Light/dark theme toggle, persisted in localStorage.
|
||||
var themeBtn = document.querySelector("[data-theme-toggle]");
|
||||
if (themeBtn) {
|
||||
var icon = themeBtn.querySelector("i");
|
||||
function syncIcon() {
|
||||
var isLight = document.documentElement.getAttribute("data-bs-theme") === "light";
|
||||
icon.className = isLight ? "bi bi-sun" : "bi bi-moon-stars";
|
||||
}
|
||||
syncIcon();
|
||||
themeBtn.addEventListener("click", function () {
|
||||
var current = document.documentElement.getAttribute("data-bs-theme") === "light" ? "light" : "dark";
|
||||
var next = current === "dark" ? "light" : "dark";
|
||||
document.documentElement.setAttribute("data-bs-theme", next);
|
||||
localStorage.setItem("vp-theme", next);
|
||||
syncIcon();
|
||||
});
|
||||
}
|
||||
|
||||
// Generic delete-confirmation modal. Any element with
|
||||
// data-confirm-delete-form="<form id>" and data-confirm-message="..."
|
||||
// opens #confirmDeleteModal and, on confirm, submits the named form.
|
||||
|
||||
Reference in New Issue
Block a user