Commit 3fa8d16dc1

3fa8d16dc1a5abfd57749720f17606760036ccbb

parent: 5daf169d25

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-17 15:21 UTC

web: button treatments, explicit search buttons, sentence case

Ref #218

Layout: unified · split

internal/web/templates/account.html +10 −10
@@ -17,7 +17,7 @@
17 <label for="p-about">About</label> 17 <label for="p-about">About</label>
18 <textarea id="p-about" name="about" rows="8" placeholder="longer, shown below your repositories">{{.Profile.About}}</textarea> 18 <textarea id="p-about" name="about" rows="8" placeholder="longer, shown below your repositories">{{.Profile.About}}</textarea>
19 {{template "formatpicker" .Profile.AboutFormat}} 19 {{template "formatpicker" .Profile.AboutFormat}}
20 <button type="submit">Save profile</button> 20 <button type="submit" class="btn">Save profile</button>
21</form> 21</form>
22 22
23<h2>SSH keys</h2> 23<h2>SSH keys</h2>
@@ -31,7 +31,7 @@ a CI checkout wants.</p>
31 <td class="mono">{{.Fingerprint}}</td> 31 <td class="mono">{{.Fingerprint}}</td>
32 <td>{{.Algo}}</td> 32 <td>{{.Algo}}</td>
33 <td>{{.Scope}}</td> 33 <td>{{.Scope}}</td>
34 <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="linklike">Remove</button></form></td> 34 <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>
35</tr> 35</tr>
36{{end}}</table></div> 36{{end}}</table></div>
37{{else}}<p class="none">No SSH keys — which cannot be right, since you signed in.</p>{{end}} 37{{else}}<p class="none">No SSH keys — which cannot be right, since you signed in.</p>{{end}}
@@ -48,7 +48,7 @@ a CI checkout wants.</p>
48 <option value="full">full — commands and git</option> 48 <option value="full">full — commands and git</option>
49 <option value="git">git — git transport only</option> 49 <option value="git">git — git transport only</option>
50 </select> 50 </select>
51 <button type="submit">Add key</button> 51 <button type="submit" class="btn">Add key</button>
52 </form> 52 </form>
53</details> 53</details>
54 54
@@ -61,7 +61,7 @@ account, and where notifications go.</p>
61 {{if .Verified}}<span class="badge badge-verified">verified{{with .VerifiedBy}} · {{.}}{{end}}</span> 61 {{if .Verified}}<span class="badge badge-verified">verified{{with .VerifiedBy}} · {{.}}{{end}}</span>
62 {{else}}<span class="badge badge-unsigned">unverified</span>{{end}} 62 {{else}}<span class="badge badge-unsigned">unverified</span>{{end}}
63 {{if not .Primary}}{{if .Verified}}<form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-primary"><input type="hidden" name="address" value="{{.Address}}"><button type="submit" class="linklike">Make primary</button></form>{{end}} 63 {{if not .Primary}}{{if .Verified}}<form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-primary"><input type="hidden" name="address" value="{{.Address}}"><button type="submit" class="linklike">Make primary</button></form>{{end}}
64 <form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-remove"><input type="hidden" name="address" value="{{.Address}}">{{template "confirmfield" .Address}} <button type="submit" class="linklike">Remove</button></form>{{end}}</li> 64 <form method="post" action="/settings" class="inline"><input type="hidden" name="field" value="email-remove"><input type="hidden" name="address" value="{{.Address}}">{{template "confirmfield" .Address}} <button type="submit" class="danger">Remove</button></form>{{end}}</li>
65{{end}}</ul>{{end}} 65{{end}}</ul>{{end}}
66<details class="editbox"> 66<details class="editbox">
67 <summary>Add an address</summary> 67 <summary>Add an address</summary>
@@ -69,13 +69,13 @@ account, and where notifications go.</p>
69 <input type="hidden" name="field" value="email-add"> 69 <input type="hidden" name="field" value="email-add">
70 <label for="address">Address</label> 70 <label for="address">Address</label>
71 <input type="email" id="address" name="address" required placeholder="you@example.org"> 71 <input type="email" id="address" name="address" required placeholder="you@example.org">
72 <button type="submit">Send code</button> 72 <button type="submit" class="btn">Send code</button>
73 </form> 73 </form>
74 <form method="post" action="/settings" class="setform"> 74 <form method="post" action="/settings" class="setform">
75 <input type="hidden" name="field" value="email-verify"> 75 <input type="hidden" name="field" value="email-verify">
76 <label for="code">Verification code</label> 76 <label for="code">Verification code</label>
77 <input type="text" id="code" name="code" required placeholder="from the mail"> 77 <input type="text" id="code" name="code" required placeholder="from the mail">
78 <button type="submit">Verify</button> 78 <button type="submit" class="btn">Verify</button>
79 </form> 79 </form>
80</details> 80</details>
81 81
@@ -87,7 +87,7 @@ account, and where notifications go.</p>
87{{range .PGP}}<tr> 87{{range .PGP}}<tr>
88 <td class="mono">{{.Fingerprint}}</td> 88 <td class="mono">{{.Fingerprint}}</td>
89 <td>{{range .UIDs}}{{.}}<br>{{end}}{{if .Revoked}}<span class="badge badge-bad_signature">revoked</span>{{else if .Expired}}<span class="badge badge-signed_key_expired">expired</span>{{end}}</td> 89 <td>{{range .UIDs}}{{.}}<br>{{end}}{{if .Revoked}}<span class="badge badge-bad_signature">revoked</span>{{else if .Expired}}<span class="badge badge-signed_key_expired">expired</span>{{end}}</td>
90 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="pgp-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="linklike">Remove</button></form></td> 90 <td class="act"><form method="post" action="/settings"><input type="hidden" name="field" value="pgp-remove"><input type="hidden" name="fingerprint" value="{{.Fingerprint}}">{{template "confirmfield" .Confirm}} <button type="submit" class="danger">Remove</button></form></td>
91</tr> 91</tr>
92{{end}}</table></div> 92{{end}}</table></div>
93{{else}}<p class="none">No OpenPGP keys.</p>{{end}} 93{{else}}<p class="none">No OpenPGP keys.</p>{{end}}
@@ -97,7 +97,7 @@ account, and where notifications go.</p>
97 <input type="hidden" name="field" value="pgp-add"> 97 <input type="hidden" name="field" value="pgp-add">
98 <label for="pgpkey">Armored public key</label> 98 <label for="pgpkey">Armored public key</label>
99 <textarea id="pgpkey" name="key" rows="6" required placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----"></textarea> 99 <textarea id="pgpkey" name="key" rows="6" required placeholder="-----BEGIN PGP PUBLIC KEY BLOCK-----"></textarea>
100 <button type="submit">Add key</button> 100 <button type="submit" class="btn">Add key</button>
101 </form> 101 </form>
102</details> 102</details>
103 103
@@ -106,14 +106,14 @@ account, and where notifications go.</p>
106 <input type="hidden" name="field" value="notify-mail"> 106 <input type="hidden" name="field" value="notify-mail">
107 <label for="notify-mail">Activity by mail</label> 107 <label for="notify-mail">Activity by mail</label>
108 <input type="checkbox" id="notify-mail" name="mail" value="on"{{if .MailOn}} checked{{end}}> 108 <input type="checkbox" id="notify-mail" name="mail" value="on"{{if .MailOn}} checked{{end}}>
109 <button type="submit">Save</button> 109 <button type="submit" class="btn">Save</button>
110</form> 110</form>
111<p class="meta">The inbox is filed either way; this is the mail half. Login links are not activity and still arrive.</p> 111<p class="meta">The inbox is filed either way; this is the mail half. Login links are not activity and still arrive.</p>
112<form method="post" action="/settings" class="setform"> 112<form method="post" action="/settings" class="setform">
113 <input type="hidden" name="field" value="notify-watch"> 113 <input type="hidden" name="field" value="notify-watch">
114 <label for="notify-watch">Watch repositories you can write to</label> 114 <label for="notify-watch">Watch repositories you can write to</label>
115 <input type="checkbox" id="notify-watch" name="watch" value="on"{{if .WatchOn}} checked{{end}}> 115 <input type="checkbox" id="notify-watch" name="watch" value="on"{{if .WatchOn}} checked{{end}}>
116 <button type="submit">Save</button> 116 <button type="submit" class="btn">Save</button>
117</form> 117</form>
118<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> 118<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>
119 119
internal/web/templates/build.html +1 −1
@@ -6,7 +6,7 @@
6<span class="spacer"></span> 6<span class="spacer"></span>
7{{if and .CanWrite (or (eq .Build.Status "pending") (eq .Build.Status "running"))}} 7{{if and .CanWrite (or (eq .Build.Status "pending") (eq .Build.Status "running"))}}
8<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds/{{.Build.Number}}/cancel" class="actions"> 8<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/builds/{{.Build.Number}}/cancel" class="actions">
9 <button type="submit">{{if eq .Build.Status "running"}}Cancel (stops at the runner's next check){{else}}Cancel{{end}}</button> 9 <button type="submit" class="btn">{{if eq .Build.Status "running"}}Cancel (stops at the runner's next check){{else}}Cancel{{end}}</button>
10</form> 10</form>
11{{end}} 11{{end}}
12</div> 12</div>
internal/web/templates/builds.html +1 −1
@@ -8,7 +8,7 @@
8 <select id="job" name="job"> 8 <select id="job" name="job">
9 {{range .Jobs}}<option value="{{.Name}}">{{.Name}}{{if .Schedule}} (schedule {{.Schedule}}){{else if .Tags}} (tags {{.Tags}}){{end}}</option>{{end}} 9 {{range .Jobs}}<option value="{{.Name}}">{{.Name}}{{if .Schedule}} (schedule {{.Schedule}}){{else if .Tags}} (tags {{.Tags}}){{end}}</option>{{end}}
10 </select> 10 </select>
11 <button type="submit">Run</button> 11 <button type="submit" class="btn">Run</button>
12</form> 12</form>
13{{end}} 13{{end}}
14<details class="editbox"><summary>Status badge</summary> 14<details class="editbox"><summary>Status badge</summary>
internal/web/templates/explore.html +1
@@ -4,6 +4,7 @@
4<h1>Explore</h1> 4<h1>Explore</h1>
5<form method="get" action="/explore" class="searchform compact"> 5<form method="get" action="/explore" class="searchform compact">
6 <input type="search" name="q" aria-label="Filter repositories" value="{{.Query}}" placeholder="filter by name, description, topic"> 6 <input type="search" name="q" aria-label="Filter repositories" value="{{.Query}}" placeholder="filter by name, description, topic">
7 <button type="submit" class="btn">Search</button>
7</form> 8</form>
8<span class="spacer"></span> 9<span class="spacer"></span>
9</div> 10</div>
internal/web/templates/globalsearch.html +1 −1
@@ -13,7 +13,7 @@
13<form method="get" action="/search" class="searchform"> 13<form method="get" action="/search" class="searchform">
14 <input type="search" name="q" aria-label="Search" value="{{.Query}}" placeholder="repository names and topics, issue and merge request text" autofocus> 14 <input type="search" name="q" aria-label="Search" value="{{.Query}}" placeholder="repository names and topics, issue and merge request text" autofocus>
15 {{if .Kind}}<input type="hidden" name="kind" value="{{.Kind}}">{{end}} 15 {{if .Kind}}<input type="hidden" name="kind" value="{{.Kind}}">{{end}}
16 <button type="submit">search</button> 16 <button type="submit" class="btn">Search</button>
17</form> 17</form>
18{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p> 18{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p>
19{{else if .Query}} 19{{else if .Query}}
internal/web/templates/issue.html +5 −5
@@ -15,7 +15,7 @@
15<p><input type="text" name="title" aria-label="Title" value="{{.Issue.Title}}" required></p> 15<p><input type="text" name="title" aria-label="Title" value="{{.Issue.Title}}" required></p>
16<p><textarea name="body" aria-label="Description" rows="8">{{.Issue.Body}}</textarea></p> 16<p><textarea name="body" aria-label="Description" rows="8">{{.Issue.Body}}</textarea></p>
17<p><input type="text" name="labels" aria-label="Labels" value="{{range $i, $l := .Issue.Labels}}{{if $i}} {{end}}{{$l}}{{end}}" placeholder="labels, space-separated (write access)"></p> 17<p><input type="text" name="labels" aria-label="Labels" value="{{range $i, $l := .Issue.Labels}}{{if $i}} {{end}}{{$l}}{{end}}" placeholder="labels, space-separated (write access)"></p>
18<p><button type="submit">save</button></p> 18<p><button type="submit" class="btn">save</button></p>
19</form></details>{{end}} 19</form></details>{{end}}
20{{if .BodyHTML}}<article class="comment"> 20{{if .BodyHTML}}<article class="comment">
21 <header class="commenthead"><strong><a href="/{{.Issue.Author}}">{{.Issue.Author}}</a></strong> <span class="when">{{when .Issue.CreatedAt}}</span></header> 21 <header class="commenthead"><strong><a href="/{{.Issue.Author}}">{{.Issue.Author}}</a></strong> <span class="when">{{when .Issue.CreatedAt}}</span></header>
@@ -31,7 +31,7 @@
31{{if .Viewer}} 31{{if .Viewer}}
32<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform"> 32<form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform">
33<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p> 33<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p>
34<p><button type="submit">comment</button></p> 34<p><button type="submit" class="btn">comment</button></p>
35</form> 35</form>
36{{end}} 36{{end}}
37</div> 37</div>
@@ -55,7 +55,7 @@
55 <form method="post" action="{{$base}}/label" class="actions"> 55 <form method="post" action="{{$base}}/label" class="actions">
56 <input type="text" name="add" aria-label="Add labels" placeholder="add, space-separated"> 56 <input type="text" name="add" aria-label="Add labels" placeholder="add, space-separated">
57 <input type="text" name="remove" aria-label="Remove labels" placeholder="remove"> 57 <input type="text" name="remove" aria-label="Remove labels" placeholder="remove">
58 <button type="submit">Apply</button> 58 <button type="submit" class="btn">Apply</button>
59 </form> 59 </form>
60 {{end}} 60 {{end}}
61 </div> 61 </div>
@@ -67,7 +67,7 @@
67 <form method="post" action="{{$base}}/assign" class="actions"> 67 <form method="post" action="{{$base}}/assign" class="actions">
68 <input type="text" name="add" aria-label="Add assignees" placeholder="add, space-separated"> 68 <input type="text" name="add" aria-label="Add assignees" placeholder="add, space-separated">
69 <input type="text" name="remove" aria-label="Remove assignees" placeholder="remove"> 69 <input type="text" name="remove" aria-label="Remove assignees" placeholder="remove">
70 <button type="submit">Apply</button> 70 <button type="submit" class="btn">Apply</button>
71 </form> 71 </form>
72 {{end}} 72 {{end}}
73 </div> 73 </div>
@@ -82,7 +82,7 @@
82 <option value="none">No milestone</option> 82 <option value="none">No milestone</option>
83 {{range .Milestones}}<option value="{{.Title}}"{{if eq .Title $.Issue.Milestone}} selected{{end}}>{{.Title}}</option>{{end}} 83 {{range .Milestones}}<option value="{{.Title}}"{{if eq .Title $.Issue.Milestone}} selected{{end}}>{{.Title}}</option>{{end}}
84 </select> 84 </select>
85 <button type="submit">Apply</button> 85 <button type="submit" class="btn">Apply</button>
86 </form> 86 </form>
87 {{end}} 87 {{end}}
88 </div> 88 </div>
internal/web/templates/issues.html +1
@@ -10,6 +10,7 @@
10 {{range .Filters}}<p class="meta">{{.Key}}: {{if eq .Key "label"}}<span class="chip label" style="{{index $.LabelColors .Value}}">{{.Value}}</span>{{else}}<b>{{.Value}}</b>{{end}} <a href="{{.Clear}}">clear</a></p>{{end}} 10 {{range .Filters}}<p class="meta">{{.Key}}: {{if eq .Key "label"}}<span class="chip label" style="{{index $.LabelColors .Value}}">{{.Value}}</span>{{else}}<b>{{.Value}}</b>{{end}} <a href="{{.Clear}}">clear</a></p>{{end}}
11 <form method="get" class="searchform compact"> 11 <form method="get" class="searchform compact">
12 <input type="search" name="q" aria-label="Search issues" value="{{.Query}}" placeholder="search title and body"> 12 <input type="search" name="q" aria-label="Search issues" value="{{.Query}}" placeholder="search title and body">
13 <button type="submit" class="btn">Search</button>
13 <input type="hidden" name="state" value="{{.State}}"> 14 <input type="hidden" name="state" value="{{.State}}">
14 </form> 15 </form>
15 <span class="spacer"></span> 16 <span class="spacer"></span>
internal/web/templates/labels.html +2 −2
@@ -16,7 +16,7 @@
16 <input type="hidden" name="action" value="remove"> 16 <input type="hidden" name="action" value="remove">
17 <input type="hidden" name="name" value="{{.Name}}"> 17 <input type="hidden" name="name" value="{{.Name}}">
18 {{template "confirmfield" .Name}} 18 {{template "confirmfield" .Name}}
19 <button type="submit" class="linklike">Remove</button> 19 <button type="submit" class="danger">Remove</button>
20 </form>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td> 20 </form>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td>
21</tr> 21</tr>
22{{end}}</table></div> 22{{end}}</table></div>
@@ -29,7 +29,7 @@
29 <input type="text" id="labelname" name="name" maxlength="50" required> 29 <input type="text" id="labelname" name="name" maxlength="50" required>
30 <label for="labelcolor">Colour</label> 30 <label for="labelcolor">Colour</label>
31 <input type="text" id="labelcolor" name="color" placeholder="rrggbb, or blank for one picked from the name"> 31 <input type="text" id="labelcolor" name="color" placeholder="rrggbb, or blank for one picked from the name">
32 <button type="submit">Create label</button> 32 <button type="submit" class="btn">Create label</button>
33 </form> 33 </form>
34</details> 34</details>
35<p class="meta">Removing a label takes it off every issue that carries it.</p> 35<p class="meta">Removing a label takes it off every issue that carries it.</p>
internal/web/templates/layout.html +3 −3
@@ -162,8 +162,8 @@
162 <input type="hidden" name="line" value="{{if eq .Class "del"}}{{.OldLine}}{{else}}{{.NewLine}}{{end}}"> 162 <input type="hidden" name="line" value="{{if eq .Class "del"}}{{.OldLine}}{{else}}{{.NewLine}}{{end}}">
163 <input type="hidden" name="side" value="{{if eq .Class "del"}}old{{else}}new{{end}}"> 163 <input type="hidden" name="side" value="{{if eq .Class "del"}}old{{else}}new{{end}}">
164 <p><textarea name="body" aria-label="Comment on {{.Path}}" rows="3" placeholder="Comment on this line" autofocus></textarea></p> 164 <p><textarea name="body" aria-label="Comment on {{.Path}}" rows="3" placeholder="Comment on this line" autofocus></textarea></p>
165 <p><button type="submit">Comment</button> 165 <p><button type="submit" class="btn">Comment</button>
166 <button type="submit" name="pending" value="on">Add to review</button> 166 <button type="submit" name="pending" value="on" class="btn">Add to review</button>
167 <a href="{{$base}}?view=diff">Cancel</a></p> 167 <a href="{{$base}}?view=diff">Cancel</a></p>
168 </form></td></tr> 168 </form></td></tr>
169 {{end}}{{end}}{{range .Threads}}<tr class="threadrow"><td colspan="3">{{template "thread" dict "T" . "Base" $base "Viewer" $viewer "Class" ""}}</td></tr> 169 {{end}}{{end}}{{range .Threads}}<tr class="threadrow"><td colspan="3">{{template "thread" dict "T" . "Base" $base "Viewer" $viewer "Class" ""}}</td></tr>
@@ -186,7 +186,7 @@
186<form method="post" action="{{.Base}}/diff-comment"> 186<form method="post" action="{{.Base}}/diff-comment">
187 <input type="hidden" name="reply" value="{{$t.ID}}"> 187 <input type="hidden" name="reply" value="{{$t.ID}}">
188 <p><textarea name="body" aria-label="Reply to thread {{$t.ID}}" rows="2" placeholder="Reply as {{.Viewer}}"></textarea></p> 188 <p><textarea name="body" aria-label="Reply to thread {{$t.ID}}" rows="2" placeholder="Reply as {{.Viewer}}"></textarea></p>
189 <p><button type="submit">Reply</button></p> 189 <p><button type="submit" class="btn">Reply</button></p>
190</form></details>{{end}} 190</form></details>{{end}}
191{{if $t.CanResolve}}<form method="post" action="{{.Base}}/thread" class="threadact"><input type="hidden" name="thread" value="{{$t.ID}}"><button type="submit" name="action" value="{{if $t.Resolved}}unresolve{{else}}resolve{{end}}" class="linklike">{{if $t.Resolved}}Reopen thread{{else}}Resolve thread{{end}}</button></form>{{end}} 191{{if $t.CanResolve}}<form method="post" action="{{.Base}}/thread" class="threadact"><input type="hidden" name="thread" value="{{$t.ID}}"><button type="submit" name="action" value="{{if $t.Resolved}}unresolve{{else}}resolve{{end}}" class="linklike">{{if $t.Resolved}}Reopen thread{{else}}Resolve thread{{end}}</button></form>{{end}}
192</div>{{end}} 192</div>{{end}}
internal/web/templates/log.html +1 −1
@@ -4,7 +4,7 @@
4<form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}"> 4<form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">
5 <label for="path">Path</label> 5 <label for="path">Path</label>
6 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory"> 6 <input type="text" id="path" name="path" value="{{.FilePath}}" placeholder="filter to a file or directory">
7 <button type="submit">Filter</button> 7 <button type="submit" class="btn">Search</button>
8 {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}} 8 {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}}
9</form> 9</form>
10{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}} 10{{if .FilePath}}<p class="meta">history of <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/blob/{{.Ref}}/{{.FilePath}}"><code>{{.FilePath}}</code></a></p>{{end}}
internal/web/templates/login.html +1 −1
@@ -1,6 +1,6 @@
1{{define "title"}}login · {{.Site}}{{end}} 1{{define "title"}}login · {{.Site}}{{end}}
2{{define "content"}} 2{{define "content"}}
3<h1>Log in</h1> 3<h1>Sign in</h1>
4{{if .Next}}<p class="meta">Log in to continue to <code>{{.Next}}</code>.</p>{{end}} 4{{if .Next}}<p class="meta">Log in to continue to <code>{{.Next}}</code>.</p>{{end}}
5{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 5{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
6{{if .Sent}} 6{{if .Sent}}
internal/web/templates/mr.html +9 −9
@@ -34,7 +34,7 @@
34<form method="post" action="{{$base}}/edit" class="commentform"> 34<form method="post" action="{{$base}}/edit" class="commentform">
35<p><input type="text" name="title" aria-label="Title" value="{{.MR.Title}}" required></p> 35<p><input type="text" name="title" aria-label="Title" value="{{.MR.Title}}" required></p>
36<p><textarea name="body" aria-label="Description" rows="8">{{.MR.Body}}</textarea></p> 36<p><textarea name="body" aria-label="Description" rows="8">{{.MR.Body}}</textarea></p>
37<p><button type="submit">Save</button></p> 37<p><button type="submit" class="btn">Save</button></p>
38</form></details>{{end}} 38</form></details>{{end}}
39{{if .BodyHTML}}<article class="comment"> 39{{if .BodyHTML}}<article class="comment">
40 <header class="commenthead"><strong><a href="/{{.MR.Author}}">{{.MR.Author}}</a></strong></header> 40 <header class="commenthead"><strong><a href="/{{.MR.Author}}">{{.MR.Author}}</a></strong></header>
@@ -52,7 +52,7 @@
52{{if .Viewer}} 52{{if .Viewer}}
53<form method="post" action="{{$base}}/comment" class="commentform"> 53<form method="post" action="{{$base}}/comment" class="commentform">
54<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p> 54<p><textarea name="body" aria-label="Comment" rows="4" placeholder="Comment as {{.Viewer}}"></textarea></p>
55<p><button type="submit">Comment</button></p> 55<p><button type="submit" class="btn">Comment</button></p>
56</form> 56</form>
57{{end}} 57{{end}}
58 58
@@ -86,8 +86,8 @@
86 <div class="grp"> 86 <div class="grp">
87 <h2>Review</h2> 87 <h2>Review</h2>
88 <form method="post" action="{{$base}}/review" class="actions"> 88 <form method="post" action="{{$base}}/review" class="actions">
89 <button type="submit" name="verdict" value="approve">Approve</button> 89 <button type="submit" name="verdict" value="approve" class="btn">Approve</button>
90 <button type="submit" name="verdict" value="request-changes">Request changes</button> 90 <button type="submit" name="verdict" value="request-changes" class="btn">Request changes</button>
91 </form> 91 </form>
92 </div> 92 </div>
93 <div class="grp"> 93 <div class="grp">
@@ -105,11 +105,11 @@
105 <button type="submit">Merge</button> 105 <button type="submit">Merge</button>
106 </form> 106 </form>
107 <form method="post" action="{{$base}}/close" class="actions"> 107 <form method="post" action="{{$base}}/close" class="actions">
108 <button type="submit">Close without merging</button> 108 <button type="submit" class="danger">Close without merging</button>
109 </form> 109 </form>
110 <form method="post" action="{{$base}}/draft" class="actions"> 110 <form method="post" action="{{$base}}/draft" class="actions">
111 {{if .MR.Draft}}<button type="submit">Ready for review</button> 111 {{if .MR.Draft}}<button type="submit" class="btn">Ready for review</button>
112 {{else}}<input type="hidden" name="draft" value="on"><button type="submit">Convert to draft</button>{{end}} 112 {{else}}<input type="hidden" name="draft" value="on"><button type="submit" class="btn">Convert to draft</button>{{end}}
113 </form> 113 </form>
114 </div> 114 </div>
115 {{end}} 115 {{end}}
@@ -121,7 +121,7 @@
121 <select id="target" name="target"> 121 <select id="target" name="target">
122 {{range .Branches}}<option value="{{.Name}}"{{if eq .Name $.MR.TargetRef}} selected{{end}}>{{.Name}}</option>{{end}} 122 {{range .Branches}}<option value="{{.Name}}"{{if eq .Name $.MR.TargetRef}} selected{{end}}>{{.Name}}</option>{{end}}
123 </select> 123 </select>
124 <button type="submit">Retarget</button> 124 <button type="submit" class="btn">Retarget</button>
125 </form> 125 </form>
126 <p class="row none">Retargeting stales existing reviews.</p> 126 <p class="row none">Retargeting stales existing reviews.</p>
127 </div> 127 </div>
@@ -134,7 +134,7 @@
134 <form method="post" action="{{$base}}/review-request" class="actions"> 134 <form method="post" action="{{$base}}/review-request" class="actions">
135 <input type="text" name="add" aria-label="Add reviewers" placeholder="add, space-separated"> 135 <input type="text" name="add" aria-label="Add reviewers" placeholder="add, space-separated">
136 <input type="text" name="remove" aria-label="Remove reviewers" placeholder="remove"> 136 <input type="text" name="remove" aria-label="Remove reviewers" placeholder="remove">
137 <button type="submit">Apply</button> 137 <button type="submit" class="btn">Apply</button>
138 </form> 138 </form>
139 {{end}} 139 {{end}}
140 </div> 140 </div>
internal/web/templates/mrs.html +1
@@ -10,6 +10,7 @@
10 </nav> 10 </nav>
11 <form method="get" class="searchform compact"> 11 <form method="get" class="searchform compact">
12 <input type="search" name="q" aria-label="Search merge requests" value="{{.Query}}" placeholder="search title and body"> 12 <input type="search" name="q" aria-label="Search merge requests" value="{{.Query}}" placeholder="search title and body">
13 <button type="submit" class="btn">Search</button>
13 <input type="hidden" name="state" value="{{.State}}"> 14 <input type="hidden" name="state" value="{{.State}}">
14 </form> 15 </form>
15 {{range .Filters}}<p class="meta">{{.Key}}: <b>{{.Value}}</b> <a href="{{.Clear}}">clear</a></p>{{end}} 16 {{range .Filters}}<p class="meta">{{.Key}}: <b>{{.Value}}</b> <a href="{{.Clear}}">clear</a></p>{{end}}
internal/web/templates/owner.html +12 −12
@@ -34,7 +34,7 @@
34 <input type="hidden" name="field" value="org-create"> 34 <input type="hidden" name="field" value="org-create">
35 <label for="orgname">Name</label> 35 <label for="orgname">Name</label>
36 <input type="text" id="orgname" name="name" required> 36 <input type="text" id="orgname" name="name" required>
37 <button type="submit">Create</button> 37 <button type="submit" class="btn">Create</button>
38 </form> 38 </form>
39</details> 39</details>
40{{end}} 40{{end}}
@@ -52,7 +52,7 @@
52{{end}}</table></div> 52{{end}}</table></div>
53<details class="editbox"> 53<details class="editbox">
54 <summary>Add or change a member</summary> 54 <summary>Add or change a member</summary>
55 <form method="post" action="/{{$org}}" class="setform"> 55 <form method="post" action="/{{$org}}" class="setform stack">
56 <input type="hidden" name="field" value="member-add"> 56 <input type="hidden" name="field" value="member-add">
57 <label for="member">Username</label> 57 <label for="member">Username</label>
58 <input type="text" id="member" name="user" required> 58 <input type="text" id="member" name="user" required>
@@ -61,7 +61,7 @@
61 <option value="member">member</option> 61 <option value="member">member</option>
62 <option value="admin">admin</option> 62 <option value="admin">admin</option>
63 </select> 63 </select>
64 <button type="submit">Apply</button> 64 <button type="submit" class="btn">Apply</button>
65 </form> 65 </form>
66</details> 66</details>
67 67
@@ -75,14 +75,14 @@ of a team get its role on every repository it is granted.</p>
75 <div class="teambody"> 75 <div class="teambody">
76 <p class="meta">members: {{range .Members}}<a class="memberchip" href="/{{.}}">{{.}}</a> {{else}}<span class="none">none yet</span>{{end}}</p> 76 <p class="meta">members: {{range .Members}}<a class="memberchip" href="/{{.}}">{{.}}</a> {{else}}<span class="none">none yet</span>{{end}}</p>
77 <p class="meta">repositories: {{range .Grants}}<span class="memberchip"><a href="/{{.RepoPath}}">{{.RepoPath}}</a> <span class="role">{{.Role}}</span></span> {{else}}<span class="none">none yet</span>{{end}}</p> 77 <p class="meta">repositories: {{range .Grants}}<span class="memberchip"><a href="/{{.RepoPath}}">{{.RepoPath}}</a> <span class="role">{{.Role}}</span></span> {{else}}<span class="none">none yet</span>{{end}}</p>
78 <form method="post" action="/{{$org}}" class="setform"> 78 <form method="post" action="/{{$org}}" class="setform stack">
79 <input type="hidden" name="team" value="{{.Name}}"> 79 <input type="hidden" name="team" value="{{.Name}}">
80 <label class="none" for="tm-{{.Name}}">Members</label> 80 <label class="none" for="tm-{{.Name}}">Members</label>
81 <input type="text" id="tm-{{.Name}}" name="user" placeholder="usernames, space-separated"> 81 <input type="text" id="tm-{{.Name}}" name="user" placeholder="usernames, space-separated">
82 <button type="submit" name="field" value="team-add">Add</button> 82 <button type="submit" name="field" value="team-add" class="btn">Add</button>
83 <button type="submit" name="field" value="team-remove">Remove</button> 83 <button type="submit" name="field" value="team-remove" class="btn">Remove</button>
84 </form> 84 </form>
85 <form method="post" action="/{{$org}}" class="setform"> 85 <form method="post" action="/{{$org}}" class="setform stack">
86 <input type="hidden" name="team" value="{{.Name}}"> 86 <input type="hidden" name="team" value="{{.Name}}">
87 <label class="none" for="tr-{{.Name}}">Repository</label> 87 <label class="none" for="tr-{{.Name}}">Repository</label>
88 <input type="text" id="tr-{{.Name}}" name="repo" placeholder="owner/name"> 88 <input type="text" id="tr-{{.Name}}" name="repo" placeholder="owner/name">
@@ -92,14 +92,14 @@ of a team get its role on every repository it is granted.</p>
92 <option value="write">write</option> 92 <option value="write">write</option>
93 <option value="admin">admin</option> 93 <option value="admin">admin</option>
94 </select> 94 </select>
95 <button type="submit" name="field" value="team-grant">Grant</button> 95 <button type="submit" name="field" value="team-grant" class="btn">Grant</button>
96 <button type="submit" name="field" value="team-revoke">Revoke</button> 96 <button type="submit" name="field" value="team-revoke" class="btn">Revoke</button>
97 </form> 97 </form>
98 <form method="post" action="/{{$org}}" class="setform"> 98 <form method="post" action="/{{$org}}" class="setform">
99 <input type="hidden" name="field" value="team-delete"> 99 <input type="hidden" name="field" value="team-delete">
100 <input type="hidden" name="team" value="{{.Name}}"> 100 <input type="hidden" name="team" value="{{.Name}}">
101 {{template "confirmfield" .Name}} 101 {{template "confirmfield" .Name}}
102 <button type="submit" class="linklike">Delete this team</button> 102 <button type="submit" class="danger">Delete this team</button>
103 </form> 103 </form>
104 </div> 104 </div>
105</details> 105</details>
@@ -110,7 +110,7 @@ of a team get its role on every repository it is granted.</p>
110 <input type="hidden" name="field" value="team-create"> 110 <input type="hidden" name="field" value="team-create">
111 <label for="newteam">Name</label> 111 <label for="newteam">Name</label>
112 <input type="text" id="newteam" name="team" required> 112 <input type="text" id="newteam" name="team" required>
113 <button type="submit">Create</button> 113 <button type="submit" class="btn">Create</button>
114 </form> 114 </form>
115</details> 115</details>
116 116
@@ -121,7 +121,7 @@ of a team get its role on every repository it is granted.</p>
121 <input type="hidden" name="field" value="org-rename"> 121 <input type="hidden" name="field" value="org-rename">
122 <label for="orgrename">New name</label> 122 <label for="orgrename">New name</label>
123 <input type="text" id="orgrename" name="name" value="{{$org}}" required> 123 <input type="text" id="orgrename" name="name" value="{{$org}}" required>
124 <button type="submit">Rename</button> 124 <button type="submit" class="btn">Rename</button>
125 </form> 125 </form>
126 <p class="meta">Every clone URL under this organization changes with the name.</p> 126 <p class="meta">Every clone URL under this organization changes with the name.</p>
127</details> 127</details>
internal/web/templates/register.html +2 −2
@@ -6,9 +6,9 @@
6{{else}}<p class="lede">Open registration — your account activates once you verify your email.</p>{{end}} 6{{else}}<p class="lede">Open registration — your account activates once you verify your email.</p>{{end}}
7{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} 7{{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}}
8<form method="post" action="/register" class="signupform"> 8<form method="post" action="/register" class="signupform">
9<p><label>username<br><input type="text" name="username" value="{{.Username}}" required autofocus></label></p> 9<p><label>Username<br><input type="text" name="username" value="{{.Username}}" required autofocus></label></p>
10{{if eq .Mode "invite"}}<p><label>invite code<br><input type="text" name="invite" required></label></p> 10{{if eq .Mode "invite"}}<p><label>invite code<br><input type="text" name="invite" required></label></p>
11{{else}}<p><label>email<br><input type="text" name="email" required></label></p>{{end}} 11{{else}}<p><label>Email<br><input type="text" name="email" required></label></p>{{end}}
12<p><label>SSH public key — your key is your identity; paste e.g. <code>~/.ssh/id_ed25519.pub</code><br> 12<p><label>SSH public key — your key is your identity; paste e.g. <code>~/.ssh/id_ed25519.pub</code><br>
13<textarea name="key" aria-label="SSH public key" rows="3" required placeholder="ssh-ed25519 AAAA... you@host"></textarea></label></p> 13<textarea name="key" aria-label="SSH public key" rows="3" required placeholder="ssh-ed25519 AAAA... you@host"></textarea></label></p>
14<p><button type="submit">Create account</button></p> 14<p><button type="submit">Create account</button></p>
internal/web/templates/releases.html +3 −3
@@ -13,7 +13,7 @@
13 </p> 13 </p>
14 <p><input type="text" name="title" aria-label="Title" placeholder="title (defaults to the tag)"></p> 14 <p><input type="text" name="title" aria-label="Title" placeholder="title (defaults to the tag)"></p>
15 <p><textarea name="notes" aria-label="Notes" rows="6" placeholder="what changed"></textarea></p> 15 <p><textarea name="notes" aria-label="Notes" rows="6" placeholder="what changed"></textarea></p>
16 <p><button type="submit">Create release</button></p> 16 <p><button type="submit" class="btn">Create release</button></p>
17</form> 17</form>
18</details> 18</details>
19{{else if .CanWrite}}<p class="meta">Push a tag to create a release from it.</p>{{end}} 19{{else if .CanWrite}}<p class="meta">Push a tag to create a release from it.</p>{{end}}
@@ -30,13 +30,13 @@
30 <input type="hidden" name="tag" value="{{$rel.Tag}}"> 30 <input type="hidden" name="tag" value="{{$rel.Tag}}">
31 <p><input type="text" name="title" aria-label="Title" value="{{$rel.Title}}"></p> 31 <p><input type="text" name="title" aria-label="Title" value="{{$rel.Title}}"></p>
32 <p><textarea name="notes" aria-label="Notes" rows="6">{{$rel.Notes}}</textarea></p> 32 <p><textarea name="notes" aria-label="Notes" rows="6">{{$rel.Notes}}</textarea></p>
33 <p><button type="submit">Save</button></p> 33 <p><button type="submit" class="btn">Save</button></p>
34 </form> 34 </form>
35 {{if $.CanAdmin}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/releases" class="commentform"> 35 {{if $.CanAdmin}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/releases" class="commentform">
36 <input type="hidden" name="action" value="delete"> 36 <input type="hidden" name="action" value="delete">
37 <input type="hidden" name="tag" value="{{$rel.Tag}}"> 37 <input type="hidden" name="tag" value="{{$rel.Tag}}">
38 <p class="meta">Deleting is permanent and takes the assets with it. The tag stays.</p> 38 <p class="meta">Deleting is permanent and takes the assets with it. The tag stays.</p>
39 <p>{{template "confirmfield" $rel.Tag}} <button type="submit" class="linklike">Delete release</button></p> 39 <p>{{template "confirmfield" $rel.Tag}} <button type="submit" class="danger">Delete release</button></p>
40 </form>{{end}}</details>{{end}} 40 </form>{{end}}</details>{{end}}
41 {{if $rel.Assets}}<table class="assets"> 41 {{if $rel.Assets}}<table class="assets">
42 <thead><tr><th scope="col">File</th><th scope="col">Bytes</th><th scope="col">SHA-256</th></tr></thead> 42 <thead><tr><th scope="col">File</th><th scope="col">Bytes</th><th scope="col">SHA-256</th></tr></thead>
internal/web/templates/search.html +1 −1
@@ -3,7 +3,7 @@
3<h1>Search</h1> 3<h1>Search</h1>
4<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform"> 4<form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform">
5 <input type="search" name="q" aria-label="Search file contents" value="{{.Query}}" placeholder="search file contents on {{.Ref}}" autofocus> 5 <input type="search" name="q" aria-label="Search file contents" value="{{.Query}}" placeholder="search file contents on {{.Ref}}" autofocus>
6 <button type="submit">search</button> 6 <button type="submit" class="btn">Search</button>
7</form> 7</form>
8{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p> 8{{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p>
9{{else if .Query}} 9{{else if .Query}}
internal/web/templates/settings.html +18 −18
@@ -9,13 +9,13 @@
9 <input type="hidden" name="field" value="description"> 9 <input type="hidden" name="field" value="description">
10 <label for="description">Description</label> 10 <label for="description">Description</label>
11 <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings"> 11 <input type="text" id="description" name="description" value="{{.Desc}}" placeholder="one line, shown in listings">
12 <button type="submit">Save description</button> 12 <button type="submit" class="btn">Save description</button>
13</form> 13</form>
14<form method="post" action="{{$base}}" class="setform"> 14<form method="post" action="{{$base}}" class="setform">
15 <input type="hidden" name="field" value="website"> 15 <input type="hidden" name="field" value="website">
16 <label for="website">Website</label> 16 <label for="website">Website</label>
17 <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org"> 17 <input type="text" id="website" name="website" value="{{.Repo.Settings.Website}}" placeholder="https://example.org">
18 <button type="submit">Save website</button> 18 <button type="submit" class="btn">Save website</button>
19</form> 19</form>
20{{if .Branches}}<form method="post" action="{{$base}}" class="setform"> 20{{if .Branches}}<form method="post" action="{{$base}}" class="setform">
21 <input type="hidden" name="field" value="default-branch"> 21 <input type="hidden" name="field" value="default-branch">
@@ -23,15 +23,15 @@
23 <select id="default-branch" name="default-branch"> 23 <select id="default-branch" name="default-branch">
24 {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}} 24 {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}}
25 </select> 25 </select>
26 <button type="submit">Save default branch</button> 26 <button type="submit" class="btn">Save default branch</button>
27</form> 27</form>
28{{end}}<form method="post" action="{{$base}}" class="setform"> 28{{end}}<form method="post" action="{{$base}}" class="setform stack">
29 <input type="hidden" name="field" value="topics"> 29 <input type="hidden" name="field" value="topics">
30 <label for="topics-add">Topics to add</label> 30 <label for="topics-add">Topics to add</label>
31 <input type="text" id="topics-add" name="add" placeholder="add, space-separated"> 31 <input type="text" id="topics-add" name="add" placeholder="add, space-separated">
32 <label for="topics-remove">Topics to remove</label> 32 <label for="topics-remove">Topics to remove</label>
33 <input type="text" id="topics-remove" name="remove" placeholder="remove"> 33 <input type="text" id="topics-remove" name="remove" placeholder="remove">
34 <button type="submit">Apply</button> 34 <button type="submit" class="btn">Apply</button>
35</form> 35</form>
36{{if .Topics}}<p class="meta">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}} 36{{if .Topics}}<p class="meta">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}}
37 37
@@ -43,13 +43,13 @@
43 <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option> 43 <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option>
44 <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option> 44 <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option>
45 </select> 45 </select>
46 <button type="submit">Save visibility</button> 46 <button type="submit" class="btn">Save visibility</button>
47</form> 47</form>
48<form method="post" action="{{$base}}" class="setform"> 48<form method="post" action="{{$base}}" class="setform">
49 <input type="hidden" name="field" value="git-daemon"> 49 <input type="hidden" name="field" value="git-daemon">
50 <label for="git-daemon">Serve over git://</label> 50 <label for="git-daemon">Serve over git://</label>
51 <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}> 51 <input type="checkbox" id="git-daemon" name="git-daemon" value="on"{{if .Repo.Settings.GitDaemon}} checked{{end}}>
52 <button type="submit">Save git://</button> 52 <button type="submit" class="btn">Save git://</button>
53</form> 53</form>
54 54
55<h2>Merge gates</h2> 55<h2>Merge gates</h2>
@@ -58,31 +58,31 @@
58 <input type="hidden" name="field" value="require-checks"> 58 <input type="hidden" name="field" value="require-checks">
59 <label for="require-checks">Require green checks</label> 59 <label for="require-checks">Require green checks</label>
60 <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}> 60 <input type="checkbox" id="require-checks" name="require-checks" value="on"{{if .Repo.Settings.RequireChecks}} checked{{end}}>
61 <button type="submit">Save checks</button> 61 <button type="submit" class="btn">Save checks</button>
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="require-approvals"> 64 <input type="hidden" name="field" value="require-approvals">
65 <label for="approvals">Required approvals</label> 65 <label for="approvals">Required approvals</label>
66 <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}"> 66 <input type="number" id="approvals" name="approvals" min="0" max="10" value="{{.Repo.Settings.RequireApprovals}}">
67 <button type="submit">Save approvals</button> 67 <button type="submit" class="btn">Save approvals</button>
68</form> 68</form>
69<form method="post" action="{{$base}}" class="setform"> 69<form method="post" action="{{$base}}" class="setform">
70 <input type="hidden" name="field" value="require-resolved"> 70 <input type="hidden" name="field" value="require-resolved">
71 <label for="require-resolved">Require resolved threads</label> 71 <label for="require-resolved">Require resolved threads</label>
72 <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}> 72 <input type="checkbox" id="require-resolved" name="require-resolved" value="on"{{if .Repo.Settings.RequireResolved}} checked{{end}}>
73 <button type="submit">Save threads</button> 73 <button type="submit" class="btn">Save threads</button>
74</form> 74</form>
75<form method="post" action="{{$base}}" class="setform"> 75<form method="post" action="{{$base}}" class="setform">
76 <input type="hidden" name="field" value="require-codeowners"> 76 <input type="hidden" name="field" value="require-codeowners">
77 <label for="require-codeowners">Require CODEOWNERS approval</label> 77 <label for="require-codeowners">Require CODEOWNERS approval</label>
78 <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}> 78 <input type="checkbox" id="require-codeowners" name="require-codeowners" value="on"{{if .Repo.Settings.RequireCodeowners}} checked{{end}}>
79 <button type="submit">Save CODEOWNERS</button> 79 <button type="submit" class="btn">Save CODEOWNERS</button>
80</form> 80</form>
81<form method="post" action="{{$base}}" class="setform"> 81<form method="post" action="{{$base}}" class="setform">
82 <input type="hidden" name="field" value="require-signed"> 82 <input type="hidden" name="field" value="require-signed">
83 <label for="require-signed">Require signed commits</label> 83 <label for="require-signed">Require signed commits</label>
84 <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}> 84 <input type="checkbox" id="require-signed" name="require-signed" value="on"{{if .Repo.Settings.RequireSignedCommits}} checked{{end}}>
85 <button type="submit">Save signing</button> 85 <button type="submit" class="btn">Save signing</button>
86</form> 86</form>
87 87
88<h2>Protected branches</h2> 88<h2>Protected branches</h2>
@@ -103,13 +103,13 @@
103 <select id="branch" name="branch"> 103 <select id="branch" name="branch">
104 {{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}} 104 {{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}}
105 </select> 105 </select>
106 <button type="submit">Protect</button> 106 <button type="submit" class="btn">Protect</button>
107</form> 107</form>
108<form method="post" action="{{$base}}" class="setform"> 108<form method="post" action="{{$base}}" class="setform">
109 <input type="hidden" name="field" value="require-mr"> 109 <input type="hidden" name="field" value="require-mr">
110 <label for="require-mr">Merge requests only</label> 110 <label for="require-mr">Merge requests only</label>
111 <input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}> 111 <input type="checkbox" id="require-mr" name="require-mr" value="on"{{if .Repo.Settings.RequireMR}} checked{{end}}>
112 <button type="submit">Save merge-only</button> 112 <button type="submit" class="btn">Save merge-only</button>
113</form> 113</form>
114<p class="meta">With merge requests only, a protected branch refuses every direct push once it exists; the merge gates above are then what a change has to pass.</p> 114<p class="meta">With merge requests only, a protected branch refuses every direct push once it exists; the merge gates above are then what a change has to pass.</p>
115 115
@@ -129,7 +129,7 @@
129 <input type="hidden" name="field" value="protect-tag"> 129 <input type="hidden" name="field" value="protect-tag">
130 <label for="glob">Protect tags matching</label> 130 <label for="glob">Protect tags matching</label>
131 <input type="text" id="glob" name="glob" placeholder="v*"> 131 <input type="text" id="glob" name="glob" placeholder="v*">
132 <button type="submit">Protect</button> 132 <button type="submit" class="btn">Protect</button>
133</form> 133</form>
134 134
135<h2>Dependencies</h2> 135<h2>Dependencies</h2>
@@ -137,7 +137,7 @@
137 <input type="hidden" name="field" value="deps"> 137 <input type="hidden" name="field" value="deps">
138 <label for="deps">Check for updates</label> 138 <label for="deps">Check for updates</label>
139 <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}> 139 <input type="checkbox" id="deps" name="deps" value="on"{{if .DepsEnabled}} checked{{end}}>
140 <button type="submit">Save dependency checks</button> 140 <button type="submit" class="btn">Save dependency checks</button>
141</form> 141</form>
142<p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against 142<p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against
143proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind 143proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind
@@ -173,7 +173,7 @@ depends on.</p>
173 <input type="hidden" name="field" value="runner-add"> 173 <input type="hidden" name="field" value="runner-add">
174 <label for="runner-key">Attach a runner</label> 174 <label for="runner-key">Attach a runner</label>
175 <textarea id="runner-key" name="key" rows="3" placeholder="ssh-ed25519 AAAA… (from gitbay-runner init)"></textarea> 175 <textarea id="runner-key" name="key" rows="3" placeholder="ssh-ed25519 AAAA… (from gitbay-runner init)"></textarea>
176 <button type="submit">Attach</button> 176 <button type="submit" class="btn">Attach</button>
177</form> 177</form>
178<p class="meta">Install <code>gitbay-runner</code>, run <code>gitbay-runner init</code>, and paste the key it prints. The runner builds your commits with the repository's secrets; merge requests from forks wait unless it runs with <code>-untrusted</code>.</p> 178<p class="meta">Install <code>gitbay-runner</code>, run <code>gitbay-runner init</code>, and paste the key it prints. The runner builds your commits with the repository's secrets; merge requests from forks wait unless it runs with <code>-untrusted</code>.</p>
179 179
@@ -182,7 +182,7 @@ depends on.</p>
182 <input type="hidden" name="field" value="archive"> 182 <input type="hidden" name="field" value="archive">
183 <label for="archive">Archived (read-only)</label> 183 <label for="archive">Archived (read-only)</label>
184 <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}> 184 <input type="checkbox" id="archive" name="archive" value="on"{{if .Repo.Settings.Archived}} checked{{end}}>
185 <button type="submit">Save archive</button> 185 <button type="submit" class="btn">Save archive</button>
186</form> 186</form>
187<p class="meta">Deleting or transferring a repository is a CLI operation: 187<p class="meta">Deleting or transferring a repository is a CLI operation:
188<code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p> 188<code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p>
internal/web/templates/snippet.html +5 −5
@@ -17,11 +17,11 @@
17<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform"> 17<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform">
18<input type="hidden" name="name" value="{{.Name}}"> 18<input type="hidden" name="name" value="{{.Name}}">
19<p><textarea name="content" aria-label="Content of {{.Name}}" rows="12">{{.Content}}</textarea></p> 19<p><textarea name="content" aria-label="Content of {{.Name}}" rows="12">{{.Content}}</textarea></p>
20<p><button type="submit">Save</button></p> 20<p><button type="submit" class="btn">Save</button></p>
21</form> 21</form>
22<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove"> 22<form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove">
23<input type="hidden" name="name" value="{{.Name}}"> 23<input type="hidden" name="name" value="{{.Name}}">
24<p>{{template "confirmfield" .Name}} <button type="submit">Remove {{.Name}}</button></p> 24<p>{{template "confirmfield" .Name}} <button type="submit" class="danger">Remove {{.Name}}</button></p>
25</form> 25</form>
26</details>{{end}} 26</details>{{end}}
27</section> 27</section>
@@ -31,7 +31,7 @@
31<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform"> 31<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform">
32<p><input type="text" name="name" aria-label="File name" placeholder="filename" required></p> 32<p><input type="text" name="name" aria-label="File name" placeholder="filename" required></p>
33<p><textarea name="content" aria-label="Content" rows="12" required></textarea></p> 33<p><textarea name="content" aria-label="Content" rows="12" required></textarea></p>
34<p><button type="submit">Add file</button></p> 34<p><button type="submit" class="btn">Add file</button></p>
35</form></details> 35</form></details>
36<details class="editbox"><summary>settings</summary> 36<details class="editbox"><summary>settings</summary>
37<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit"> 37<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit">
@@ -41,10 +41,10 @@
41<option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option> 41<option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option>
42<option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option> 42<option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option>
43</select></p> 43</select></p>
44<p><button type="submit">Save</button></p> 44<p><button type="submit" class="btn">Save</button></p>
45</form> 45</form>
46<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/delete"> 46<form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/delete">
47<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit">Delete snippet</button></p> 47<p>{{template "confirmfield" .Snippet.PublicID}} <button type="submit" class="danger">Delete snippet</button></p>
48</form> 48</form>
49</details> 49</details>
50{{end}} 50{{end}}