vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Give channels and releases their own sections
1999687c755fc6048256709b4d06b5152a5dd593 · Keenan Nemetz · 15d ago · parent 5baf4e73
Give channels and releases their own sections The releases page put channels in a padded card with a heading and then ran the tag list straight after it with no heading at all, so the two lists read as one block. Channels and Releases are now sibling sections, each with its own heading, and both lists use the same panel shape the rest of the web UI uses. The empty states now agree with the CSS rule that a whole region gets .empty-state while a quiet line inside a card stays muted. Channels no longer falls back to a bare muted paragraph; its empty state explains what creating one buys. The Files region on a release page does the same, and drops the "Manage files" link that repeated the button already in the page head. The regression test reads an empty repository's releases page, pins the section order and headings, and counts one empty state per section. It also checks that a release with no files uses an empty state rather than the old muted line. Closes 01M7QSTRTDSAAH7MW0YC1G1TD3.
server/web/templates/releases.html +42−31
| @@ -14,11 +14,12 @@ | |||
| 14 | 14 | </div> | |
| 15 | 15 | ||
| 16 | 16 | {{if or .Channels .ManageChannels}} | |
| 17 | <div class="card" id="channels"> | ||
| 17 | <section id="channels"> | ||
| 18 | 18 | <h2>Channels</h2> | |
| 19 | 19 | <p class="muted">A channel is a stable name for the release it currently points at. | |
| 20 | 20 | Its URL serves that release's attached files.</p> | |
| 21 | 21 | {{if .Channels}} | |
| 22 | <div class="panel"> | ||
| 22 | 23 | <table> | |
| 23 | 24 | <tr><th>Channel</th><th>Release</th><th>Updated</th><th>Description</th>{{if .ManageChannels}}<th></th>{{end}}</tr> | |
| 24 | 25 | {{range .Channels}} | |
| @@ -37,40 +38,48 @@ | |||
| 37 | 38 | </tr> | |
| 38 | 39 | {{end}} | |
| 39 | 40 | </table> | |
| 41 | </div> | ||
| 40 | 42 | {{else}} | |
| 41 | <p class="muted">No channels yet.</p> | ||
| 43 | <div class="empty-state"> | ||
| 44 | <p>No channels yet.</p> | ||
| 45 | <p class="muted">Create one to publish a release's files at a URL that stays put.</p> | ||
| 46 | </div> | ||
| 42 | 47 | {{end}} | |
| 43 | </div> | ||
| 48 | </section> | ||
| 44 | 49 | {{end}} | |
| 45 | 50 | ||
| 46 | {{if .Tags}} | ||
| 47 | <div class="panel"> | ||
| 48 | <table> | ||
| 49 | <tr><th>Tag</th><th>Notes</th>{{if .Channels}}<th>Channels</th>{{end}}<th>Tagger</th><th>Age</th><th>Source</th>{{if .AnyEditable}}<th></th>{{end}}</tr> | ||
| 50 | {{range .Tags}} | ||
| 51 | <tr> | ||
| 52 | <td><a href="/{{$.Name}}/releases/{{esc .Name}}">{{.Name}}</a>{{if not .Annotated}} <span class="label">lightweight</span>{{end}}</td> | ||
| 53 | <td class="muted">{{.Subject}}</td> | ||
| 54 | {{if $.Channels}}<td class="label-row">{{range $c := index $.ChannelsByTag .Name}}<a class="label" href="/{{$.Name}}/channels/{{$c}}">{{$c}}</a>{{end}}</td>{{end}} | ||
| 55 | <td class="muted">{{if .Tagger}}{{.Tagger}}{{else}}—{{end}}</td> | ||
| 56 | <td class="muted">{{since .When}}</td> | ||
| 57 | <td><a href="/{{$.Name}}/releases/{{esc .Name}}/archive.tar">tar</a> · <a href="/{{$.Name}}/releases/{{esc .Name}}/archive.tar.gz">tar.gz</a></td> | ||
| 58 | {{if $.AnyEditable}}<td>{{if index $.Editable .Name}}<a href="/{{$.Name}}/releases/edit?tag={{urlquery .Name}}">edit</a>{{end}}</td>{{end}} | ||
| 59 | </tr> | ||
| 60 | {{end}} | ||
| 61 | </table> | ||
| 62 | </div> | ||
| 63 | {{else}} | ||
| 64 | <div class="empty-state"> | ||
| 65 | <p>No releases yet. A release is an annotated tag, so this is the whole flow:</p> | ||
| 66 | <pre>git tag -a v1.0.0 -F notes.md | ||
| 51 | <section id="releases"> | ||
| 52 | <h2>Releases</h2> | ||
| 53 | {{if .Tags}} | ||
| 54 | <div class="panel"> | ||
| 55 | <table> | ||
| 56 | <tr><th>Tag</th><th>Notes</th>{{if .Channels}}<th>Channels</th>{{end}}<th>Tagger</th><th>Age</th><th>Source</th>{{if .AnyEditable}}<th></th>{{end}}</tr> | ||
| 57 | {{range .Tags}} | ||
| 58 | <tr> | ||
| 59 | <td><a href="/{{$.Name}}/releases/{{esc .Name}}">{{.Name}}</a>{{if not .Annotated}} <span class="label">lightweight</span>{{end}}</td> | ||
| 60 | <td class="muted">{{.Subject}}</td> | ||
| 61 | {{if $.Channels}}<td class="label-row">{{range $c := index $.ChannelsByTag .Name}}<a class="label" href="/{{$.Name}}/channels/{{$c}}">{{$c}}</a>{{end}}</td>{{end}} | ||
| 62 | <td class="muted">{{if .Tagger}}{{.Tagger}}{{else}}—{{end}}</td> | ||
| 63 | <td class="muted">{{since .When}}</td> | ||
| 64 | <td><a href="/{{$.Name}}/releases/{{esc .Name}}/archive.tar">tar</a> · <a href="/{{$.Name}}/releases/{{esc .Name}}/archive.tar.gz">tar.gz</a></td> | ||
| 65 | {{if $.AnyEditable}}<td>{{if index $.Editable .Name}}<a href="/{{$.Name}}/releases/edit?tag={{urlquery .Name}}">edit</a>{{end}}</td>{{end}} | ||
| 66 | </tr> | ||
| 67 | {{end}} | ||
| 68 | </table> | ||
| 69 | </div> | ||
| 70 | {{else}} | ||
| 71 | <div class="empty-state"> | ||
| 72 | <p>No releases yet.</p> | ||
| 73 | <p class="muted">A release is an annotated tag, so this is the whole flow:</p> | ||
| 74 | <pre>git tag -a v1.0.0 -F notes.md | ||
| 67 | 75 | git push --follow-tags</pre> | |
| 68 | </div> | ||
| 69 | {{end}} | ||
| 70 | {{if .Lightweight}} | ||
| 71 | <p class="muted">{{.Lightweight}} lightweight tag(s) are listed but carry no notes: <code>git tag -a</code> | ||
| 72 | records a tagger and a message, which is what makes a tag a release.</p> | ||
| 73 | {{end}} | ||
| 76 | </div> | ||
| 77 | {{end}} | ||
| 78 | {{if .Lightweight}} | ||
| 79 | <p class="muted">{{.Lightweight}} lightweight tag(s) are listed but carry no notes: <code>git tag -a</code> | ||
| 80 | records a tagger and a message, which is what makes a tag a release.</p> | ||
| 81 | {{end}} | ||
| 82 | </section> | ||
| 74 | 83 | {{template "footer" .}} | |
| 75 | 84 | {{end}} | |
| 76 | 85 | ||
| @@ -119,7 +128,9 @@ records a tagger and a message, which is what makes a tag a release.</p> | |||
| 119 | 128 | </table> | |
| 120 | 129 | </div> | |
| 121 | 130 | {{else}} | |
| 122 | <p class="muted">No files attached yet.{{if .CanAttach}} <a href="/{{.Name}}/releases/{{esc .Tag.Name}}/attach">Manage files</a>.{{end}}</p> | ||
| 131 | <div class="empty-state"> | ||
| 132 | <p>No files attached yet.</p> | ||
| 133 | </div> | ||
| 123 | 134 | {{end}} | |
| 124 | 135 | {{if .ChannelLocked}} | |
| 125 | 136 | <p class="muted">A channel targets this release, so its notes and files are fixed. | |