Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

Simplify release file management

fdd0b3e8373da4c684c73d88f997c3917966ac50 · Keenan Nemetz · 17d ago · parent c5187449

Simplify release file management

Drop rename and move from the CLI and browser, outline the files table instead of wrapping it in a card, and label the release-page action Manage files.

server/web/templates/release_file_form.html −53

@@ -1,53 +0,0 @@
1 {{define "release_file_form"}}
2 {{template "header" .}}
3 {{template "repohead" (nav .Page "releases")}}
4
5 <div class="page-head">
6 <div class="page-head-main">
7 <h1>Edit file</h1>
8 <p class="page-sub">{{.Path}} on <a href="/{{.Name}}/releases/{{esc .Tag}}">{{.Tag}}</a> · renaming and moving change only the path; the bytes stay in the shared store.</p>
9 </div>
10 <div class="page-head-actions">
11 <a class="button secondary" href="/{{.Name}}/releases/{{esc .Tag}}">Back to release</a>
12 </div>
13 </div>
14
15 {{if .Error}}<div class="flash bad">{{.Error}}</div>{{end}}
16
17 {{if not .Locked}}
18 <form method="post" action="/{{.Name}}/releases/{{esc .Tag}}/files/edit" class="form-block">
19 <input type="hidden" name="csrf" value="{{.CSRF}}">
20 <input type="hidden" name="path" value="{{.Path}}">
21 <div class="card form-card">
22 <label>New path
23 <input type="text" name="newpath" value="{{.NewPath}}" required autocomplete="off" spellcheck="false">
24 </label>
25 <p class="muted">A path is slash-separated, so <code>bin/{{.Path}}</code> moves the file
26 into a directory. Empty segments, <code>.</code>, <code>..</code>, backslashes, and
27 control characters are refused, and a path cannot be both a file and a directory.</p>
28 </div>
29 <div class="form-actions">
30 <a class="button secondary" href="/{{.Name}}/releases/{{esc .Tag}}">Cancel</a>
31 <button type="submit">{{icon "sliders-horizontal"}}Save path</button>
32 </div>
33 </form>
34
35 <div class="card danger-zone">
36 <h2>Delete file</h2>
37 <p class="muted">Removing the pointer makes the bytes collectable after the garbage
38 collector's grace period. The release notes and source are untouched.</p>
39 <form method="post" action="/{{.Name}}/releases/{{esc .Tag}}/files/delete" data-confirm="Delete {{.Path}} from {{.Tag}}?">
40 <input type="hidden" name="csrf" value="{{.CSRF}}">
41 <input type="hidden" name="path" value="{{.Path}}">
42 <button type="submit" class="danger">{{icon "circle-x"}}Delete file</button>
43 </form>
44 </div>
45 {{else}}
46 <div class="empty-state">
47 <p>This file cannot change until the condition above changes.</p>
48 <p><a class="button secondary" href="/{{.Name}}/releases/{{esc .Tag}}">Back to release</a></p>
49 </div>
50 {{end}}
51
52 {{template "footer" .}}
53 {{end}}