web: copy edits across six templates !442

merged merged by cmc on 2026-09-20 05:12 UTC · krz/gitbay:template-copy into main

7 files changed, +26 −27

Layout: unified · split

e2e/dashboard_test.go +1 −1
@@ -97,7 +97,7 @@ func TestDashboard(t *testing.T) {
97 "Waiting on your review", "assigned to you", "Recent activity", 97 "Waiting on your review", "assigned to you", "Recent activity",
98 "from bob", "alice/app!1", "todo one", "alice/app#1", 98 "from bob", "alice/app!1", "todo one", "alice/app#1",
99 `href="/alice/app/mrs/1"`, `href="/alice/app/issues/1"`, 99 `href="/alice/app/mrs/1"`, `href="/alice/app/issues/1"`,
100 "Yours anywhere, and every one in a repository you can write to.", 100 "Your MRs across all repos.",
101 } { 101 } {
102 if !strings.Contains(body, want) { 102 if !strings.Contains(body, want) {
103 t.Errorf("dashboard missing %q", want) 103 t.Errorf("dashboard missing %q", want)
internal/web/templates/404.html +1 −1
@@ -4,7 +4,7 @@
4<div class="notfound"> 4<div class="notfound">
5 <p class="bigcode">404</p> 5 <p class="bigcode">404</p>
6 <h1>Page not found</h1> 6 <h1>Page not found</h1>
7 <p class="desc">nothing lives at this address — the path may be wrong, 7 <p class="desc">nothing lives at this address. the path may be wrong,
8 or the repository may be private.</p> 8 or the repository may be private.</p>
9 <p><a href="/">← back to {{.Site}}</a></p> 9 <p><a href="/">← back to {{.Site}}</a></p>
10</div> 10</div>
internal/web/templates/account.html +8 −9
@@ -48,8 +48,7 @@ Write it with a push, or edit it here.</p>
48 48
49<section id="keys"><h2>SSH keys</h2> 49<section id="keys"><h2>SSH keys</h2>
50<p class="meta">Your keys are your identity here. A <code>full</code> key can run 50<p class="meta">Your keys are your identity here. A <code>full</code> key can run
51commands and push; a <code>git</code> key can only move git data, which is what 51commands and push; a <code>git</code> key can only move git data (e.g., CI).</p>
52a CI checkout wants.</p>
53{{if .Keys}}<div class="tablewrap"><table class="keys nowrap"> 52{{if .Keys}}<div class="tablewrap"><table class="keys nowrap">
54<tr class="cols"><th scope="col">label</th><th scope="col">fingerprint</th><th scope="col">type</th><th scope="col">scope</th><th scope="col"><span class="vh">actions</span></th></tr> 53<tr class="cols"><th scope="col">label</th><th scope="col">fingerprint</th><th scope="col">type</th><th scope="col">scope</th><th scope="col"><span class="vh">actions</span></th></tr>
55{{range .Keys}}<tr> 54{{range .Keys}}<tr>
@@ -60,7 +59,7 @@ a CI checkout wants.</p>
60 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="key-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="danger">Remove</button></form></td> 59 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="key-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="danger">Remove</button></form></td>
61</tr> 60</tr>
62{{end}}</table></div> 61{{end}}</table></div>
63{{else}}<p class="none">No SSH keys — which cannot be right, since you signed in.</p>{{end}} 62{{else}}<p class="none">No SSH keys? Which cannot be right, since you signed in.</p>{{end}}
64<details class="editbox"> 63<details class="editbox">
65 <summary>Add an SSH key</summary> 64 <summary>Add an SSH key</summary>
66 <form method="post" action="/settings" class="setform stack"> 65 <form method="post" action="/settings" class="setform stack">
@@ -71,8 +70,8 @@ a CI checkout wants.</p>
71 <input id="key-label" name="label" maxlength="64" placeholder="defaults to the key's comment"> 70 <input id="key-label" name="label" maxlength="64" placeholder="defaults to the key's comment">
72 <label for="scope">Scope</label> 71 <label for="scope">Scope</label>
73 <select id="scope" name="scope"> 72 <select id="scope" name="scope">
74 <option value="full">full — commands and git</option> 73 <option value="full">full: commands and git</option>
75 <option value="git">git — git transport only</option> 74 <option value="git">git: git transport only</option>
76 </select> 75 </select>
77 <button type="submit" class="btn">Add key</button> 76 <button type="submit" class="btn">Add key</button>
78 </form> 77 </form>
@@ -80,8 +79,8 @@ a CI checkout wants.</p>
80</section> 79</section>
81 80
82<section id="emails"><h2>Email addresses</h2> 81<section id="emails"><h2>Email addresses</h2>
83<p class="meta">A verified address is what ties your signed commits to this 82<p class="meta">A verified address ties signed commits to this
84account, and where notifications go.</p> 83account and where notifications go.</p>
85{{if .Emails}}<ul class="plain"> 84{{if .Emails}}<ul class="plain">
86{{range .Emails}}<li>{{.Address}} 85{{range .Emails}}<li>{{.Address}}
87 {{if .Primary}}<span class="chip">primary</span>{{end}} 86 {{if .Primary}}<span class="chip">primary</span>{{end}}
@@ -137,14 +136,14 @@ account, and where notifications go.</p>
137 <input type="checkbox" id="notify-mail" name="mail" value="on"{{if .MailOn}} checked{{end}}> 136 <input type="checkbox" id="notify-mail" name="mail" value="on"{{if .MailOn}} checked{{end}}>
138 <button type="submit" class="btn">Save</button> 137 <button type="submit" class="btn">Save</button>
139</form> 138</form>
140<p class="meta">The inbox is filed either way; this is the mail half. Login links are not activity and still arrive.</p> 139<p class="meta">Enable to receive activity alerts by email. Login links will arrive regardless of this setting.</p>
141<form method="post" action="/settings" class="setform"> 140<form method="post" action="/settings" class="setform">
142 <input type="hidden" name="field" value="notify-watch"> 141 <input type="hidden" name="field" value="notify-watch">
143 <label for="notify-watch">Watch repositories you can write to</label> 142 <label for="notify-watch">Watch repositories you can write to</label>
144 <input type="checkbox" id="notify-watch" name="watch" value="on"{{if .WatchOn}} checked{{end}}> 143 <input type="checkbox" id="notify-watch" name="watch" value="on"{{if .WatchOn}} checked{{end}}>
145 <button type="submit" class="btn">Save</button> 144 <button type="submit" class="btn">Save</button>
146</form> 145</form>
147<p class="meta">Every issue and merge request on those repositories, as if you had watched each. A watch or mute on a repository still wins.</p> 146<p class="meta">Alerts for every issue and merge request on those repositories. A watch or mute on a repository has priority over this setting.</p>
148</section> 147</section>
149 148
150<section id="appearance"><h2>Appearance</h2> 149<section id="appearance"><h2>Appearance</h2>
internal/web/templates/admin.html +2 −2
@@ -2,8 +2,8 @@
2{{define "title"}}admin · {{.Site}}{{end}} 2{{define "title"}}admin · {{.Site}}{{end}}
3{{define "content"}} 3{{define "content"}}
4<h1>Admin</h1> 4<h1>Admin</h1>
5<p class="meta">Server build {{.Commit}}. Every background worker's backlog, the same read as <code>gitbay dashboard --json</code> for an admin.</p> 5<p class="meta">Server build {{.Commit}}. Every background worker's backlog. This is the same read as <code>gitbay dashboard --json</code> for an admin.</p>
6<p class="meta"><a href="/admin/users">Accounts</a> — every account, with promote, demote, disable and enable.</p> 6<p class="meta"><a href="/admin/users">Accounts</a>: view every instance user account.</p>
7 7
8<div class="withcol narrow"> 8<div class="withcol narrow">
9<nav class="sidecol" aria-label="Sections"> 9<nav class="sidecol" aria-label="Sections">
internal/web/templates/bookmarks.html +3 −3
@@ -2,8 +2,8 @@
2{{define "content"}} 2{{define "content"}}
3<h1>Bookmarks</h1> 3<h1>Bookmarks</h1>
4<p class="meta">Repositories you saved to come back to. A pin is private quick 4<p class="meta">Repositories you saved to come back to. A pin is private quick
5access to your own work; a bookmark says something is worth returning to, and 5 access to your own work; a bookmark is a public vote to save access to another
6its count is public.</p> 6 repo.</p>
7<ul class="repolist"> 7<ul class="repolist">
8{{range .Bookmarks}}<li> 8{{range .Bookmarks}}<li>
9 <p class="title"><a href="/{{.Path}}">{{.Path}}</a> 9 <p class="title"><a href="/{{.Path}}">{{.Path}}</a>
@@ -11,6 +11,6 @@ its count is public.</p>
11 <span class="count">{{.Bookmarks}}</span></p> 11 <span class="count">{{.Bookmarks}}</span></p>
12 {{if .Description}}<p class="desc">{{.Description}}</p>{{end}} 12 {{if .Description}}<p class="desc">{{.Description}}</p>{{end}}
13</li> 13</li>
14{{else}}<li class="empty">nothing bookmarked yet — open a repository and press Bookmark</li>{{end}} 14{{else}}<li class="empty">nothing bookmarked yet. open a repository and press Bookmark</li>{{end}}
15</ul> 15</ul>
16{{end}} 16{{end}}
internal/web/templates/dashboard.html +3 −3
@@ -39,9 +39,9 @@
39</div> 39</div>
40{{if .Reviews}}{{template "queue" dict "ID" "reviews" "Title" "Waiting on your review" "Items" .Reviews "Kind" "mrs" "Empty" "Nothing waiting on you"}}{{end}} 40{{if .Reviews}}{{template "queue" dict "ID" "reviews" "Title" "Waiting on your review" "Items" .Reviews "Kind" "mrs" "Empty" "Nothing waiting on you"}}{{end}}
41{{if .Assigned}}{{template "queue" dict "ID" "assigned" "Title" "Assigned to you" "Items" .Assigned "Kind" "issues" "Empty" "Nothing assigned to you"}}{{end}} 41{{if .Assigned}}{{template "queue" dict "ID" "assigned" "Title" "Assigned to you" "Items" .Assigned "Kind" "issues" "Empty" "Nothing assigned to you"}}{{end}}
42{{if .MRs}}{{template "queue" dict "ID" "mrs" "Title" "Open merge requests" "Items" .MRs "Kind" "mrs" "Empty" "No open merge requests" "Hint" "Yours anywhere, and every one in a repository you can write to."}}{{end}} 42{{if .MRs}}{{template "queue" dict "ID" "mrs" "Title" "Open merge requests" "Items" .MRs "Kind" "mrs" "Empty" "No open merge requests" "Hint" "Your MRs across all repos."}}{{end}}
43{{if .Issues}}{{template "queue" dict "ID" "issues" "Title" "Open issues" "Items" .Issues "Kind" "issues" "Empty" "No open issues" "Hint" "Yours anywhere, and every one in a repository you can write to."}}{{end}} 43{{if .Issues}}{{template "queue" dict "ID" "issues" "Title" "Open issues" "Items" .Issues "Kind" "issues" "Empty" "No open issues" "Hint" "Your issues across all repos."}}{{end}}
44{{if not (or .Reviews .Assigned .MRs .Issues)}}<p class="none">Nothing open anywhere you can write to.</p>{{end}} 44{{if not (or .Reviews .Assigned .MRs .Issues)}}<p class="none">Nothing open.</p>{{end}}
45</section> 45</section>
46 46
47<aside class="feedcol" aria-label="Recent activity"> 47<aside class="feedcol" aria-label="Recent activity">
internal/web/templates/settings.html +8 −8
@@ -44,7 +44,7 @@
44</form> 44</form>
45{{if .Branches}}<form method="post" action="{{$base}}" class="setform"> 45{{if .Branches}}<form method="post" action="{{$base}}" class="setform">
46 <input type="hidden" name="field" value="default-branch"> 46 <input type="hidden" name="field" value="default-branch">
47 <div><label for="default-branch">Default branch</label><p class="hint">What a clone checks out and what CI builds on trigger.</p></div> 47 <div><label for="default-branch">Default branch</label></div>
48 <div><select id="default-branch" name="default-branch">{{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}}</select></div> 48 <div><select id="default-branch" name="default-branch">{{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}}</select></div>
49 <div><button type="submit" class="btn">Save</button></div> 49 <div><button type="submit" class="btn">Save</button></div>
50</form>{{end}} 50</form>{{end}}
@@ -53,7 +53,7 @@
53<section id="access"><h2>Access</h2> 53<section id="access"><h2>Access</h2>
54<form method="post" action="{{$base}}" class="setform"> 54<form method="post" action="{{$base}}" class="setform">
55 <input type="hidden" name="field" value="visibility"> 55 <input type="hidden" name="field" value="visibility">
56 <div><span class="fieldname">Visibility</span><p class="hint">Private repositories answer not found to everyone without access, including in search and on your profile.</p></div> 56 <div><span class="fieldname">Visibility</span></div>
57 <div class="check"> 57 <div class="check">
58 <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label> 58 <label><input type="radio" name="visibility" value="public"{{if eq .Repo.Visibility "public"}} checked{{end}}> Public</label>
59 <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label> 59 <label><input type="radio" name="visibility" value="private"{{if eq .Repo.Visibility "private"}} checked{{end}}> Private</label>
@@ -62,7 +62,7 @@
62</form> 62</form>
63<form method="post" action="{{$base}}" class="setform"> 63<form method="post" action="{{$base}}" class="setform">
64 <input type="hidden" name="field" value="git-daemon"> 64 <input type="hidden" name="field" value="git-daemon">
65 <div><label for="git-daemon">Serve over git://</label><p class="hint">Unauthenticated, unencrypted read access on port 9418. Public repositories only.</p></div> 65 <div><label for="git-daemon">Serve over git://</label><p class="hint">Public repositories only.</p></div>
66 <div class="check"><input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}></div> 66 <div class="check"><input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}></div>
67 <div><button type="submit" class="btn">Save</button></div> 67 <div><button type="submit" class="btn">Save</button></div>
68</form> 68</form>
@@ -72,13 +72,13 @@
72<p class="meta">Checked before a merge, in this order: checks, approvals, resolved threads, signatures.</p> 72<p class="meta">Checked before a merge, in this order: checks, approvals, resolved threads, signatures.</p>
73<form method="post" action="{{$base}}" class="setform"> 73<form method="post" action="{{$base}}" class="setform">
74 <input type="hidden" name="field" value="require-checks"> 74 <input type="hidden" name="field" value="require-checks">
75 <div><label for="require-checks">Required checks</label><p class="hint">A request waits until every CI job that would report on its head has succeeded.</p></div> 75 <div><label for="require-checks">Required checks</label><p class="hint">Requires CI to succeed.</p></div>
76 <div class="check"><input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}></div> 76 <div class="check"><input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}></div>
77 <div><button type="submit" class="btn">Save</button></div> 77 <div><button type="submit" class="btn">Save</button></div>
78</form> 78</form>
79<form method="post" action="{{$base}}" class="setform"> 79<form method="post" action="{{$base}}" class="setform">
80 <input type="hidden" name="field" value="require-approvals"> 80 <input type="hidden" name="field" value="require-approvals">
81 <div><label for="approvals">Approvals</label><p class="hint">Approvals from people with write access. Zero means none required.</p></div> 81 <div><label for="approvals">Approvals</label><p class="hint">Approvals from anyone with write access. Zero means none required.</p></div>
82 <div><input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"></div> 82 <div><input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"></div>
83 <div><button type="submit" class="btn">Save</button></div> 83 <div><button type="submit" class="btn">Save</button></div>
84</form> 84</form>
@@ -90,7 +90,7 @@
90</form> 90</form>
91<form method="post" action="{{$base}}" class="setform"> 91<form method="post" action="{{$base}}" class="setform">
92 <input type="hidden" name="field" value="require-codeowners"> 92 <input type="hidden" name="field" value="require-codeowners">
93 <div><label for="require-codeowners">CODEOWNERS</label><p class="hint">Owners of every touched path must approve.</p></div> 93 <div><label for="require-codeowners">CODEOWNERS</label><p class="hint">Code owners must approve.</p></div>
94 <div class="check"><input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}></div> 94 <div class="check"><input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}></div>
95 <div><button type="submit" class="btn">Save</button></div> 95 <div><button type="submit" class="btn">Save</button></div>
96</form> 96</form>
@@ -151,12 +151,12 @@
151<section id="deps"><h2>Dependencies</h2> 151<section id="deps"><h2>Dependencies</h2>
152<form method="post" action="{{$base}}" class="setform"> 152<form method="post" action="{{$base}}" class="setform">
153 <input type="hidden" name="field" value="deps"> 153 <input type="hidden" name="field" value="deps">
154 <div><label for="deps-enabled">Check for updates</label><p class="hint">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind in an issue. Checking a private repository tells those registries what it depends on.</p></div> 154 <div><label for="deps-enabled">Check for updates</label><p class="hint">Evaluates the manifests on <code>{{.Repo.DefaultBranch}}</code> and opens an issue. Go, NPM, Crates, and PyPI only.</p></div>
155 <div class="check"><input type="checkbox" id="deps-enabled" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}></div> 155 <div class="check"><input type="checkbox" id="deps-enabled" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}></div>
156 <div><button type="submit" class="btn">Save</button></div> 156 <div><button type="submit" class="btn">Save</button></div>
157</form> 157</form>
158{{if .DepsEnabled}} 158{{if .DepsEnabled}}
159<p class="meta">Last checked {{if .Deps.LastCheck}}{{when .Deps.LastCheck}}{{else}}never{{end}}{{if .Deps.IssueNumber}} · tracked in <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Deps.IssueNumber}}">#{{.Deps.IssueNumber}}</a>{{end}}</p> 159<p class="meta">Last checked {{if .Deps.LastCheck}}{{when .Deps.LastCheck}}{{else}}never{{end}}{{if .Deps.IssueNumber}} · <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Deps.IssueNumber}}">#{{.Deps.IssueNumber}}</a>{{end}}</p>
160{{if .Deps.LastError}}<p class="error" role="alert">{{.Deps.LastError}}</p>{{end}} 160{{if .Deps.LastError}}<p class="error" role="alert">{{.Deps.LastError}}</p>{{end}}
161{{if .Deps.Behind}}<div class="tablewrap"><table class="keys"> 161{{if .Deps.Behind}}<div class="tablewrap"><table class="keys">
162<tr class="cols"><th scope="col">dependency</th><th scope="col">pinned</th><th scope="col">latest</th></tr> 162<tr class="cols"><th scope="col">dependency</th><th scope="col">pinned</th><th scope="col">latest</th></tr>