| 1 | {{define "mrs"}} |
| 2 | {{template "layout-start" .}} |
| 3 | <h1>{{t "mr.title"}}</h1> |
| 4 | {{template "repotabs" .}} |
| 5 | <ul class="clean"> |
| 6 | {{range .MRs}}<li><a href="/{{$.Repo.FullPath}}/-/merge-requests/{{.Number}}">!{{.Number}} {{.Title}}</a> <span class="pill">{{.Status}}</span> <span class="muted">{{.SourceBranch}} → {{.TargetBranch}}</span></li>{{else}}<li class="muted">{{t "mr.none"}}</li>{{end}} |
| 7 | </ul> |
| 8 | {{if .CanWrite}} |
| 9 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/merge-requests"> |
| 10 | <h2>{{t "mr.new"}}</h2> |
| 11 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 12 | <label>{{t "mr.titleField"}} <input name="title" required></label> |
| 13 | <label>{{t "mr.description"}} <textarea name="description"></textarea></label> |
| 14 | <label>{{t "mr.source"}} <select name="source">{{range .Branches}}<option>{{.Name}}</option>{{end}}</select></label> |
| 15 | <label>{{t "mr.target"}} <select name="target">{{range .Branches}}<option>{{.Name}}</option>{{end}}</select></label> |
| 16 | <button type="submit">{{t "action.open"}}</button> |
| 17 | </form> |
| 18 | {{end}} |
| 19 | {{template "layout-end" .}} |
| 20 | {{end}} |
| 21 | |
| 22 | {{define "mr"}} |
| 23 | {{template "layout-start" .}} |
| 24 | <h1>!{{.MR.Number}} {{.MR.Title}}</h1> |
| 25 | {{template "repotabs" .}} |
| 26 | <p><span class="pill">{{.MR.Status}}</span> {{.MR.SourceBranch}} → {{.MR.TargetBranch}} · {{.MR.Author}}</p> |
| 27 | {{if .MR.Description}}<pre>{{.MR.Description}}</pre>{{end}} |
| 28 | <h2>{{t "mr.commits"}}</h2> |
| 29 | <pre>{{if .Diff}}{{.Diff}}{{else}}{{t "mr.noDiff"}}{{end}}</pre> |
| 30 | {{if .CanMerge}} |
| 31 | <form method="post" action="/{{.Repo.FullPath}}/-/merge-requests/{{.MR.Number}}/merge"> |
| 32 | <input type="hidden" name="csrf" value="{{.CSRF}}"><button type="submit">{{t "action.merge"}}</button> |
| 33 | </form> |
| 34 | {{end}} |
| 35 | {{if and .User (eq .MR.Status "open")}} |
| 36 | <form method="post" action="/{{.Repo.FullPath}}/-/merge-requests/{{.MR.Number}}/close"> |
| 37 | <input type="hidden" name="csrf" value="{{.CSRF}}"><button class="ghost" type="submit">{{t "action.close"}}</button> |
| 38 | </form> |
| 39 | {{end}} |
| 40 | <h2>{{t "mr.comments"}}</h2> |
| 41 | <ul class="clean"> |
| 42 | {{range .Notes}}<li><strong>{{.Author}}</strong> <span class="muted">{{.When}}</span><p>{{.Body}}</p></li>{{else}}<li class="muted">{{t "mr.noComments"}}</li>{{end}} |
| 43 | </ul> |
| 44 | {{if .User}} |
| 45 | <form method="post" action="/{{.Repo.FullPath}}/-/merge-requests/{{.MR.Number}}/notes"> |
| 46 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 47 | <label>{{t "mr.comment"}} <textarea name="body" required></textarea></label> |
| 48 | <button type="submit">{{t "action.post"}}</button> |
| 49 | </form> |
| 50 | {{end}} |
| 51 | {{template "layout-end" .}} |
| 52 | {{end}} |
| 53 | |
| 54 | {{define "pipelines"}} |
| 55 | {{template "layout-start" .}} |
| 56 | <h1>{{t "pipe.title"}}</h1> |
| 57 | {{template "repotabs" .}} |
| 58 | {{if .CanWrite}} |
| 59 | <form method="post" action="/{{.Repo.FullPath}}/-/pipelines" class="row"> |
| 60 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 61 | <input name="ref" placeholder="{{t "pipe.ref"}}"> |
| 62 | <button type="submit">{{t "action.start"}}</button> |
| 63 | </form> |
| 64 | {{end}} |
| 65 | <ul class="clean"> |
| 66 | {{range .Pipes}}<li><a href="/{{$.Repo.FullPath}}/-/pipelines/{{.ID}}">#{{.ID}}</a> <span class="pill">{{.Status}}</span> <span class="muted">{{.Ref}} {{short .CommitSHA}}</span></li>{{else}}<li class="muted">{{t "pipe.none"}}</li>{{end}} |
| 67 | </ul> |
| 68 | {{template "layout-end" .}} |
| 69 | {{end}} |
| 70 | |
| 71 | {{define "pipeline"}} |
| 72 | {{template "layout-start" .}} |
| 73 | <h1>{{t "pipe.one"}} #{{.Pipe.ID}}</h1> |
| 74 | {{template "repotabs" .}} |
| 75 | <p><span class="pill">{{.Pipe.Status}}</span> {{.Pipe.Ref}} <code>{{.Pipe.CommitSHA}}</code></p> |
| 76 | {{range .Jobs}} |
| 77 | <article class="panel"> |
| 78 | <h2>{{.Name}} <span class="pill">{{.Status}}</span> <span class="muted">{{.Stage}} · {{.Image}}</span></h2> |
| 79 | {{if .Log}}<pre>{{.Log}}</pre>{{end}} |
| 80 | </article> |
| 81 | {{end}} |
| 82 | {{template "layout-end" .}} |
| 83 | {{end}} |
| 84 | |
| 85 | {{define "releases"}} |
| 86 | {{template "layout-start" .}} |
| 87 | <h1>{{t "title.releases"}}</h1> |
| 88 | {{template "repotabs" .}} |
| 89 | {{range .Releases}} |
| 90 | <article class="panel"> |
| 91 | <h2>{{.Name}} <span class="pill">{{.Tag}}</span></h2> |
| 92 | <p class="muted">{{short .CommitSHA}}</p> |
| 93 | {{if .Body}}<pre>{{.Body}}</pre>{{end}} |
| 94 | <ul> |
| 95 | {{$tag := .Tag}}{{$path := $.Repo.FullPath}} |
| 96 | {{range .Assets}}<li><a href="/{{$path}}/-/releases/{{$tag}}/assets/{{.Name}}">{{.Name}}</a> <span class="muted">{{.Size}} {{t "rel.bytes"}}</span></li>{{end}} |
| 97 | </ul> |
| 98 | </article> |
| 99 | {{else}}<p class="muted">{{t "rel.none"}}</p>{{end}} |
| 100 | {{template "layout-end" .}} |
| 101 | {{end}} |
| 102 | |
| 103 | {{define "roleselect"}} |
| 104 | <select name="role"> |
| 105 | <option value="readonly" {{if eq . "readonly"}}selected{{end}}>{{t "role.readonly"}}</option> |
| 106 | <option value="developer" {{if eq . "developer"}}selected{{end}}>{{t "role.developer"}}</option> |
| 107 | <option value="maintainer" {{if eq . "maintainer"}}selected{{end}}>{{t "role.maintainer"}}</option> |
| 108 | </select> |
| 109 | {{end}} |
| 110 | |
| 111 | {{define "settings"}} |
| 112 | {{template "layout-start" .}} |
| 113 | <h1>{{t "title.settings"}}</h1> |
| 114 | {{template "repotabs" .}} |
| 115 | {{if not .CanAdmin}}<p>{{t "set.onlyAdmin" (roleName .Role)}}</p>{{end}} |
| 116 | {{if .CanAdmin}} |
| 117 | <p class="sub"> |
| 118 | <a href="?tab=general"{{if or (eq .Tab "general") (eq .Tab "")}} class="on"{{end}}>{{t "set.general"}}</a> |
| 119 | <a href="?tab=members"{{if eq .Tab "members"}} class="on"{{end}}>{{t "set.members"}}</a> |
| 120 | <a href="?tab=branches"{{if eq .Tab "branches"}} class="on"{{end}}>{{t "set.branches"}}</a> |
| 121 | <a href="?tab=secrets"{{if eq .Tab "secrets"}} class="on"{{end}}>{{t "set.secrets"}}</a> |
| 122 | <a href="?tab=webhooks"{{if eq .Tab "webhooks"}} class="on"{{end}}>{{t "set.webhooks"}}</a> |
| 123 | </p> |
| 124 | {{if eq .Tab "members"}} |
| 125 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/members"> |
| 126 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 127 | <div class="row"> |
| 128 | <input name="username" placeholder="{{t "set.username"}}" required> |
| 129 | {{template "roleselect" "developer"}} |
| 130 | <button type="submit">{{t "action.save"}}</button> |
| 131 | </div> |
| 132 | </form> |
| 133 | <ul class="clean"> |
| 134 | {{range .Members}}<li>{{.Username}} · {{roleName .Role}} {{if .Pending}}<span class="pill">{{t "set.pending"}}</span>{{end}} |
| 135 | {{if not .Pending}}<form method="post" action="/{{$.Repo.FullPath}}/-/members/remove"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="username" value="{{.Username}}"><button class="ghost" type="submit">{{t "action.remove"}}</button></form>{{end}} |
| 136 | </li>{{end}} |
| 137 | </ul> |
| 138 | {{else if eq .Tab "branches"}} |
| 139 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/protected"> |
| 140 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 141 | <div class="row"><input name="pattern" placeholder="{{t "set.pattern"}}" required><button type="submit">{{t "action.protect"}}</button></div> |
| 142 | </form> |
| 143 | <ul class="clean">{{range .Patterns}}<li><code>{{.}}</code> |
| 144 | <form method="post" action="/{{$.Repo.FullPath}}/-/protected/remove"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="pattern" value="{{.}}"><button class="ghost" type="submit">{{t "action.remove"}}</button></form> |
| 145 | </li>{{end}}</ul> |
| 146 | <p class="muted">{{t "set.protectHint"}}</p> |
| 147 | {{else if eq .Tab "secrets"}} |
| 148 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/secrets"> |
| 149 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 150 | <label>{{t "set.secretName"}} <input name="name" placeholder="DEPLOY_SSH_KEY" required></label> |
| 151 | <label>{{t "set.secretValue"}} <textarea name="value" required></textarea></label> |
| 152 | <label class="row"><input type="checkbox" name="protected" value="1"> {{t "set.protectedOnly"}}</label> |
| 153 | <button type="submit">{{t "action.save"}}</button> |
| 154 | </form> |
| 155 | <ul class="clean">{{range .Secrets}}<li><code>{{.Name}}</code> {{if .Protected}}<span class="pill">{{t "vis.protected"}}</span>{{end}} |
| 156 | <form method="post" action="/{{$.Repo.FullPath}}/-/secrets/delete"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="name" value="{{.Name}}"><button class="ghost" type="submit">{{t "action.remove"}}</button></form> |
| 157 | </li>{{end}}</ul> |
| 158 | <p class="muted">{{t "set.valuesHidden"}}</p> |
| 159 | {{else if eq .Tab "webhooks"}} |
| 160 | {{template "webhookform" .}} |
| 161 | {{else}} |
| 162 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/settings"> |
| 163 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 164 | <label>{{t "new.description"}} <input name="description" value="{{.Repo.Description}}"></label> |
| 165 | <label>{{t "new.visibility"}} <select name="visibility"><option value="private" {{if eq .Repo.Visibility "private"}}selected{{end}}>{{t "vis.private"}}</option><option value="public" {{if eq .Repo.Visibility "public"}}selected{{end}}>{{t "vis.public"}}</option></select></label> |
| 166 | <button type="submit">{{t "action.save"}}</button> |
| 167 | </form> |
| 168 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/logo" enctype="multipart/form-data"> |
| 169 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 170 | <label>{{t "logo.file"}} <input type="file" name="logo" accept="image/png,image/jpeg,image/gif,image/svg+xml,.svg" required></label> |
| 171 | <p class="muted">{{t "logo.hint"}}</p> |
| 172 | <button type="submit">{{t "action.save"}}</button> |
| 173 | </form> |
| 174 | <form class="panel" method="post" action="/{{.Repo.FullPath}}/-/delete"> |
| 175 | <h2>{{t "set.delete"}}</h2> |
| 176 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 177 | <label>{{t "set.typeName" .Repo.Name}} <input name="confirm"></label> |
| 178 | <button type="submit">{{t "set.deleteRepo"}}</button> |
| 179 | </form> |
| 180 | {{end}} |
| 181 | {{end}} |
| 182 | {{template "layout-end" .}} |
| 183 | {{end}} |
| 184 | |
| 185 | {{define "webhookform"}} |
| 186 | <form class="panel wh" method="post" action="{{if .Repo}}/{{.Repo.FullPath}}/-/webhooks{{else}}/groups/{{.Group.Path}}/webhooks{{end}}" data-preset="custom"> |
| 187 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 188 | <label>{{t "set.whName"}} <input name="name" required></label> |
| 189 | <label>{{t "set.preset"}} |
| 190 | <select name="preset" data-preset-select> |
| 191 | <option value="custom" selected>{{t "set.preset.custom"}}</option> |
| 192 | <option value="generic">{{t "set.preset.generic"}}</option> |
| 193 | <option value="discord">{{t "set.preset.discord"}}</option> |
| 194 | <option value="slack">{{t "set.preset.slack"}}</option> |
| 195 | <option value="teams">{{t "set.preset.teams"}}</option> |
| 196 | <option value="mattermost">{{t "set.preset.mattermost"}}</option> |
| 197 | <option value="rocketchat">{{t "set.preset.rocketchat"}}</option> |
| 198 | <option value="telegram">{{t "set.preset.telegram"}}</option> |
| 199 | <option value="matrix">{{t "set.preset.matrix"}}</option> |
| 200 | <option value="googlechat">{{t "set.preset.googlechat"}}</option> |
| 201 | <option value="ntfy">{{t "set.preset.ntfy"}}</option> |
| 202 | <option value="gotify">{{t "set.preset.gotify"}}</option> |
| 203 | <option value="grok">{{t "set.preset.grok"}}</option> |
| 204 | </select> |
| 205 | </label> |
| 206 | <label class="wh-field for-discord for-slack for-teams for-mattermost for-rocketchat for-googlechat">{{t "wh.webhookURL"}} <input name="url" placeholder="https://example.test/hook" required disabled></label> |
| 207 | <label class="wh-field for-generic for-grok for-custom">{{t "wh.url"}} <input name="url" placeholder="https://example.test/hook" required></label> |
| 208 | <label class="wh-field for-discord">{{t "wh.username"}} <input name="username" disabled></label> |
| 209 | <label class="wh-field for-discord">{{t "wh.avatar"}} <input name="avatar" placeholder="https://example.test/avatar.png" disabled></label> |
| 210 | <label class="wh-field for-mattermost">{{t "wh.username"}} <input name="username" disabled></label> |
| 211 | <label class="wh-field for-mattermost">{{t "wh.icon"}} <input name="icon" placeholder="https://example.test/icon.png" disabled></label> |
| 212 | <label class="wh-field for-rocketchat">{{t "wh.alias"}} <input name="alias" disabled></label> |
| 213 | <label class="wh-field for-telegram for-matrix for-gotify for-grok">{{t "wh.token"}} <input name="token" placeholder="BOT_TOKEN" required disabled> <span class="muted">{{t "wh.tokenHint"}}</span></label> |
| 214 | <label class="wh-field for-ntfy">{{t "wh.token"}} <input name="token" placeholder="BOT_TOKEN" disabled> <span class="muted">{{t "wh.tokenHint"}}</span></label> |
| 215 | <label class="wh-field for-telegram">{{t "wh.chat"}} <input name="chat" required disabled></label> |
| 216 | <label class="wh-field for-ntfy">{{t "wh.server"}} <input name="server" placeholder="https://ntfy.sh" disabled></label> |
| 217 | <label class="wh-field for-gotify">{{t "wh.server"}} <input name="server" placeholder="https://gotify.example" required disabled></label> |
| 218 | <label class="wh-field for-ntfy">{{t "wh.topic"}} <input name="topic" required disabled></label> |
| 219 | <label class="wh-field for-matrix">{{t "wh.homeserver"}} <input name="homeserver" placeholder="https://matrix.example" required disabled></label> |
| 220 | <label class="wh-field for-matrix">{{t "wh.room"}} <input name="room" placeholder="!room:example.org" required disabled></label> |
| 221 | <label class="wh-field for-custom">{{t "wh.method"}} |
| 222 | <select name="method"> |
| 223 | <option>POST</option> |
| 224 | <option>PUT</option> |
| 225 | <option>PATCH</option> |
| 226 | <option>GET</option> |
| 227 | </select> |
| 228 | </label> |
| 229 | <label class="wh-field for-custom">{{t "wh.contentType"}} <input name="content_type" placeholder="application/json"></label> |
| 230 | <label class="wh-field for-custom">{{t "wh.headers"}} <textarea name="headers" placeholder="Authorization: Bearer {{"{{secret.NAME}}"}}"></textarea> <span class="muted">{{t "wh.headerHint"}}</span></label> |
| 231 | <label class="wh-field for-custom">{{t "wh.body"}} <textarea name="body"></textarea> <span class="muted">{{t "wh.bodyHint"}}</span></label> |
| 232 | <label>{{t "set.branchFilter"}} <input name="branch_filter" placeholder="{{t "set.filterHint"}}"></label> |
| 233 | <fieldset> |
| 234 | <label><input type="checkbox" name="event_push" value="1"> {{t "set.ev.push"}}</label> |
| 235 | <label><input type="checkbox" name="event_merge_request" value="1"> {{t "set.ev.mr"}}</label> |
| 236 | <label><input type="checkbox" name="event_pipeline_success" value="1"> {{t "set.ev.ok"}}</label> |
| 237 | <label><input type="checkbox" name="event_pipeline_failure" value="1"> {{t "set.ev.fail"}}</label> |
| 238 | <label><input type="checkbox" name="event_release_published" value="1"> {{t "set.ev.release"}}</label> |
| 239 | </fieldset> |
| 240 | <button type="submit">{{t "set.saveWebhook"}}</button> |
| 241 | </form> |
| 242 | <script src="/assets/webhook.js"></script> |
| 243 | <ul class="clean"> |
| 244 | {{range .Hooks}}<li><strong>{{.Name}}</strong> {{presetName .Preset}} <span class="muted">{{.Method}} {{.URL}}</span> |
| 245 | <div class="muted">{{.Events}} {{if .Filter}}· filter {{.Filter}}{{end}}</div> |
| 246 | {{range .Deliveries}}<div class="muted">{{.EventType}} → {{.StatusCode}} {{.Error}}</div>{{end}} |
| 247 | <form method="post" action="{{if $.Repo}}/{{$.Repo.FullPath}}/-/webhooks/delete{{else}}/groups/{{$.Group.Path}}/webhooks/delete{{end}}"> |
| 248 | <input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="id" value="{{.ID}}"> |
| 249 | <button class="ghost" type="submit">{{t "action.remove"}}</button> |
| 250 | </form> |
| 251 | </li>{{end}} |
| 252 | </ul> |
| 253 | {{end}} |
| 254 | |
| 255 | {{define "group"}} |
| 256 | {{template "layout-start" .}} |
| 257 | <div class="projhead"> |
| 258 | {{if .Group.HasLogo}}<img class="tile" src="/groups/{{.Group.Path}}/logo" alt="">{{else}}<span class="tile">{{initial .Group.Name}}</span>{{end}} |
| 259 | <h1>{{.Group.Name}}</h1> |
| 260 | {{template "visicon" .Group.Visibility}} |
| 261 | </div> |
| 262 | {{if .Group.Description}}<p class="muted">{{.Group.Description}}</p>{{end}} |
| 263 | <p class="sub"> |
| 264 | <a href="/groups/{{.Group.Path}}"{{if ne .Tab "members"}}{{if ne .Tab "settings"}} class="on"{{end}}{{end}}>{{t "group.tab.repos"}}</a> |
| 265 | <a href="/groups/{{.Group.Path}}?tab=members"{{if eq .Tab "members"}} class="on"{{end}}>{{t "group.tab.members"}}</a> |
| 266 | {{if .CanAdmin}}<a href="/groups/{{.Group.Path}}?tab=settings"{{if eq .Tab "settings"}} class="on"{{end}}>{{t "group.tab.settings"}}</a>{{end}} |
| 267 | </p> |
| 268 | {{if eq .Tab "members"}} |
| 269 | {{if .CanAdmin}} |
| 270 | <form class="panel" method="post" action="/groups/{{.Group.Path}}/members"> |
| 271 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 272 | <div class="row"> |
| 273 | <input name="username" placeholder="{{t "set.username"}}" required> |
| 274 | {{template "roleselect" (printf "%s" .Group.DefaultRole)}} |
| 275 | <button type="submit">{{t "action.save"}}</button> |
| 276 | </div> |
| 277 | </form> |
| 278 | {{end}} |
| 279 | <ul class="clean">{{range .Members}}<li>{{.Username}} · {{roleName .Role}} {{if .Pending}}<span class="pill">{{t "set.pending"}}</span>{{end}} |
| 280 | {{if and $.CanAdmin (not .Pending)}}<form method="post" action="/groups/{{$.Group.Path}}/members/remove"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="username" value="{{.Username}}"><button class="ghost" type="submit">{{t "action.remove"}}</button></form>{{end}} |
| 281 | </li>{{end}}</ul> |
| 282 | {{else if eq .Tab "settings"}} |
| 283 | <form class="panel" method="post" action="/groups/{{.Group.Path}}/settings"> |
| 284 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 285 | <label>{{t "new.description"}} <input name="description" value="{{.Group.Description}}"></label> |
| 286 | <label>{{t "new.visibility"}} |
| 287 | <select name="visibility"> |
| 288 | <option value="private" {{if eq .Group.Visibility "private"}}selected{{end}}>{{t "vis.private"}}</option> |
| 289 | <option value="public" {{if eq .Group.Visibility "public"}}selected{{end}}>{{t "vis.public"}}</option> |
| 290 | </select> |
| 291 | </label> |
| 292 | <label>{{t "group.defaultRole"}} |
| 293 | <select name="default_role"> |
| 294 | <option value="readonly" {{if eq (printf "%s" .Group.DefaultRole) "readonly"}}selected{{end}}>{{t "role.readonly"}}</option> |
| 295 | <option value="developer" {{if eq (printf "%s" .Group.DefaultRole) "developer"}}selected{{end}}>{{t "role.developer"}}</option> |
| 296 | <option value="maintainer" {{if eq (printf "%s" .Group.DefaultRole) "maintainer"}}selected{{end}}>{{t "role.maintainer"}}</option> |
| 297 | </select> |
| 298 | </label> |
| 299 | <p class="muted">{{t "new.roleHint"}}</p> |
| 300 | <button type="submit">{{t "action.save"}}</button> |
| 301 | </form> |
| 302 | <form class="panel" method="post" action="/groups/{{.Group.Path}}/logo" enctype="multipart/form-data"> |
| 303 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 304 | <label>{{t "logo.file"}} <input type="file" name="logo" accept="image/png,image/jpeg,image/gif,image/svg+xml,.svg" required></label> |
| 305 | <p class="muted">{{t "logo.hint"}}</p> |
| 306 | <button type="submit">{{t "action.save"}}</button> |
| 307 | </form> |
| 308 | <h2>{{t "set.secrets"}}</h2> |
| 309 | <form class="panel" method="post" action="/groups/{{.Group.Path}}/secrets"> |
| 310 | <input type="hidden" name="csrf" value="{{.CSRF}}"> |
| 311 | <label>{{t "set.secretName"}} <input name="name" required></label> |
| 312 | <label>{{t "set.secretValue"}} <textarea name="value" required></textarea></label> |
| 313 | <label class="row"><input type="checkbox" name="protected" value="1"> {{t "set.protectedOnly"}}</label> |
| 314 | <button type="submit">{{t "action.save"}}</button> |
| 315 | </form> |
| 316 | <ul class="clean">{{range .Secrets}}<li><code>{{.Name}}</code> |
| 317 | <form method="post" action="/groups/{{$.Group.Path}}/secrets/delete"><input type="hidden" name="csrf" value="{{$.CSRF}}"><input type="hidden" name="name" value="{{.Name}}"><button class="ghost" type="submit">{{t "action.remove"}}</button></form> |
| 318 | </li>{{end}}</ul> |
| 319 | <p class="muted">{{t "set.valuesHidden"}}</p> |
| 320 | <h2>{{t "set.webhooks"}}</h2> |
| 321 | <p class="muted">{{t "group.secretsNote"}}</p> |
| 322 | {{template "webhookform" .}} |
| 323 | {{else}} |
| 324 | {{if .Heat}}{{template "heatmap" .Heat}}{{end}} |
| 325 | <form class="bar" method="get" action="/groups/{{.Group.Path}}"> |
| 326 | <input type="search" name="q" value="{{.Query}}" placeholder="{{t "group.search"}}"> |
| 327 | <input type="hidden" name="dir" value="{{.SortDir}}"> |
| 328 | <span class="sortlabel">{{t "group.sort"}}</span> |
| 329 | <a class="iconbtn" href="/groups/{{.Group.Path}}?q={{urlquery .Query}}&dir={{.FlipDir}}" aria-label="{{t "group.direction"}}">{{if eq .SortDir "desc"}}↓{{else}}↑{{end}}</a> |
| 330 | </form> |
| 331 | <ul class="repolist"> |
| 332 | {{range .Cards}} |
| 333 | <li> |
| 334 | {{if .Repo.HasLogo}}<img class="tile" src="/{{.Repo.FullPath}}/-/logo" alt="">{{else}}<span class="tile">{{initial .Repo.Name}}</span>{{end}} |
| 335 | <a class="reponame" href="/{{.Repo.FullPath}}">{{.Repo.Name}}</a> |
| 336 | {{template "visicon" .Repo.Visibility}} |
| 337 | <span class="stars" aria-label="{{t "group.star"}}">★ {{.Stars}}</span> |
| 338 | <span class="muted grown">{{t "group.created" .When}}</span> |
| 339 | <details class="rowmenu"> |
| 340 | <summary aria-label="{{t "group.menu"}}">⋯</summary> |
| 341 | <div class="menu-panel"> |
| 342 | {{if $.User}} |
| 343 | <form method="post" action="/{{.Repo.FullPath}}/-/star"> |
| 344 | <input type="hidden" name="csrf" value="{{$.CSRF}}"> |
| 345 | <input type="hidden" name="back" value="/groups/{{$.Group.Path}}?q={{$.Query}}&dir={{$.SortDir}}"> |
| 346 | <button type="submit">{{if .Starred}}{{t "group.unstar"}}{{else}}{{t "group.star"}}{{end}}</button> |
| 347 | </form> |
| 348 | {{end}} |
| 349 | <button type="button" data-copy="{{.Repo.FullPath}}">{{t "action.copy"}}</button> |
| 350 | </div> |
| 351 | </details> |
| 352 | </li> |
| 353 | {{else}}<li class="muted">{{t "group.empty"}}</li>{{end}} |
| 354 | </ul> |
| 355 | <script src="/assets/repo.js"></script> |
| 356 | {{end}} |
| 357 | {{template "layout-end" .}} |
| 358 | {{end}} |