add link button to admin page

This commit is contained in:
2026-04-15 21:13:16 +02:00
parent 84af348da7
commit a7541b322b

View File

@@ -53,6 +53,13 @@
text-decoration: none; text-decoration: none;
text-transform: uppercase; text-transform: uppercase;
box-shadow: 3px 3px 0px #000; 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:hover, .button:hover { background: #000; color: #fff; box-shadow: none; transform: translate(2px, 2px); }
button:active { background: #ff0000; color: #fff; } button:active { background: #ff0000; color: #fff; }
@@ -180,17 +187,17 @@
<td> <td>
<div class="btn-group"> <div class="btn-group">
{{if not .Deleted}} {{if not .Deleted}}
<a href="/f/{{.ViewID}}" target="_blank" class="button" title="Open download page">🔗 Link</a> <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.')"> <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> </form>
{{else}} {{else}}
<form action="/api/files/admin/reinstate/{{.ID}}" method="GET" onsubmit="return openConfirm(event, 'REINSTATE', 'Restore this file to active status?')"> <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> </form>
{{end}} {{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.')"> <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> </form>
</div> </div>
</td> </td>