oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1{{/* The inner screens' parts: the living mark, avatars and monograms,
2 the stage track, badges, the row and the decision card. Every row is
3 clickable as a whole through its title link's ::after; the few
4 controls inside a row sit above it. */}}
5{{define "mark"}}<span equipo-sparkle equipo-mark{{if eq . "s"}} data-size="s"{{end}} aria-hidden="true"><svg viewBox="0 0 16 16" focusable="false"><path d="M8 0C8.6 4.6 11.4 7.4 16 8 11.4 8.6 8.6 11.4 8 16 7.4 11.4 4.6 8.6 0 8 4.6 7.4 7.4 4.6 8 0Z"/><circle cx="8" cy="8" r="1.7"/></svg><i data-sat="1"></i><i data-sat="2"></i><i data-sat="3"></i>{{if ne . "s"}}<i data-mote data-m="1"></i><i data-mote="light" data-m="2"></i><i data-mote data-m="3"></i>{{end}}</span>{{end}}
6{{define "elapsed"}}<span equipo-clock data-since="{{since .}}">{{elapsed .}}</span>{{end}}
7{{define "av"}}<span equipo-av data-h="{{.Hue}}" title="{{.Address}}" aria-hidden="true">{{.Initials}}</span>{{end}}
8{{define "av-l"}}<span equipo-av data-size="l" data-h="{{.Hue}}" title="{{.Address}}" aria-hidden="true">{{.Initials}}</span>{{end}}
9{{define "who"}}<span equipo-who>{{template "av" .}}<span title="{{.Address}}">{{if .You}}{{copy "work.you"}}{{else}}{{.Name}}{{end}}</span></span>{{end}}
10{{define "mono"}}<span equipo-mono data-h="{{.Hue}}" title="{{.Title}}" aria-hidden="true">{{.Letter}}</span>{{end}}
11{{define "mono-l"}}<span equipo-mono data-size="l" data-h="{{.Hue}}" title="{{.Title}}" aria-hidden="true">{{.Letter}}</span>{{end}}
12{{define "mono-s"}}<span equipo-mono data-size="s" data-h="{{.Hue}}" aria-hidden="true">{{.Letter}}</span>{{end}}
13{{define "track"}}<ol equipo-track role="img" aria-label="{{.StepLabel}}">{{range .Track}}<li data-s="{{.State}}"{{if .Tone}} data-tone="{{.Tone}}"{{end}}{{if .Live}} data-live{{end}} title="{{.Label}}">{{if .Live}}{{template "mark" "s"}}{{end}}</li>{{end}}</ol>{{end}}
14{{define "track-full"}}<ol equipo-track-full data-track data-track-task="{{.ID}}" aria-label="{{.StageLine}}">{{range .Track}}<li data-s="{{.State}}"{{if .Tone}} data-tone="{{.Tone}}"{{end}}{{if .Live}} data-live{{end}}{{if .Working}} data-working{{end}}{{if eq .State "current"}} aria-current="step"{{end}}><span equipo-dot>{{if .Live}}{{template "mark" "s"}}{{end}}</span>{{with .Was}}<i equipo-visually-hidden>{{.}}, </i>{{end}}<span>{{.Label}}</span>{{if eq .State "current"}}<i equipo-visually-hidden data-working-cue> {{copy "work.track.working"}}</i>{{end}}{{with .At}}<small><time datetime="{{.Format "2006-01-02T15:04:05Z07:00"}}">{{.Format "15:04"}}</time></small>{{end}}</li>{{end}}</ol>{{end}}
15{{define "badge"}}<span equipo-badge2 data-kind="{{.Kind}}" data-tone="{{.Tone}}" title="{{.Title}}">{{if .Live}}{{template "mark" "s"}}{{else if .Icon}}{{icon .Icon}}{{end}}<span>{{.Text}}</span></span>{{end}}
16{{define "chip"}}{{with .Chip}}<span equipo-chip{{if .Live}} data-live{{end}}>{{if .Live}}{{template "mark" "s"}}{{else if .Icon}}{{icon .Icon}}{{end}}<span>{{.Text}}</span>{{with .Since}}{{template "elapsed" .}}{{end}}</span>{{end}}{{end}}
17{{define "source"}}{{if .SourceHref}}<a href="{{.SourceHref}}" equipo-source>{{.Source}}</a>{{else}}<span equipo-source>{{.Source}}</span>{{end}}{{end}}
18{{define "task-menu"}}{{if or .Menu .Ask}}{{$id := .ID}}<details equipo-menu><summary aria-label="{{copy "work.menu.more"}}">{{if .Ask}}{{icon "more-horizontal"}}{{else}}{{icon "kebab"}}{{end}}</summary><div>{{if .Ask}}<a equipo-ask-about href="/conversation?about={{$id}}" data-ask-about>{{copy "work.ask_about"}}</a>{{end}}{{range .Menu}}<form method="post" action="{{if eq .Action "duplicate"}}/tasks/{{$id}}/duplicate{{else}}/conversation/tasks/{{$id}}/{{.Action}}{{end}}"><input type="hidden" name="from" value="{{$.From}}">{{if .Value}}<input type="hidden" name="of" value="{{.Value}}">{{end}}<button type="submit"{{if .Danger}} data-danger{{end}} data-task-{{.Action}}>{{.Label}}{{with .Note}}<small>{{.}}</small>{{end}}</button></form>{{end}}</div></details>{{end}}{{end}}
19{{/* A task row: one grid of project, task, status, from, updated and
20 the action slot, the same in every list. The action slot holds a
21 Needs you row's one action and, always last, the quiet menu, so both
22 sit in the same place on every row. Called with T (the task) and
23 From (where its forms return). */}}
24{{define "task-row"}}{{$from := .From}}{{with .T}}<li equipo-row equipo-trow data-task="{{.ID}}" data-stage="{{.Stage}}" data-group="{{.Group}}">
25<span equipo-trow-proj>{{template "placement-chip" .}}</span>
26<div equipo-trow-task><p equipo-row-title><a equipo-row-link href="/tasks/{{.ID}}">{{.Title}}</a></p>{{with .Dup}}<p equipo-dup><span>{{copy "work.dup"}} <a href="/tasks/{{.ID}}">{{.Title}}</a>{{if not $.T.Mine}} {{printf (copy "work.dup_decides") $.T.Creator.Name}}{{end}}</span></p>{{end}}</div>
27<div equipo-trow-status><p equipo-stage-name{{if .Tone}} data-tone="{{.Tone}}"{{end}} data-stage-line>{{$say := .Say}}{{with .StageTag}}<span equipo-conn-label>{{template "conn-mark" .Provider}}<span>{{$say}}</span></span>{{else}}{{.Say}}{{end}}</p><div equipo-trow-detail>{{template "track" .}}<span equipo-trow-note title="{{.Note}}">{{template "chip" .}}{{if .Chip}}.{{end}}{{range .Badges}} <span equipo-badge2 data-kind="{{.Kind}}" data-tone="{{.Tone}}">{{if .Live}}{{template "mark" "s"}}{{end}}{{.Text}}.</span>{{end}}</span></div></div>
28<div equipo-trow-from>{{template "who" .Creator}}{{if .SourceHref}}<a equipo-source href="{{.SourceHref}}">{{else}}<span equipo-source>{{end}}<span data-long>{{.Source}}</span><span data-short>{{.SourceShort}}</span>{{if .SourceHref}}</a>{{else}}</span>{{end}}</div>
29<span equipo-ago{{agoData .Changed ""}} title="{{.Changed.Format "2006-01-02 15:04"}}">{{.Ago}}</span>
30<div equipo-trow-act>{{with .Act}}{{if .Href}}<a equipo-act href="{{.Href}}" data-act="{{.Kind}}">{{icon .Icon}}<span>{{.Label}}</span></a>{{else}}<form method="post" action="{{.Post}}"><input type="hidden" name="from" value="{{$from}}"><button equipo-act type="submit" data-act="{{.Kind}}" data-task-{{.Kind}}>{{icon .Icon}}<span>{{.Label}}</span></button></form>{{end}}{{end}}{{template "task-menu" (dict "ID" .ID "Menu" .Menu "From" $from "Ask" true)}}</div>
31</li>{{end}}{{end}}
32{{/* A list of task rows in its groups, with the column names once.
33 Scope "project" drops the project column (the page names it). */}}
34{{define "work-groups"}}{{$from := .From}}<div equipo-tasklist{{with .Scope}} data-scope="{{.}}"{{end}}><div equipo-tcols aria-hidden="true"><span>{{copy "work.col.project"}}</span><span>{{copy "work.col.task"}}</span><span>{{copy "work.col.status"}}</span><span>{{copy "work.col.from"}}</span><span>{{copy "work.col.updated"}}</span></div>
35{{range .Groups}}<section equipo-group data-group="{{.Key}}"{{if eq .Key "done"}} id="done"{{end}}><h2>{{copy (printf "work.group.%s" .Key)}} <span equipo-n>{{.Count}}</span>{{with copy (printf "work.group.%s_hint" .Key)}}<span equipo-hint>{{.}}</span>{{end}}</h2><ol equipo-rows data-thin-tasks>{{range .Tasks}}{{template "task-row" (dict "T" . "From" $from)}}{{end}}{{if .More}}<li><a equipo-trow-more href="{{.MoreHref}}">{{printf (copy "work.done_more") .More}}</a></li>{{end}}</ol></section>{{end}}</div>{{end}}
36{{define "decision"}}{{$t := .Task}}{{with $t.Decision}}<div equipo-decision{{if eq $.From "task"}} id="decide"{{end}}{{with .Tone}} data-tone="{{.}}"{{end}} data-need="{{.Need}}" data-decision="{{$t.ID}}">
37{{if $.Head}}{{template "mono" $t.Mono}}<div equipo-d-title><a href="/tasks/{{$t.ID}}">{{$t.Title}}</a><div equipo-quiet>{{template "placement-chip" $t}} · {{template "source" $t}}</div></div>{{end}}
38<p equipo-d-why>{{.Why}}</p>
39{{with .Ask}}<p equipo-d-ask{{if $t.Decision.SandboxHeld}} data-sandbox-held{{end}}>{{.}}</p>{{end}}{{if .Link}}<p equipo-quiet data-direction-line>{{with .LinkText}}{{.}} {{end}}<a equipo-link href="{{.Link}}" rel="noopener noreferrer" target="_blank" data-direction-link>{{.LinkLabel}}</a>{{with .AltLink}} <a equipo-link href="{{.}}" rel="noopener noreferrer" target="_blank" data-direction-branch>{{$t.Decision.AltLabel}}</a>{{end}}</p>{{end}}{{template "design-gallery" .Gallery}}{{with .Said}}<p equipo-quiet data-triage-said>{{.}}</p>{{end}}{{with .Failed}}<p equipo-quiet data-triage-failed>{{.}}</p>{{end}}{{with .Recommend}}<p equipo-quiet data-triage-recommend>{{.}}</p>{{end}}
40<div equipo-d-actions>{{if .CopyContinue}}<form method="post" action="/conversation/tasks/{{$t.ID}}/continue-without-copy"><input type="hidden" name="from" value="{{$.From}}"><button equipo-btn data-primary type="submit" data-copy-continue>{{copy "copy.continue"}}</button></form>{{end}}{{with .Card}}<form method="post" action="/conversation/cards/{{.ID}}/answer"><input type="hidden" name="revision" value="{{.Revision}}"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="task" value="{{$t.ID}}">{{if $.Task.Decision.Note}}{{if $.Task.Decision.BuildNote}}<textarea rst-input name="note" required maxlength="1000" rows="2" aria-label="{{copy "chat.card.direction_note_options"}}" placeholder="{{copy "chat.card.direction_note_options"}}" data-direction-note></textarea>{{else}}<textarea rst-input name="note" maxlength="1000" rows="2" aria-label="{{copy "chat.card.direction_note"}}" placeholder="{{copy "chat.card.direction_note"}}" data-direction-note></textarea>{{end}}{{end}}{{range $.Task.Decision.Choices}}<button equipo-btn{{if .Primary}} data-primary{{end}} type="submit" name="choice" value="{{.Value}}" data-merge-choice="{{.Value}}"{{if and $.Task.Decision.BuildNote (eq .Value "drop")}} formnovalidate{{end}}>{{.Label}}</button>{{end}}</form>{{end}}{{if .Fold}}<form method="post" action="/tasks/{{$t.ID}}/duplicate"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="of" value="{{$t.Dup.ID}}"><button equipo-btn data-primary type="submit" data-task-duplicate>{{copy "work.decide.fold"}}</button></form>{{end}}{{if .Recover}}<form method="post" action="/conversation/tasks/{{$t.ID}}/recover"><input type="hidden" name="from" value="{{$.From}}"><button equipo-btn data-primary type="submit" data-task-recover>{{copy "work.recover"}}</button></form>{{end}}{{with .Unsandboxed}}<details equipo-mach-confirm data-unsandboxed><summary equipo-btn>{{copy "work.decide.unsandboxed"}}</summary><div><p>{{.Warning}}</p><form method="post" action="/conversation/tasks/{{$t.ID}}/unsandboxed"><input type="hidden" name="from" value="{{$.From}}"><input type="hidden" name="step" value="{{.Step}}"><input type="hidden" name="attempt" value="{{.Attempt}}"><button equipo-btn data-danger type="submit" data-task-unsandboxed>{{copy "work.decide.unsandboxed_confirm"}}</button></form></div></details>{{end}}{{if .Retry}}<form method="post" action="/conversation/tasks/{{$t.ID}}/retry"><input type="hidden" name="from" value="{{$.From}}"><button {{if .Fold}}equipo-link{{else}}equipo-btn data-primary{{end}} type="submit" data-task-retry>{{copy "work.retry"}}</button></form>{{end}}{{if .Round}}<form method="post" action="/conversation/tasks/{{$t.ID}}/round"><input type="hidden" name="from" value="{{$.From}}"><button equipo-btn data-primary type="submit" data-task-round>{{copy "work.decide.round"}}</button></form>{{end}}{{if .Talk}}<a equipo-btn href="/conversation?about={{$t.ID}}" data-ask-coordinator>{{copy "work.decide.ask_coordinator"}}</a>{{end}}{{if .Cancel}}<form method="post" action="/conversation/tasks/{{$t.ID}}/cancel"><input type="hidden" name="from" value="{{$.From}}"><button equipo-link type="submit" data-task-cancel>{{copy "work.decide.cancel"}}</button></form>{{end}}{{with .Hint}}<span equipo-quiet>{{.}}</span>{{end}}<span equipo-d-quiet>{{if .AddClaude}}<a equipo-link href="{{.AddClaude}}" data-add-claude>{{.AddClaudeLabel}}</a>{{end}}{{if .Mac}}<a equipo-link href="/conversation/settings/machines/add" data-set-up-mac>{{copy "work.decide.mac_set_up"}}</a>{{end}}<a equipo-link href="/conversation?about={{$t.ID}}" data-ask-about>{{copy "work.ask_about"}}</a></span></div>
41</div>{{end}}{{end}}
42{{define "star-toggle"}}{{$p := .P}}<form method="post" action="/projects/{{$p.ID}}/star" equipo-star-form><input type="hidden" name="starred" value="{{if $p.Star.On}}0{{else}}1{{end}}"><input type="hidden" name="from" value="{{.From}}"><button type="submit" equipo-star{{if $p.Star.On}} aria-pressed="true"{{if $p.Star.Auto}} data-auto{{end}}{{else}} aria-pressed="false"{{end}} aria-label="{{$p.Star.Label}}" title="{{$p.Star.Who}}" data-star-toggle>{{icon "star"}}</button></form>{{end}}
43{{define "project-facts"}}{{with .StackLine}}<span>{{if $.PhoneStack}}{{icon "phone"}}{{else}}{{icon "code"}}{{end}}{{.}}</span>{{end}}{{with .Repos}}<span data-repos>{{icon "git"}}{{if eq (len .) 1}}{{copy "work.project.one_repo"}}{{else}}{{printf (copy "work.project.repos") (len .)}}{{end}}</span>{{end}}{{with .ChecksLine}}<span data-tone="{{if $.Checks.Here}}positive{{else}}warning{{end}}" data-checks-fact>{{if $.Checks.Here}}{{icon "check-circle"}}{{else}}{{icon "help-circle"}}{{end}}{{.}}</span>{{end}}{{end}}
44{{define "thinking-form"}}{{with .Thinking}}<div equipo-thinking-words data-thinking-words="{{.JSON}}">
45{{if .Saved}}<p equipo-saved role="status">{{copy "thinking.saved"}}</p>{{end}}
46<div equipo-thinking-preview aria-hidden="true"><p equipo-quiet>{{copy "thinking.preview"}}</p><p equipo-activity-line data-preview-line><span data-preview-phrase></span></p></div>
47<form method="post" action="/settings/thinking" equipo-thinking-form equipo-sp-group aria-labelledby="thinking-set-h">
48<input type="hidden" name="revision" value="{{.Revision}}"><input type="hidden" name="from" value="{{$.From}}">
49<div equipo-sp-group-head><h2 id="thinking-set-h">{{copy "thinking.choose"}}</h2><p>{{copy "thinking.choose_hint"}}</p></div>
50<fieldset><legend equipo-visually-hidden>{{copy "thinking.choose"}}</legend>
51<ol equipo-rows>{{$cur := .Set}}{{range .Sets}}<li equipo-row equipo-set-row data-set="{{.ID}}"><label><input type="radio" name="set" value="{{.ID}}"{{if eq .ID $cur}} checked{{end}}><span equipo-set-name>{{.Name}}</span><span equipo-desc>{{.Description}}</span>{{with index .Phrases "think"}}<span equipo-set-sample>{{range $i, $p := .}}{{if lt $i 3}}{{if $i}} · {{end}}{{$p}}{{end}}{{end}}</span>{{end}}</label></li>{{end}}</ol>
52</fieldset>
53<noscript><button equipo-btn data-primary type="submit">{{copy "thinking.use"}}</button></noscript>
54</form>
55</div>{{end}}{{end}}
56{{/* A Design attempt's kept captures, by option, from this instance's
57 task-file route only (the task page and the direction card). */}}
58{{define "design-gallery"}}{{with .}}<div equipo-captures data-captures>{{range .Options}}<section equipo-capture-option data-option><h3>{{.Label}}</h3>{{if .Captures}}<ul equipo-kept>{{range .Captures}}<li><a href="{{.Src}}" target="_blank" rel="noopener" data-capture="{{.ID}}"><figure><img src="{{.Src}}" alt="{{.Alt}}" width="{{.Width}}" height="{{.Height}}" loading="lazy" decoding="async"><figcaption>{{.Tree}}</figcaption></figure></a></li>{{end}}</ul>{{else}}<p equipo-quiet>{{copy "work.captures.none"}}</p>{{end}}</section>{{end}}</div>{{end}}{{end}}
59