Reapply "Add missing admin action files and navigation links"

This reverts commit 4d515bc400.
This commit is contained in:
Simo committed 2026-07-11 20:52:56 +02:00
1 parent 96ed768f14
commit 5b4228261a
338 files changed
+28143 -5948

No files matched your search

+5 -15
View File
@@ -20,8 +20,7 @@ type DrawBadge = {
badgeDesc: string;
};
const BOUGHT_NOTE = (code: string) =>
`Badge "${code}" has been added to your inventory. Enjoy!`;
const BOUGHT_NOTE = (code: string) => `Badge "${code}" has been added to your inventory. Enjoy!`;
const ERROR_NOTE: Record<string, string> = {
invalid: "That badge is no longer available.",
@@ -106,10 +105,7 @@ export default async function DrawBadgePage({
</p>
) : null}
{error ? (
<p
role="alert"
style={{ margin: "1rem 0 0", fontWeight: 700, color: "var(--color-danger)" }}
>
<p role="alert" style={{ margin: "1rem 0 0", fontWeight: 700, color: "var(--color-danger)" }}>
{getErrorNote(error)}
</p>
) : null}
@@ -118,15 +114,11 @@ export default async function DrawBadgePage({
<ContentCard
icon="🏅"
title="Available badges"
subtitle={
badges.length > 0 ? `${badges.length} badge(s) available` : undefined
}
subtitle={badges.length > 0 ? `${badges.length} badge(s) available` : undefined}
padded={badges.length === 0}
>
{badges.length === 0 ? (
<EmptyState icon="🎨">
No badges have been published yet. Check back soon!
</EmptyState>
<EmptyState icon="🎨">No badges have been published yet. Check back soon!</EmptyState>
) : (
<div className="card-grid sm-2 lg-3" style={{ padding: "1rem" }}>
{badges.map((b) => {
@@ -176,9 +168,7 @@ export default async function DrawBadgePage({
</div>
</div>
{b.badgeDesc ? (
<p style={{ margin: "0 0 0.85rem" }}>{b.badgeDesc}</p>
) : null}
{b.badgeDesc ? <p style={{ margin: "0 0 0.85rem" }}>{b.badgeDesc}</p> : null}
<form action={buyBadge}>
<input type="hidden" name="id" value={String(b.id)} />