Redesign the UI on brain's look: sidebar with search, Overview, modules, grouped Settings

- Left sidebar as in brain: search at the top (press /), Overview,
  Inventory, the modules (Content with Inbox, Sources, Scheduled and
  Published; later phases greyed out), Settings at the bottom; a top bar
  with breadcrumbs, and a menu that slides in on narrow screens.
- brain's colour tokens, type, radius and shadows, with a dark theme that
  follows the system setting.
- Settings as grouped tabs: Profile; Social accounts (was Credentials, now
  keys and sign-in together per network); Core & Hermes; AI, which now
  holds the API keys too. Old addresses redirect.
- /search matches every word across posts, fetched items, the inventory,
  products and settings pages.
- Overview: a card per module, then the setup checklist, folded once done.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 07:50:24 -07:00
co-authored by Claude Opus 5.5
parent 81a7d0596c
commit a89121f1ec
29 changed files with 1141 additions and 364 deletions
+37
View File
@@ -0,0 +1,37 @@
{{define "content"}}{{template "settings-start" .}}{{with .Data}}{{$set := .Set}}
<h2>Social accounts</h2>
<p class="lede">The keys Supermarket reads posts with, and the sign-ins it publishes with. Keys are kept in <code>secrets.json</code> in Supermarket's data folder, readable only by you; saved values are never shown, and an empty field keeps what's saved.</p>
{{/* The key fields of every card belong to this one form (form="accounts"),
so each card's Save saves them all, and the sign-in forms aren't nested. */}}
<form method="post" action="/settings/accounts" id="accounts"></form>
{{range .Networks}}{{$name := .Name}}
<section class="card network">
<h2>{{.Name}}
{{with .Connect}}{{if .Signed}}<span class="badge published">connected{{with .Account}} as {{.}}{{end}}</span>{{else}}<span class="badge">not connected</span>{{end}}{{end}}
</h2>
{{range .Fields}}
<div class="secret">
<label>{{.Label}}
<input type="password" name="{{.Name}}" form="accounts" autocomplete="off" placeholder="{{if index $set .Name}}saved — type to replace{{else}}not set{{end}}">
{{if .Help}}<span class="help">{{.Help}}</span>{{end}}
</label>
{{if index $set .Name}}<label class="check small"><input type="checkbox" name="remove:{{.Name}}" form="accounts"> remove</label>{{end}}
</div>
{{end}}
<button type="submit" form="accounts" class="secondary">Save keys</button>
{{with .Connect}}
<div class="signin">
<h3>Sign in to post</h3>
{{if .Signed}}<p>Connected{{with .Account}} as <strong>{{.}}</strong>{{end}}{{if not .At.IsZero}}, {{ago .At}}{{end}}.</p>{{end}}
<p class="help">{{.Setup}} <code>{{.Redirect}}</code>{{with .Note}}<br>{{.}}{{end}}</p>
<form method="post" action="/auth/{{.Provider}}/start">
<button type="submit" {{if not .Ready}}disabled title="Save the client ID{{if ne .Provider "x"}} and secret{{end}} first"{{end}}>{{if .Signed}}Reconnect{{else}}Connect{{end}} {{$name}}</button>
</form>
</div>
{{end}}
</section>
{{end}}
{{end}}{{template "settings-end"}}{{end}}