Files
supermarket/internal/web/templates/dashboard.html
T
davidandClaude Opus 5.5 a89121f1ec 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>
2026-11-21 07:50:24 -07:00

61 lines
1.9 KiB
HTML

{{define "content"}}{{$inbox := .Inbox}}{{with .Data}}
<div class="page-head">
<h1>Overview</h1>
<p class="lede">Supermarket's modules, and what's left to set up.</p>
</div>
<div class="grid">
{{range .Modules}}
{{if .Link}}
<a class="card module" href="{{.Link}}">
<h3>{{template "icon" .ID}}{{.Name}} <span class="badge">{{.Phase}}</span></h3>
<p>{{.Body}}</p>
{{if eq .ID "content"}}<span class="stat">{{if $inbox}}{{$inbox}} waiting in the Inbox{{else}}Inbox empty{{end}}{{with $.Data.Scheduled}} · {{.}} scheduled{{end}}</span>{{end}}
</a>
{{else}}
<section class="card module later">
<h3>{{template "icon" .ID}}{{.Name}} <span class="badge">{{.Phase}}</span></h3>
<p>{{.Body}}</p>
</section>
{{end}}
{{end}}
</div>
{{if .Pending}}
<section class="card">
<h2>Setup</h2>
<ul class="steps">
{{range .Steps}}
<li class="{{if .Done}}done{{else}}todo{{end}}">
<a href="{{.Link}}"><strong>{{.Label}}</strong></a>
<span>{{.Detail}}</span>
</li>
{{end}}
</ul>
</section>
{{else}}
<details class="card">
<summary>Setup: all done</summary>
<ul class="steps">
{{range .Steps}}
<li class="done"><a href="{{.Link}}"><strong>{{.Label}}</strong></a><span>{{.Detail}}</span></li>
{{end}}
</ul>
</details>
{{end}}
{{if .ImportErr}}
<section class="card warn">
<h2>Import from the old app failed</h2>
<p>{{.ImportErr}}</p>
<p>The old files are untouched in the data folder's <code>import/</code> directory. Fix the file named above and restart Supermarket (<code>supermarket restart</code>) to try again.</p>
</section>
{{else if .ImportStatus}}
<details class="card">
<summary>Imported from the old terminal app {{ago .ImportStatus.At}}</summary>
<ul>{{range .ImportStatus.Summary}}<li>{{.}}</li>{{end}}</ul>
{{if .QueuedPosts}}<p>Its queued posts are now drafts: <a href="/inbox">{{.QueuedPosts}} waiting in the Inbox</a>.</p>{{end}}
</details>
{{end}}
{{end}}{{end}}