admin: add admin panel for user management

This commit is contained in:
2026-04-22 21:16:26 +02:00
parent 7e15380638
commit 77f0daca26
11 changed files with 530 additions and 9 deletions

View File

@@ -1,6 +1,9 @@
package layout
import "mal/web/components/icons"
import (
"mal/web/components/icons"
"mal/web/shared/admin"
)
templ Layout(title string, showHeader bool) {
<!DOCTYPE html>
@@ -60,6 +63,14 @@ templ Layout(title string, showHeader bool) {
>
Watchlist
</a>
if admin.IsAdminFromContext(ctx) {
<a
class="text-(--accent) no-underline hover:text-(--accent) hover:no-underline"
href="/admin"
>
Admin
</a>
}
</div>
</div>
<div