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.
Move channel forms off the releases page
ea6ce9fe5d829a7f4153793f0a096d00331f7e29 · Keenan Nemetz · 17d ago · parent de72893e
Move channel forms off the releases page Create and edit channels on focused release subpages, leaving the releases page with the read-only channel list and its row actions. The new-release target is now a grouped branch and tag picker instead of a free-text field, matching the channel form's selection of annotated releases.
server/web/releases.go +1−23
| @@ -46,17 +46,6 @@ const archiveConc = 4 | |||
| 46 | 46 | // thousand commits wide is a report, not a page. | |
| 47 | 47 | const maxReleaseCommits = 100 | |
| 48 | 48 | ||
| 49 | // channelForm is the browser form for creating or moving one channel. Editing | ||
| 50 | // locks the name: the CLI has no rename either, and a channel's identity is its | ||
| 51 | // URL. | ||
| 52 | type channelForm struct { | ||
| 53 | Name string | ||
| 54 | Tag string | ||
| 55 | Description string | ||
| 56 | Editing bool | ||
| 57 | Error string | ||
| 58 | } | ||
| 59 | |||
| 60 | 49 | type releasesView struct { | |
| 61 | 50 | Page | |
| 62 | 51 | Name string | |
| @@ -66,7 +55,6 @@ type releasesView struct { | |||
| 66 | 55 | ChannelsByTag map[string][]string | |
| 67 | 56 | CanManage bool | |
| 68 | 57 | ManageChannels bool | |
| 69 | ChannelForm channelForm | ||
| 70 | 58 | } | |
| 71 | 59 | ||
| 72 | 60 | func (w *Web) releasesView(r *http.Request, m *repo.Meta, tags []git.Tag) releasesView { | |
| @@ -122,17 +110,7 @@ func (w *Web) Releases(rw http.ResponseWriter, r *http.Request) { | |||
| 122 | 110 | w.serverError(rw, r, "cannot list tags: "+err.Error()) | |
| 123 | 111 | return | |
| 124 | 112 | } | |
| 125 | view := w.releasesView(r, m, tags) | ||
| 126 | if view.CanManage { | ||
| 127 | if name := strings.TrimSpace(r.URL.Query().Get("channel")); name != "" { | ||
| 128 | if ch, ok := w.channel(m, name); ok { | ||
| 129 | view.ChannelForm = channelForm{ | ||
| 130 | Name: ch.Name, Tag: ch.Release, Description: ch.Description, Editing: true, | ||
| 131 | } | ||
| 132 | } | ||
| 133 | } | ||
| 134 | } | ||
| 135 | w.render(rw, "releases", view, 0) | ||
| 113 | w.render(rw, "releases", w.releasesView(r, m, tags), 0) | ||
| 136 | 114 | } | |
| 137 | 115 | ||
| 138 | 116 | func (w *Web) ReleaseView(rw http.ResponseWriter, r *http.Request) { | |