Round out the editor: head widgets, undo, group/split-column, site settings

- Head widgets are now first-class in dashboard edit mode: they get
  drag/edit/delete handles, their own SortableJS group (so they can't
  cross into columns), and the layout endpoint accepts a
  headWidgets[] sequence alongside columns[].
- New POST /edit/api/restore swaps glance.yml ↔ glance.yml.bak —
  effectively undo (and click again to redo). Surfaced as a "Restore
  previous version" button on /edit.
- group and split-column are now editable inline via a new
  list-of-widgets schema type. Each item picks a widget type from a
  dropdown (excluding group/split-column to honor the backend's
  no-nesting rule) and renders that type's schema-driven sub-form.
  Switching the type re-renders the body.
- New /edit/site-settings page with a form for branding (app name,
  logo, favicon, footer, app icon/background). POST applies via the
  same surgical yaml.Node update used for widgets. Theme/server
  intentionally still YAML for now.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
uhlwoogi
2026-04-30 20:43:52 +00:00
co-authored by Claude Opus 4.7
parent 7f36f30dad
commit e108feb74b
8 changed files with 463 additions and 27 deletions
+31
View File
@@ -557,3 +557,34 @@ textarea.edit-input {
border-color: var(--color-primary);
color: var(--color-primary);
}
/* ---------- Nested widget editor (group / split-column) ---------- */
.edit-nested-widget {
border: 1px solid var(--color-widget-content-border);
border-radius: 4px;
padding: 0.6rem;
background: rgba(0, 0, 0, 0.1);
}
.edit-nested-header {
display: flex;
gap: 0.5rem;
align-items: center;
margin-bottom: 0.6rem;
}
.edit-nested-type {
background: var(--color-widget-background);
border: 1px solid var(--color-widget-content-border);
border-radius: 3px;
color: var(--color-text-base);
font: inherit;
font-size: var(--font-size-h5);
padding: 0.2rem 0.4rem;
flex: 1;
}
.edit-nested-body > .edit-field:last-child {
margin-bottom: 0;
}