Download this file
| 1 | {{define "settings-nav"}}<nav equipo-settings-nav aria-label="{{copy "nav.settings"}}"><h2 equipo-settings-nav-title>{{copy "nav.settings"}}</h2><ul role="list">{{range .SettingsNav}}<li><a href="{{.Href}}" equipo-settings-link data-settings-link="{{.Key}}"{{if .Current}} aria-current="page"{{end}}>{{icon .Icon}}<span>{{copy .CopyKey}}</span>{{icon "chevron-right"}}</a></li>{{end}}</ul></nav>{{end}} |
| 2 | {{define "settings-up"}}{{if .Settings.Root}}/work#nav-settings-hub{{else}}/conversation/settings{{end}}{{end}} |
| 3 | {{define "settings-up-label"}}{{if .Settings.Root}}{{.TeamName}}{{else}}{{copy "nav.settings"}}{{end}}{{end}} |
| 4 | {{define "settings-rail"}}<nav rst-shell-nav equipo-settings-rail{{if .RailArriving}} data-arriving{{end}} aria-label="{{copy "nav.settings"}}"><a href="/conversation" equipo-settings-leave data-settings-leave>{{icon "chevron-left"}}<span>{{copy "brand"}}</span></a><p equipo-nav-group>{{copy "nav.settings"}}</p>{{range .SettingsNav}}<a href="{{.Href}}" data-rail-settings="{{.Key}}"{{if and .Current (not $.Models.Adding) (not $.Machines.Adding)}} aria-current="page"{{end}}>{{icon .Icon}}<span>{{copy .CopyKey}}</span></a>{{if eq .Key "connections"}}<a href="/conversation/settings/connections/add" equipo-settings-sub data-rail-settings="connections-add"{{if $.Models.Adding}} aria-current="page"{{end}}>{{icon "plus"}}<span>{{copy "chat.connections.add"}}</span></a>{{end}}{{if eq .Key "machines"}}<a href="/conversation/settings/machines/add" equipo-settings-sub data-rail-settings="machines-add"{{if $.Machines.Adding}} aria-current="page"{{end}}>{{icon "plus"}}<span>{{copy "machines.add"}}</span></a>{{end}}{{end}}</nav>{{end}} |
| 5 | {{/* The one Settings page pattern (Paul, 2026-11-11: "make sure all the |
| 6 | settings screens have proper UX and aren't just random forms"): |
| 7 | settings-head is every section's title and its one line; a section |
| 8 | is groups ([equipo-sp-group]), each a heading, a line, and a card of |
| 9 | rows with the label on the left and the control on the right. A |
| 10 | group either applies each control at once (a Saved tick by its |
| 11 | heading) or holds editable fields saved together from the savebar, |
| 12 | never both. */}} |
| 13 | {{define "settings-head"}}<header equipo-sp-head><h1>{{copy .Title}}</h1>{{with .Lede}}<p>{{copy .}}</p>{{end}}</header>{{end}} |
| 14 | {{/* savebar: the bar fixed to the foot of the screen for a form of |
| 15 | editable fields, Save on the right. settings.js disables Save until |
| 16 | something changes, shows Unsaved changes and Discard, warns before |
| 17 | leaving, and saves in place; without script Save just submits. */}} |
| 18 | {{define "savebar"}}<div equipo-savebar data-savebar><div equipo-savebar-in><p equipo-savebar-note aria-live="polite"><span data-savebar-unsaved hidden>{{copy "settings.unsaved"}}</span><span data-savebar-saved hidden>{{icon "check"}}{{copy "settings.saved"}}</span></p><button type="reset" rst-btn data-quiet data-savebar-discard hidden>{{copy "settings.discard"}}</button><button rst-btn="primary" type="submit" data-savebar-save>{{copy "form.save"}}</button></div></div>{{end}} |
| 19 | |