Web dashboard step 5: settings page with toml_edit writer
Schema derived from Config::default() and the live config, help text for every shipped key, env locks and presence-only secrets, typed saves that preserve comments and validate through Config::load before an atomic rename, provider add/remove, the change history, and config reload on mtime. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHyYupFdBiR4VfoUM7NjSM
This commit is contained in:
@@ -39,3 +39,11 @@ document.querySelectorAll("details[id]").forEach((details) => {
|
||||
details.addEventListener("toggle", () => localStorage.setItem(key, details.open ? "open" : "closed"));
|
||||
} catch (_) {}
|
||||
});
|
||||
/* step 5: settings — "reset to default" fills the field with its default */
|
||||
document.addEventListener("click", (event) => {
|
||||
const button = event.target.closest("button[data-reset]");
|
||||
if (!button) return;
|
||||
const input = document.getElementById(button.dataset.reset);
|
||||
if (!input) return;
|
||||
input.value = button.dataset.default;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user