Phase 13, part 3: signing up, and several teams per person

On the multi-tenant edition anyone can set up a team: their account, the
company and its website, whose registered domain the team works on (the
profile keeps to it). A person can belong to several teams and switch
between them from the sidebar, or set up another. Inviting someone who has
an account adds them to the team.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-25 12:17:15 -07:00
co-authored by Claude Opus 5.5
parent 210b1e57fc
commit d5fb1898e8
16 changed files with 545 additions and 13 deletions
+6
View File
@@ -28,6 +28,12 @@
<div class="shell">
<aside class="sidebar" id="sidebar">
<a class="brand" href="/"><img class="logo" src="/static/logo.png" alt="" width="28" height="28">Supermarket</a>
{{if .Teams}}<form class="team-switch" method="post" action="/teams/switch">
<label class="visually-hidden" for="team-pick">Team</label>
<select name="team" id="team-pick" data-autosubmit>{{range .Teams}}<option value="{{.ID}}" {{if eq .ID $.TeamID}}selected{{end}}>{{.Name}}</option>{{end}}</select>
<noscript><button type="submit" class="secondary small">Switch</button></noscript>
<a href="/teams/new" class="small">New team</a>
</form>{{end}}
<form class="search" action="/search" method="get" role="search">
{{template "icon" "search"}}
<input type="search" name="q" value="{{.Query}}" placeholder="Search" aria-label="Search" id="search-box">