Compare commits

...

2 Commits

Author SHA1 Message Date
a7541b322b add link button to admin page 2026-04-15 21:13:16 +02:00
root
84af348da7 Add download page link button to admin panel
- Added '🔗 Link' button next to each non-deleted file in admin page
- Links to /f/ViewID (the public download page)
- Opens in new tab
2026-04-15 20:25:48 +02:00

View File

@@ -53,6 +53,13 @@
text-decoration: none;
text-transform: uppercase;
box-shadow: 3px 3px 0px #000;
display: inline-flex;
align-items: center;
justify-content: center;
}
button {
line-height: 1;
}
button:hover, .button:hover { background: #000; color: #fff; box-shadow: none; transform: translate(2px, 2px); }
button:active { background: #ff0000; color: #fff; }
@@ -180,16 +187,17 @@
<td>
<div class="btn-group">
{{if not .Deleted}}
<a href="/f/{{.ViewID}}" target="_blank" class="button" title="Open download page">Link</a>
<form action="/api/files/admin/delete/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'TERMINATE', 'Kill this file? It will be removed from active storage.')">
<button type="submit" style="background: #ffcccc;">Terminate</button>
<button type="submit" class="button" style="background: #ffcccc;">Terminate</button>
</form>
{{else}}
<form action="/api/files/admin/reinstate/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'REINSTATE', 'Restore this file to active status?')">
<button type="submit" style="background: #ccffcc;">Reinstate</button>
<button type="submit" class="button" style="background: #ccffcc;">Reinstate</button>
</form>
{{end}}
<form action="/api/files/admin/delete/fr/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'FULL_WIPE', 'Wiping file and purging record? This is a permanent database scrub.')">
<button type="submit">Full_Wipe</button>
<button class="button" type="submit">Full_Wipe</button>
</form>
</div>
</td>