Phase 9, part 1: editions and their settings
SUPERMARKET_MODE picks local (the default), server or multi. internal/config reads and checks every setting the editions need (database, secret key, storage, the app's own mail, an https address), reporting all problems at once. supermarket config prints them without passwords; supermarket secret-key makes a key. Settings -> About shows the edition. Server and multi-tenant are checked but refuse to start until they're built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
{{define "content"}}{{template "settings-start" .}}{{with .Data}}
|
||||
<h2>About</h2>
|
||||
<p class="lede">This Supermarket: its edition, its version, and where it keeps things.</p>
|
||||
|
||||
<section class="card">
|
||||
<h2>{{.Edition.Name}} edition</h2>
|
||||
<dl class="facts">
|
||||
<dt>Version</dt><dd>{{.Version}} <span class="muted">· database schema {{.Schema}}</span></dd>
|
||||
{{range .Items}}<dt>{{.Name}}</dt><dd>{{.Value}}{{if .Help}} <span class="help">{{.Help}}</span>{{end}}</dd>
|
||||
{{end}}
|
||||
</dl>
|
||||
{{if eq (print .Edition) "local"}}
|
||||
<p class="help">Supermarket also comes as a <strong>server</strong> edition, for a team signing in on a server, and a <strong>multi-tenant</strong> one, for many teams at one address. The edition is chosen with <code>SUPERMARKET_MODE</code> when it starts; <code>supermarket config</code> checks the settings.</p>
|
||||
{{end}}
|
||||
</section>
|
||||
{{end}}{{template "settings-end"}}{{end}}
|
||||
@@ -136,6 +136,7 @@
|
||||
<a href="/settings/ai" {{if eq .Nav "settings/ai"}}aria-current="page"{{end}}>{{template "icon" "ai"}}AI</a>
|
||||
<div class="nav-label">Data</div>
|
||||
<a href="/settings/backups" {{if eq .Nav "settings/backups"}}aria-current="page"{{end}}>{{template "icon" "backups"}}Backups</a>
|
||||
<a href="/settings/about" {{if eq .Nav "settings/about"}}aria-current="page"{{end}}>{{template "icon" "info"}}About</a>
|
||||
</nav>
|
||||
<div class="settings-body">
|
||||
{{end}}
|
||||
@@ -183,6 +184,7 @@
|
||||
{{- else if eq . "accounts"}}<circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m8.59 13.51 6.83 3.98"/><path d="m15.41 6.51-6.82 3.98"/>
|
||||
{{- else if eq . "ai"}}<path d="M12 8V4H8"/><rect width="16" height="12" x="4" y="8" rx="2"/><path d="M2 14h2"/><path d="M20 14h2"/><path d="M15 13v2"/><path d="M9 13v2"/>
|
||||
{{- else if eq . "core"}}<path d="M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z"/><path d="m2 22 3-3"/><path d="M7.5 13.5 10 11"/><path d="M10.5 16.5 13 14"/><path d="m18 3-4 4h6l-4 4"/>
|
||||
{{- else if eq . "info"}}<circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/>
|
||||
{{- else if eq . "backups"}}<path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/><path d="M12 7v5l4 2"/>
|
||||
{{- else if eq . "chevron"}}<path d="m6 9 6 6 6-6"/>
|
||||
{{- else if eq . "menu"}}<path d="M4 12h16"/><path d="M4 6h16"/><path d="M4 18h16"/>
|
||||
|
||||
Reference in New Issue
Block a user