Add 404 page, add Deleted page, fix errors

This commit is contained in:
2026-02-27 19:32:37 +01:00
parent 1b2f2bb942
commit 90a2f43ab6
9 changed files with 375 additions and 36 deletions

View File

@@ -39,6 +39,7 @@
<thead>
<tr>
<th>Filename</th>
<th>Size</th>
<th>Created</th>
<th>Expires</th>
<th>Hits</th>
@@ -53,6 +54,7 @@
<td class="font-mono">
<a href="/admin/download/{{.ID}}" target="_blank">{{.Filename}}</a>
</td>
<td>{{humanSize .Size}}</td>
<td>{{.CreatedAt.Format "Jan 02, 2006 15:04"}}</td>
<td>{{.ExpiresAt.Format "Jan 02, 2006 15:04"}}</td>
<td>{{.DownloadCount}}</td>
@@ -72,10 +74,13 @@
</td>
<td>
{{if not .Deleted}}
<form action="/admin/delete/{{.ID}}" method="POST" onsubmit="return confirm('Kill this file?')">
<form action="/admin/delete/{{.ID}}" method="GET" onsubmit="return confirm('Kill this file?')">
<button type="submit">TERMINATE</button>
</form>
{{end}}
<form action="/admin/delete/fr/{{.ID}}" method="GET" onsubmit="return confirm('Kill this file and the record?')">
<button type="submit">TERMINATE RECORD</button>
</form>
</td>
</tr>
{{end}}