Files
send-it/templates/admin.html
2026-02-26 12:58:19 +01:00

79 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GhostShare | Admin</title>
<script src="https://cdn.tailwindcss.com"></script>
<style>
* { border-radius: 0 !important; }
body { font-family: sans-serif; background: #fff; color: #000; padding: 20px; }
.box { border: 2px solid #000; background: #fff; }
table { width: 100%; border-collapse: collapse; }
th { background: #000; color: #fff; text-align: left; padding: 8px; font-size: 12px; text-transform: uppercase; }
td { border-bottom: 1px solid #000; padding: 8px; font-size: 13px; }
tr:hover { background: #f9f9f9; }
.status-tag { font-weight: bold; font-size: 10px; padding: 2px 4px; border: 1px solid #000; }
.status-deleted { background: #ffcccc; text-decoration: line-through; }
.status-active { background: #ccffcc; }
button { border: 1px solid #000; background: #eee; padding: 2px 8px; cursor: pointer; font-size: 11px; font-weight: bold; }
button:hover { background: #000; color: #fff; }
.nav-link { font-weight: bold; text-decoration: underline; margin-bottom: 20px; display: inline-block; }
</style>
</head>
<body>
<div class="max-w-6xl mx-auto">
<header class="mb-8 border-b-4 border-black pb-2 flex justify-between items-end">
<h1 class="text-3xl font-black uppercase tracking-tighter">System Console</h1>
<a href="/" class="nav-link text-xs">← BACK TO UPLOADER</a>
</header>
<div class="box overflow-x-auto">
<table>
<thead>
<tr>
<th>Filename</th>
<th>Created</th>
<th>Expires</th>
<th>Hits</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
{{range .Files}}
<tr>
<td class="font-mono">{{.Filename}}</td>
<td>{{.CreatedAt.Format "Jan 02, 15:04"}}</td>
<td>{{.ExpiresAt.Format "Jan 02, 15:04"}}</td>
<td>{{.DownloadCount}} {{if .DeleteAfterDownload}}(1-SHOT){{end}}</td>
<td>
{{if .Deleted}}
<span class="status-tag status-deleted">REMOVED</span>
{{else}}
<span class="status-tag status-active">LIVE</span>
{{end}}
</td>
<td>
{{if not .Deleted}}
<form action="/admin/delete/{{.ID}}" method="POST" onsubmit="return confirm('Kill this file?')">
<button type="submit">TERMINATE</button>
</form>
{{else}}
-
{{end}}
</td>
</tr>
{{end}}
</tbody>
</table>
</div>
<footer class="mt-4 text-[10px] text-gray-500 uppercase font-bold">
Total Records: {{len .Files}} | Database: SQLite
</footer>
</div>
</body>
</html>