fix admin page

This commit is contained in:
2026-02-27 15:44:14 +01:00
parent fa6b69045d
commit cf264c04fc

View File

@@ -15,6 +15,7 @@
tr:hover { background: #f9f9f9; } tr:hover { background: #f9f9f9; }
.status-tag { font-weight: bold; font-size: 10px; padding: 2px 4px; border: 1px solid #000; } .status-tag { font-weight: bold; font-size: 10px; padding: 2px 4px; border: 1px solid #000; }
.status-deleted { background: #ffcccc; text-decoration: line-through; } .status-deleted { background: #ffcccc; text-decoration: line-through; }
.status-no{ background: #ffcccc; }
.status-active { background: #ccffcc; } .status-active { background: #ccffcc; }
button { border: 1px solid #000; background: #eee; padding: 2px 8px; cursor: pointer; font-size: 11px; font-weight: bold; } button { border: 1px solid #000; background: #eee; padding: 2px 8px; cursor: pointer; font-size: 11px; font-weight: bold; }
button:hover { background: #000; color: #fff; } button:hover { background: #000; color: #fff; }
@@ -38,6 +39,7 @@
<th>Created</th> <th>Created</th>
<th>Expires</th> <th>Expires</th>
<th>Hits</th> <th>Hits</th>
<th>Burn after</th>
<th>Status</th> <th>Status</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
@@ -45,10 +47,21 @@
<tbody> <tbody>
{{range .Files}} {{range .Files}}
<tr> <tr>
<td class="font-mono"><a href="/admin/download/{{.ID}}" target="_blank">{{.Filename}}</a></td> <td class="font-mono">
<td>{{.CreatedAt.Format "Jan 02, 15:04"}}</td> <a href="/admin/download/{{.ID}}" target="_blank">{{.Filename}}</a>
<td>{{.ExpiresAt.Format "Jan 02, 15:04"}}</td> </td>
<td>{{.DownloadCount}} {{if .DeleteAfterDownload}}(1-SHOT){{end}}</td> <td>{{.CreatedAt.Format "Jan 02, 2006 15:04"}}</td>
<td>{{.ExpiresAt.Format "Jan 02, 2006 15:04"}}</td>
<td>
{{.DownloadCount}}
</td>
<td class="">
{{if .DeleteAfterDownload}}
<span class="status-tag status-active">YES</span>
{{else}}
<span class="status-tag status-no">NO</span>
{{end}}
</td>
<td> <td>
{{if .Deleted}} {{if .Deleted}}
<span class="status-tag status-deleted">REMOVED</span> <span class="status-tag status-deleted">REMOVED</span>
@@ -61,7 +74,6 @@
<form action="/admin/delete/{{.ID}}" method="POST" onsubmit="return confirm('Kill this file?')"> <form action="/admin/delete/{{.ID}}" method="POST" onsubmit="return confirm('Kill this file?')">
<button type="submit">TERMINATE</button> <button type="submit">TERMINATE</button>
</form> </form>
{{else}}
{{end}} {{end}}
</td> </td>
</tr> </tr>