Commit 3fa8d16dc1
Verified · cmc
internal/web/templates/account.html +10 −10
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | <label for="p-about">About</label> |
| 18 | 18 | <textarea id="p-about" name="about" rows="8" placeholder="longer, shown below your repositories">{{.Profile.About}}</textarea> |
| 19 | 19 | {{template "formatpicker" .Profile.AboutFormat}} |
| 20 | <button type="submit">Save profile</button> | |
| 20 | <button type="submit" class="btn">Save profile</button> | |
| 21 | 21 | </form> |
| 22 | 22 | |
| 23 | 23 | <h2>SSH keys</h2> |
| @@ -31,7 +31,7 @@ a CI checkout wants.</p> | ||
| 31 | 31 | <td class="mono">{{.Fingerprint}}</td> |
| 32 | 32 | <td>{{.Algo}}</td> |
| 33 | 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 | 35 | </tr> |
| 36 | 36 | {{end}}</table></div> |
| 37 | 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 | 48 | <option value="full">full — commands and git</option> |
| 49 | 49 | <option value="git">git — git transport only</option> |
| 50 | 50 | </select> |
| 51 | <button type="submit">Add key</button> | |
| 51 | <button type="submit" class="btn">Add key</button> | |
| 52 | 52 | </form> |
| 53 | 53 | </details> |
| 54 | 54 | |
| @@ -61,7 +61,7 @@ account, and where notifications go.</p> | ||
| 61 | 61 | {{if .Verified}}<span class="badge badge-verified">verified{{with .VerifiedBy}} · {{.}}{{end}}</span> |
| 62 | 62 | {{else}}<span class="badge badge-unsigned">unverified</span>{{end}} |
| 63 | 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 | 65 | {{end}}</ul>{{end}} |
| 66 | 66 | <details class="editbox"> |
| 67 | 67 | <summary>Add an address</summary> |
| @@ -69,13 +69,13 @@ account, and where notifications go.</p> | ||
| 69 | 69 | <input type="hidden" name="field" value="email-add"> |
| 70 | 70 | <label for="address">Address</label> |
| 71 | 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 | 73 | </form> |
| 74 | 74 | <form method="post" action="/settings" class="setform"> |
| 75 | 75 | <input type="hidden" name="field" value="email-verify"> |
| 76 | 76 | <label for="code">Verification code</label> |
| 77 | 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 | 79 | </form> |
| 80 | 80 | </details> |
| 81 | 81 | |
| @@ -87,7 +87,7 @@ account, and where notifications go.</p> | ||
| 87 | 87 | {{range .PGP}}<tr> |
| 88 | 88 | <td class="mono">{{.Fingerprint}}</td> |
| 89 | 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 | 91 | </tr> |
| 92 | 92 | {{end}}</table></div> |
| 93 | 93 | {{else}}<p class="none">No OpenPGP keys.</p>{{end}} |
| @@ -97,7 +97,7 @@ account, and where notifications go.</p> | ||
| 97 | 97 | <input type="hidden" name="field" value="pgp-add"> |
| 98 | 98 | <label for="pgpkey">Armored public key</label> |
| 99 | 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 | 101 | </form> |
| 102 | 102 | </details> |
| 103 | 103 | |
| @@ -106,14 +106,14 @@ account, and where notifications go.</p> | ||
| 106 | 106 | <input type="hidden" name="field" value="notify-mail"> |
| 107 | 107 | <label for="notify-mail">Activity by mail</label> |
| 108 | 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 | 110 | </form> |
| 111 | 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 | 112 | <form method="post" action="/settings" class="setform"> |
| 113 | 113 | <input type="hidden" name="field" value="notify-watch"> |
| 114 | 114 | <label for="notify-watch">Watch repositories you can write to</label> |
| 115 | 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 | 117 | </form> |
| 118 | 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 | 6 | <span class="spacer"></span> |
| 7 | 7 | {{if and .CanWrite (or (eq .Build.Status "pending") (eq .Build.Status "running"))}} |
| 8 | 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 | 10 | </form> |
| 11 | 11 | {{end}} |
| 12 | 12 | </div> |
internal/web/templates/builds.html +1 −1
| @@ -8,7 +8,7 @@ | ||
| 8 | 8 | <select id="job" name="job"> |
| 9 | 9 | {{range .Jobs}}<option value="{{.Name}}">{{.Name}}{{if .Schedule}} (schedule {{.Schedule}}){{else if .Tags}} (tags {{.Tags}}){{end}}</option>{{end}} |
| 10 | 10 | </select> |
| 11 | <button type="submit">Run</button> | |
| 11 | <button type="submit" class="btn">Run</button> | |
| 12 | 12 | </form> |
| 13 | 13 | {{end}} |
| 14 | 14 | <details class="editbox"><summary>Status badge</summary> |
internal/web/templates/explore.html +1
| @@ -4,6 +4,7 @@ | ||
| 4 | 4 | <h1>Explore</h1> |
| 5 | 5 | <form method="get" action="/explore" class="searchform compact"> |
| 6 | 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 | 8 | </form> |
| 8 | 9 | <span class="spacer"></span> |
| 9 | 10 | </div> |
internal/web/templates/globalsearch.html +1 −1
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | <form method="get" action="/search" class="searchform"> |
| 14 | 14 | <input type="search" name="q" aria-label="Search" value="{{.Query}}" placeholder="repository names and topics, issue and merge request text" autofocus> |
| 15 | 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 | 17 | </form> |
| 18 | 18 | {{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p> |
| 19 | 19 | {{else if .Query}} |
internal/web/templates/issue.html +5 −5
| @@ -15,7 +15,7 @@ | ||
| 15 | 15 | <p><input type="text" name="title" aria-label="Title" value="{{.Issue.Title}}" required></p> |
| 16 | 16 | <p><textarea name="body" aria-label="Description" rows="8">{{.Issue.Body}}</textarea></p> |
| 17 | 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 | 19 | </form></details>{{end}} |
| 20 | 20 | {{if .BodyHTML}}<article class="comment"> |
| 21 | 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 | 31 | {{if .Viewer}} |
| 32 | 32 | <form method="post" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues/{{.Issue.Number}}/comment" class="commentform"> |
| 33 | 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 | 35 | </form> |
| 36 | 36 | {{end}} |
| 37 | 37 | </div> |
| @@ -55,7 +55,7 @@ | ||
| 55 | 55 | <form method="post" action="{{$base}}/label" class="actions"> |
| 56 | 56 | <input type="text" name="add" aria-label="Add labels" placeholder="add, space-separated"> |
| 57 | 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 | 59 | </form> |
| 60 | 60 | {{end}} |
| 61 | 61 | </div> |
| @@ -67,7 +67,7 @@ | ||
| 67 | 67 | <form method="post" action="{{$base}}/assign" class="actions"> |
| 68 | 68 | <input type="text" name="add" aria-label="Add assignees" placeholder="add, space-separated"> |
| 69 | 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 | 71 | </form> |
| 72 | 72 | {{end}} |
| 73 | 73 | </div> |
| @@ -82,7 +82,7 @@ | ||
| 82 | 82 | <option value="none">No milestone</option> |
| 83 | 83 | {{range .Milestones}}<option value="{{.Title}}"{{if eq .Title $.Issue.Milestone}} selected{{end}}>{{.Title}}</option>{{end}} |
| 84 | 84 | </select> |
| 85 | <button type="submit">Apply</button> | |
| 85 | <button type="submit" class="btn">Apply</button> | |
| 86 | 86 | </form> |
| 87 | 87 | {{end}} |
| 88 | 88 | </div> |
internal/web/templates/issues.html +1
| @@ -10,6 +10,7 @@ | ||
| 10 | 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 | 11 | <form method="get" class="searchform compact"> |
| 12 | 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 | 14 | <input type="hidden" name="state" value="{{.State}}"> |
| 14 | 15 | </form> |
| 15 | 16 | <span class="spacer"></span> |
internal/web/templates/labels.html +2 −2
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | <input type="hidden" name="action" value="remove"> |
| 17 | 17 | <input type="hidden" name="name" value="{{.Name}}"> |
| 18 | 18 | {{template "confirmfield" .Name}} |
| 19 | <button type="submit" class="linklike">Remove</button> | |
| 19 | <button type="submit" class="danger">Remove</button> | |
| 20 | 20 | </form>{{else if .Org}}<a href="/{{$.Repo.OwnerName}}/-/labels">org</a>{{end}}</td> |
| 21 | 21 | </tr> |
| 22 | 22 | {{end}}</table></div> |
| @@ -29,7 +29,7 @@ | ||
| 29 | 29 | <input type="text" id="labelname" name="name" maxlength="50" required> |
| 30 | 30 | <label for="labelcolor">Colour</label> |
| 31 | 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 | 33 | </form> |
| 34 | 34 | </details> |
| 35 | 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 | 162 | <input type="hidden" name="line" value="{{if eq .Class "del"}}{{.OldLine}}{{else}}{{.NewLine}}{{end}}"> |
| 163 | 163 | <input type="hidden" name="side" value="{{if eq .Class "del"}}old{{else}}new{{end}}"> |
| 164 | 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> | |
| 166 | <button type="submit" name="pending" value="on">Add to review</button> | |
| 165 | <p><button type="submit" class="btn">Comment</button> | |
| 166 | <button type="submit" name="pending" value="on" class="btn">Add to review</button> | |
| 167 | 167 | <a href="{{$base}}?view=diff">Cancel</a></p> |
| 168 | 168 | </form></td></tr> |
| 169 | 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 | 186 | <form method="post" action="{{.Base}}/diff-comment"> |
| 187 | 187 | <input type="hidden" name="reply" value="{{$t.ID}}"> |
| 188 | 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 | 190 | </form></details>{{end}} |
| 191 | 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 | 192 | </div>{{end}} |
internal/web/templates/log.html +1 −1
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | <form method="get" class="logfilter" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}"> |
| 5 | 5 | <label for="path">Path</label> |
| 6 | 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 | 8 | {{if .FilePath}}<a class="act" href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log/{{.Ref}}">Clear</a>{{end}} |
| 9 | 9 | </form> |
| 10 | 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 | 1 | {{define "title"}}login · {{.Site}}{{end}} |
| 2 | 2 | {{define "content"}} |
| 3 | <h1>Log in</h1> | |
| 3 | <h1>Sign in</h1> | |
| 4 | 4 | {{if .Next}}<p class="meta">Log in to continue to <code>{{.Next}}</code>.</p>{{end}} |
| 5 | 5 | {{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} |
| 6 | 6 | {{if .Sent}} |
internal/web/templates/mr.html +9 −9
| @@ -34,7 +34,7 @@ | ||
| 34 | 34 | <form method="post" action="{{$base}}/edit" class="commentform"> |
| 35 | 35 | <p><input type="text" name="title" aria-label="Title" value="{{.MR.Title}}" required></p> |
| 36 | 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 | 38 | </form></details>{{end}} |
| 39 | 39 | {{if .BodyHTML}}<article class="comment"> |
| 40 | 40 | <header class="commenthead"><strong><a href="/{{.MR.Author}}">{{.MR.Author}}</a></strong></header> |
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 | {{if .Viewer}} |
| 53 | 53 | <form method="post" action="{{$base}}/comment" class="commentform"> |
| 54 | 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 | 56 | </form> |
| 57 | 57 | {{end}} |
| 58 | 58 | |
| @@ -86,8 +86,8 @@ | ||
| 86 | 86 | <div class="grp"> |
| 87 | 87 | <h2>Review</h2> |
| 88 | 88 | <form method="post" action="{{$base}}/review" class="actions"> |
| 89 | <button type="submit" name="verdict" value="approve">Approve</button> | |
| 90 | <button type="submit" name="verdict" value="request-changes">Request changes</button> | |
| 89 | <button type="submit" name="verdict" value="approve" class="btn">Approve</button> | |
| 90 | <button type="submit" name="verdict" value="request-changes" class="btn">Request changes</button> | |
| 91 | 91 | </form> |
| 92 | 92 | </div> |
| 93 | 93 | <div class="grp"> |
| @@ -105,11 +105,11 @@ | ||
| 105 | 105 | <button type="submit">Merge</button> |
| 106 | 106 | </form> |
| 107 | 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 | 109 | </form> |
| 110 | 110 | <form method="post" action="{{$base}}/draft" class="actions"> |
| 111 | {{if .MR.Draft}}<button type="submit">Ready for review</button> | |
| 112 | {{else}}<input type="hidden" name="draft" value="on"><button type="submit">Convert to draft</button>{{end}} | |
| 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" class="btn">Convert to draft</button>{{end}} | |
| 113 | 113 | </form> |
| 114 | 114 | </div> |
| 115 | 115 | {{end}} |
| @@ -121,7 +121,7 @@ | ||
| 121 | 121 | <select id="target" name="target"> |
| 122 | 122 | {{range .Branches}}<option value="{{.Name}}"{{if eq .Name $.MR.TargetRef}} selected{{end}}>{{.Name}}</option>{{end}} |
| 123 | 123 | </select> |
| 124 | <button type="submit">Retarget</button> | |
| 124 | <button type="submit" class="btn">Retarget</button> | |
| 125 | 125 | </form> |
| 126 | 126 | <p class="row none">Retargeting stales existing reviews.</p> |
| 127 | 127 | </div> |
| @@ -134,7 +134,7 @@ | ||
| 134 | 134 | <form method="post" action="{{$base}}/review-request" class="actions"> |
| 135 | 135 | <input type="text" name="add" aria-label="Add reviewers" placeholder="add, space-separated"> |
| 136 | 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 | 138 | </form> |
| 139 | 139 | {{end}} |
| 140 | 140 | </div> |
internal/web/templates/mrs.html +1
| @@ -10,6 +10,7 @@ | ||
| 10 | 10 | </nav> |
| 11 | 11 | <form method="get" class="searchform compact"> |
| 12 | 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 | 14 | <input type="hidden" name="state" value="{{.State}}"> |
| 14 | 15 | </form> |
| 15 | 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 | 34 | <input type="hidden" name="field" value="org-create"> |
| 35 | 35 | <label for="orgname">Name</label> |
| 36 | 36 | <input type="text" id="orgname" name="name" required> |
| 37 | <button type="submit">Create</button> | |
| 37 | <button type="submit" class="btn">Create</button> | |
| 38 | 38 | </form> |
| 39 | 39 | </details> |
| 40 | 40 | {{end}} |
| @@ -52,7 +52,7 @@ | ||
| 52 | 52 | {{end}}</table></div> |
| 53 | 53 | <details class="editbox"> |
| 54 | 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 | 56 | <input type="hidden" name="field" value="member-add"> |
| 57 | 57 | <label for="member">Username</label> |
| 58 | 58 | <input type="text" id="member" name="user" required> |
| @@ -61,7 +61,7 @@ | ||
| 61 | 61 | <option value="member">member</option> |
| 62 | 62 | <option value="admin">admin</option> |
| 63 | 63 | </select> |
| 64 | <button type="submit">Apply</button> | |
| 64 | <button type="submit" class="btn">Apply</button> | |
| 65 | 65 | </form> |
| 66 | 66 | </details> |
| 67 | 67 | |
| @@ -75,14 +75,14 @@ of a team get its role on every repository it is granted.</p> | ||
| 75 | 75 | <div class="teambody"> |
| 76 | 76 | <p class="meta">members: {{range .Members}}<a class="memberchip" href="/{{.}}">{{.}}</a> {{else}}<span class="none">none yet</span>{{end}}</p> |
| 77 | 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 | 79 | <input type="hidden" name="team" value="{{.Name}}"> |
| 80 | 80 | <label class="none" for="tm-{{.Name}}">Members</label> |
| 81 | 81 | <input type="text" id="tm-{{.Name}}" name="user" placeholder="usernames, space-separated"> |
| 82 | <button type="submit" name="field" value="team-add">Add</button> | |
| 83 | <button type="submit" name="field" value="team-remove">Remove</button> | |
| 82 | <button type="submit" name="field" value="team-add" class="btn">Add</button> | |
| 83 | <button type="submit" name="field" value="team-remove" class="btn">Remove</button> | |
| 84 | 84 | </form> |
| 85 | <form method="post" action="/{{$org}}" class="setform"> | |
| 85 | <form method="post" action="/{{$org}}" class="setform stack"> | |
| 86 | 86 | <input type="hidden" name="team" value="{{.Name}}"> |
| 87 | 87 | <label class="none" for="tr-{{.Name}}">Repository</label> |
| 88 | 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 | 92 | <option value="write">write</option> |
| 93 | 93 | <option value="admin">admin</option> |
| 94 | 94 | </select> |
| 95 | <button type="submit" name="field" value="team-grant">Grant</button> | |
| 96 | <button type="submit" name="field" value="team-revoke">Revoke</button> | |
| 95 | <button type="submit" name="field" value="team-grant" class="btn">Grant</button> | |
| 96 | <button type="submit" name="field" value="team-revoke" class="btn">Revoke</button> | |
| 97 | 97 | </form> |
| 98 | 98 | <form method="post" action="/{{$org}}" class="setform"> |
| 99 | 99 | <input type="hidden" name="field" value="team-delete"> |
| 100 | 100 | <input type="hidden" name="team" value="{{.Name}}"> |
| 101 | 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 | 103 | </form> |
| 104 | 104 | </div> |
| 105 | 105 | </details> |
| @@ -110,7 +110,7 @@ of a team get its role on every repository it is granted.</p> | ||
| 110 | 110 | <input type="hidden" name="field" value="team-create"> |
| 111 | 111 | <label for="newteam">Name</label> |
| 112 | 112 | <input type="text" id="newteam" name="team" required> |
| 113 | <button type="submit">Create</button> | |
| 113 | <button type="submit" class="btn">Create</button> | |
| 114 | 114 | </form> |
| 115 | 115 | </details> |
| 116 | 116 | |
| @@ -121,7 +121,7 @@ of a team get its role on every repository it is granted.</p> | ||
| 121 | 121 | <input type="hidden" name="field" value="org-rename"> |
| 122 | 122 | <label for="orgrename">New name</label> |
| 123 | 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 | 125 | </form> |
| 126 | 126 | <p class="meta">Every clone URL under this organization changes with the name.</p> |
| 127 | 127 | </details> |
internal/web/templates/register.html +2 −2
| @@ -6,9 +6,9 @@ | ||
| 6 | 6 | {{else}}<p class="lede">Open registration — your account activates once you verify your email.</p>{{end}} |
| 7 | 7 | {{if .Error}}<p class="error" role="alert">{{.Error}}</p>{{end}} |
| 8 | 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 | 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 | 12 | <p><label>SSH public key — your key is your identity; paste e.g. <code>~/.ssh/id_ed25519.pub</code><br> |
| 13 | 13 | <textarea name="key" aria-label="SSH public key" rows="3" required placeholder="ssh-ed25519 AAAA... you@host"></textarea></label></p> |
| 14 | 14 | <p><button type="submit">Create account</button></p> |
internal/web/templates/releases.html +3 −3
| @@ -13,7 +13,7 @@ | ||
| 13 | 13 | </p> |
| 14 | 14 | <p><input type="text" name="title" aria-label="Title" placeholder="title (defaults to the tag)"></p> |
| 15 | 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 | 17 | </form> |
| 18 | 18 | </details> |
| 19 | 19 | {{else if .CanWrite}}<p class="meta">Push a tag to create a release from it.</p>{{end}} |
| @@ -30,13 +30,13 @@ | ||
| 30 | 30 | <input type="hidden" name="tag" value="{{$rel.Tag}}"> |
| 31 | 31 | <p><input type="text" name="title" aria-label="Title" value="{{$rel.Title}}"></p> |
| 32 | 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 | 34 | </form> |
| 35 | 35 | {{if $.CanAdmin}}<form method="post" action="/{{$.Repo.OwnerName}}/{{$.Repo.Name}}/releases" class="commentform"> |
| 36 | 36 | <input type="hidden" name="action" value="delete"> |
| 37 | 37 | <input type="hidden" name="tag" value="{{$rel.Tag}}"> |
| 38 | 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 | 40 | </form>{{end}}</details>{{end}} |
| 41 | 41 | {{if $rel.Assets}}<table class="assets"> |
| 42 | 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 | 3 | <h1>Search</h1> |
| 4 | 4 | <form method="get" action="/{{.Repo.OwnerName}}/{{.Repo.Name}}/search" class="searchform"> |
| 5 | 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 | 7 | </form> |
| 8 | 8 | {{if .QueryErr}}<p class="error" role="alert">{{.QueryErr}}</p> |
| 9 | 9 | {{else if .Query}} |
internal/web/templates/settings.html +18 −18
| @@ -9,13 +9,13 @@ | ||
| 9 | 9 | <input type="hidden" name="field" value="description"> |
| 10 | 10 | <label for="description">Description</label> |
| 11 | 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 | 13 | </form> |
| 14 | 14 | <form method="post" action="{{$base}}" class="setform"> |
| 15 | 15 | <input type="hidden" name="field" value="website"> |
| 16 | 16 | <label for="website">Website</label> |
| 17 | 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 | 19 | </form> |
| 20 | 20 | {{if .Branches}}<form method="post" action="{{$base}}" class="setform"> |
| 21 | 21 | <input type="hidden" name="field" value="default-branch"> |
| @@ -23,15 +23,15 @@ | ||
| 23 | 23 | <select id="default-branch" name="default-branch"> |
| 24 | 24 | {{$cur := .Repo.DefaultBranch}}{{range .Branches}}<option value="{{.Name}}"{{if eq .Name $cur}} selected{{end}}>{{.Name}}</option>{{end}} |
| 25 | 25 | </select> |
| 26 | <button type="submit">Save default branch</button> | |
| 26 | <button type="submit" class="btn">Save default branch</button> | |
| 27 | 27 | </form> |
| 28 | {{end}}<form method="post" action="{{$base}}" class="setform"> | |
| 28 | {{end}}<form method="post" action="{{$base}}" class="setform stack"> | |
| 29 | 29 | <input type="hidden" name="field" value="topics"> |
| 30 | 30 | <label for="topics-add">Topics to add</label> |
| 31 | 31 | <input type="text" id="topics-add" name="add" placeholder="add, space-separated"> |
| 32 | 32 | <label for="topics-remove">Topics to remove</label> |
| 33 | 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 | 35 | </form> |
| 36 | 36 | {{if .Topics}}<p class="meta">{{range .Topics}}<span class="chip topic">{{.}}</span> {{end}}</p>{{end}} |
| 37 | 37 | |
| @@ -43,13 +43,13 @@ | ||
| 43 | 43 | <option value="public"{{if eq .Repo.Visibility "public"}} selected{{end}}>Public</option> |
| 44 | 44 | <option value="private"{{if eq .Repo.Visibility "private"}} selected{{end}}>Private</option> |
| 45 | 45 | </select> |
| 46 | <button type="submit">Save visibility</button> | |
| 46 | <button type="submit" class="btn">Save visibility</button> | |
| 47 | 47 | </form> |
| 48 | 48 | <form method="post" action="{{$base}}" class="setform"> |
| 49 | 49 | <input type="hidden" name="field" value="git-daemon"> |
| 50 | 50 | <label for="git-daemon">Serve over git://</label> |
| 51 | 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 | 53 | </form> |
| 54 | 54 | |
| 55 | 55 | <h2>Merge gates</h2> |
| @@ -58,31 +58,31 @@ | ||
| 58 | 58 | <input type="hidden" name="field" value="require-checks"> |
| 59 | 59 | <label for="require-checks">Require green checks</label> |
| 60 | 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 | 62 | </form> |
| 63 | 63 | <form method="post" action="{{$base}}" class="setform"> |
| 64 | 64 | <input type="hidden" name="field" value="require-approvals"> |
| 65 | 65 | <label for="approvals">Required approvals</label> |
| 66 | 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 | 68 | </form> |
| 69 | 69 | <form method="post" action="{{$base}}" class="setform"> |
| 70 | 70 | <input type="hidden" name="field" value="require-resolved"> |
| 71 | 71 | <label for="require-resolved">Require resolved threads</label> |
| 72 | 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 | 74 | </form> |
| 75 | 75 | <form method="post" action="{{$base}}" class="setform"> |
| 76 | 76 | <input type="hidden" name="field" value="require-codeowners"> |
| 77 | 77 | <label for="require-codeowners">Require CODEOWNERS approval</label> |
| 78 | 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 | 80 | </form> |
| 81 | 81 | <form method="post" action="{{$base}}" class="setform"> |
| 82 | 82 | <input type="hidden" name="field" value="require-signed"> |
| 83 | 83 | <label for="require-signed">Require signed commits</label> |
| 84 | 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 | 86 | </form> |
| 87 | 87 | |
| 88 | 88 | <h2>Protected branches</h2> |
| @@ -103,13 +103,13 @@ | ||
| 103 | 103 | <select id="branch" name="branch"> |
| 104 | 104 | {{range .Branches}}<option value="{{.Name}}">{{.Name}}</option>{{end}} |
| 105 | 105 | </select> |
| 106 | <button type="submit">Protect</button> | |
| 106 | <button type="submit" class="btn">Protect</button> | |
| 107 | 107 | </form> |
| 108 | 108 | <form method="post" action="{{$base}}" class="setform"> |
| 109 | 109 | <input type="hidden" name="field" value="require-mr"> |
| 110 | 110 | <label for="require-mr">Merge requests only</label> |
| 111 | 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 | 113 | </form> |
| 114 | 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 | 129 | <input type="hidden" name="field" value="protect-tag"> |
| 130 | 130 | <label for="glob">Protect tags matching</label> |
| 131 | 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 | 133 | </form> |
| 134 | 134 | |
| 135 | 135 | <h2>Dependencies</h2> |
| @@ -137,7 +137,7 @@ | ||
| 137 | 137 | <input type="hidden" name="field" value="deps"> |
| 138 | 138 | <label for="deps">Check for updates</label> |
| 139 | 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 | 141 | </form> |
| 142 | 142 | <p class="meta">Compares the manifests on <code>{{.Repo.DefaultBranch}}</code> against |
| 143 | 143 | proxy.golang.org, npm, crates.io, and PyPI once a day, and tracks what is behind |
| @@ -173,7 +173,7 @@ depends on.</p> | ||
| 173 | 173 | <input type="hidden" name="field" value="runner-add"> |
| 174 | 174 | <label for="runner-key">Attach a runner</label> |
| 175 | 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 | 177 | </form> |
| 178 | 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 | 182 | <input type="hidden" name="field" value="archive"> |
| 183 | 183 | <label for="archive">Archived (read-only)</label> |
| 184 | 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 | 186 | </form> |
| 187 | 187 | <p class="meta">Deleting or transferring a repository is a CLI operation: |
| 188 | 188 | <code>gitbay repo delete {{.Repo.OwnerName}}/{{.Repo.Name}} --yes</code></p> |
internal/web/templates/snippet.html +5 −5
| @@ -17,11 +17,11 @@ | ||
| 17 | 17 | <form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file" class="commentform"> |
| 18 | 18 | <input type="hidden" name="name" value="{{.Name}}"> |
| 19 | 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 | 21 | </form> |
| 22 | 22 | <form method="post" action="/{{$.Owner}}/-/snippets/{{$.Snippet.PublicID}}/file/remove"> |
| 23 | 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 | 25 | </form> |
| 26 | 26 | </details>{{end}} |
| 27 | 27 | </section> |
| @@ -31,7 +31,7 @@ | ||
| 31 | 31 | <form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/file" class="commentform"> |
| 32 | 32 | <p><input type="text" name="name" aria-label="File name" placeholder="filename" required></p> |
| 33 | 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 | 35 | </form></details> |
| 36 | 36 | <details class="editbox"><summary>settings</summary> |
| 37 | 37 | <form method="post" action="/{{.Owner}}/-/snippets/{{.Snippet.PublicID}}/edit"> |
| @@ -41,10 +41,10 @@ | ||
| 41 | 41 | <option value="unlisted"{{if eq .Snippet.Visibility "unlisted"}} selected{{end}}>unlisted</option> |
| 42 | 42 | <option value="private"{{if eq .Snippet.Visibility "private"}} selected{{end}}>private</option> |
| 43 | 43 | </select></p> |
| 44 | <p><button type="submit">Save</button></p> | |
| 44 | <p><button type="submit" class="btn">Save</button></p> | |
| 45 | 45 | </form> |
| 46 | 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 | 48 | </form> |
| 49 | 49 | </details> |
| 50 | 50 | {{end}} |