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

+10 -8
View File
@@ -12,11 +12,7 @@ export const dynamic = "force-dynamic";
const DUCKETS_TYPE = 0;
const DIAMONDS_TYPE = 5;
export default async function AdminUserEdit({
params,
}: {
params: Promise<{ id: string }>;
}) {
export default async function AdminUserEdit({ params }: { params: Promise<{ id: string }> }) {
// Gate the page with the SAME helper the action re-checks.
await requireStaff();
@@ -88,7 +84,9 @@ export default async function AdminUserEdit({
<User size={20} className="text-[var(--color-primary)]" />
</div>
<div>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">{t("title", { username: user.username })}</h1>
<h1 className="m-0 text-xl font-extrabold text-[var(--color-text)]">
{t("title", { username: user.username })}
</h1>
<p className="m-0 text-xs text-[var(--color-text-muted)] mt-0.5">{t("idLabel", { id: user.id })}</p>
</div>
</div>
@@ -146,8 +144,12 @@ export default async function AdminUserEdit({
<p className="text-xs text-gray-500 dark:text-gray-400">{t("hint")}</p>
<div className="flex gap-2 mt-2">
<button type="submit" className="btn btn-primary">{t("save")}</button>
<Link href={`/admin/users/${user.id}`} className="btn">{t("cancel")}</Link>
<button type="submit" className="btn btn-primary">
{t("save")}
</button>
<Link href={`/admin/users/${user.id}`} className="btn">
{t("cancel")}
</Link>
</div>
</form>
</main>