Files
supermarket/internal/web/templates/data.html
T
davidandClaude Opus 5.5 b8a64e258a Phase 13, part 8: a team's data is theirs
The owner exports everything from Settings → Your data (the keys only with
their password), and can delete the team: it closes at once, everyone in it
is told, it can be undone for 30 days, and then its schema, files, agents
and memberships go for good.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 12:40:28 -07:00

31 lines
2.2 KiB
HTML

{{define "content"}}{{template "settings-start" .}}{{with .Data}}
<h2>Your data</h2>
<p class="lede">Everything in Supermarket is yours to take with you: an export holds every table's rows, readable by <code>supermarket import</code> into any Supermarket.</p>
{{with .Problem}}<p class="error" role="alert">{{.}}</p>{{end}}
<form class="card" method="post" action="/settings/data/export">
<h3>Export everything</h3>
<p class="help">The keys and tokens (social sign-ins, API keys) are left out, unless you ask for them, which needs your password: then keep the file as safe as they are.</p>
<label class="check small"><input type="checkbox" name="with_secrets"> Include the keys and tokens</label>
<label class="small">Your password <span class="muted">(only with the keys)</span> <input type="password" name="password" autocomplete="current-password"></label>
<button type="submit" data-busy="Exporting…">Export</button>
</form>
{{if .Exports}}
<section class="card">
<table class="list"><thead><tr><th>Export</th><th class="num">Size</th><th>Made</th><th></th></tr></thead>
<tbody>{{range .Exports}}<tr>
<td><a href="/settings/data/exports/{{slice .Key 8}}">{{slice .Key 8}}</a></td><td class="num">{{bytes .Size}}</td><td>{{ago .Modified}}</td>
<td><form class="inline" method="post" action="/settings/data/exports/{{slice .Key 8}}/delete"><button type="submit" class="secondary small">Delete</button></form></td>
</tr>{{end}}</tbody></table>
</section>
{{end}}
{{if .Multi}}{{with .Team}}
<form class="card danger-zone" method="post" action="/settings/data/delete-team" data-confirm="Delete {{.Name}}? Everyone in it is told, and you have 30 days to undo it.">
<h3>Delete the team</h3>
<p>The team closes at once; everyone in it ({{$.Data.Members}}) gets an email. For 30 days you can undo it; then its data and files go for good. Export first, if you want to keep anything.</p>
<label class="small">Type the team's name, <strong>{{.Name}}</strong> <input name="confirm" required></label>
<label class="small">Your password <input type="password" name="password" autocomplete="current-password" required></label>
<button type="submit" class="danger">Delete {{.Name}}</button>
</form>
{{end}}{{end}}
{{end}}{{template "settings-end"}}{{end}}