Files
warpbox-dev/backend/templates/pages/admin_login.html
Daniel Legt 26619bacbc feat: add admin console, cleanup, and thumbnail workers
- Implement a token-authenticated admin console at `/admin` with overview metrics and file management.
- Add a background worker to periodically clean up expired boxes based on `WARPBOX_CLEANUP_EVERY`.
- Add a background worker to generate image and video thumbnails based on `WARPBOX_THUMBNAIL_EVERY`.
- Update file storage paths to use `@each@` and `@thumb@` prefixes to separate original files from thumbnails.
- Add severity fields to startup logs and update configuration templates.
2026-05-25 16:52:57 +03:00

24 lines
1.0 KiB
HTML

{{define "admin_login.html"}}{{template "base" .}}{{end}}
{{define "content"}}
<section class="download-view" aria-labelledby="admin-login-title">
<form class="card download-card" action="/admin/login" method="post">
<div class="card-content">
<div class="file-emblem" aria-hidden="true">
<svg viewBox="0 0 24 24" role="img" focusable="false"><path d="M12 17a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z" /><path d="M19 11V8A7 7 0 0 0 5 8v3" /><path d="M5 11h14v10H5z" /></svg>
</div>
<h1 id="admin-login-title">Admin login</h1>
<p class="download-subtitle">Use the token from <code>WARPBOX_ADMIN_TOKEN</code>.</p>
{{if .Data.Error}}<p class="form-error">{{.Data.Error}}</p>{{end}}
<div class="unlock-form">
<label>
<span>Admin token</span>
<input type="password" name="token" autocomplete="current-password" required>
</label>
<button class="button button-primary" type="submit">Sign in</button>
</div>
</div>
</form>
</section>
{{end}}