Add missing admin action files and navigation links
- Add 11 missing server action files: badges, bulk-users, catalog, catalog-bc, catalog-items, import-badges, import-furni, multi-account-detect, permissions, rooms, soundtracks - Add missing admin navigation links: tickets, sounds, translations, import, radio sub-pages - Add translation keys for all new navigation items
This commit is contained in:
1 parent
7e1ae17a3b
commit
41be6835bf
347 files changed
+28378
-6091
No files matched your search
@@ -7,15 +7,15 @@ import { siteSettings } from "@/lib/services/site-settings";
|
||||
|
||||
function Currency({ icon, amount, label }: { icon: string; amount: number; label: string }) {
|
||||
return (
|
||||
<div className="flex gap-x-3 sm:gap-x-2 items-center">
|
||||
<div className={`h-[25px] w-[25px] rounded-full outline-offset-[3px] ${icon}`} />
|
||||
<div style={{ color: "var(--color-navbar-text, var(--color-text-muted))" }}>
|
||||
<span className="font-semibold" style={{ color: "var(--color-navbar-text, var(--color-text))" }}>
|
||||
{amount.toLocaleString()}
|
||||
</span>{" "}
|
||||
<span>{label}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-x-3 sm:gap-x-2 items-center">
|
||||
<div className={`h-[25px] w-[25px] rounded-full outline-offset-[3px] ${icon}`} />
|
||||
<div style={{ color: "var(--color-navbar-text, var(--color-text-muted))" }}>
|
||||
<span className="font-semibold" style={{ color: "var(--color-navbar-text, var(--color-text))" }}>
|
||||
{amount.toLocaleString()}
|
||||
</span>{" "}
|
||||
<span>{label}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -44,8 +44,7 @@ export async function TopHeader() {
|
||||
}
|
||||
|
||||
const imager =
|
||||
(await siteSettings.get("habbo_imaging_url", "https://www.habbo.com/habbo-imaging/avatarimage")) ??
|
||||
"";
|
||||
(await siteSettings.get("habbo_imaging_url", "https://www.habbo.com/habbo-imaging/avatarimage")) ?? "";
|
||||
const avatar = avatarImageUrl(imager, look, { headOnly: true, direction: 2 });
|
||||
const isStaff = (session.user.rank ?? 0) >= 7;
|
||||
|
||||
@@ -66,77 +65,95 @@ export async function TopHeader() {
|
||||
style={{ color: "var(--color-navbar-text, var(--color-text))" }}
|
||||
>
|
||||
Administration
|
||||
</summary>
|
||||
<div
|
||||
role="menu"
|
||||
className="dropdown-menu absolute right-0 top-full mt-0.5 min-w-[180px] rounded-xl z-50 py-2"
|
||||
>
|
||||
<Link href="/admin" className="dropdown-item" role="menuitem">
|
||||
Admin panel
|
||||
</Link>
|
||||
<Link href="/admin/commandocentrum" className="dropdown-item" role="menuitem">
|
||||
Commandocentrum
|
||||
</Link>
|
||||
<Link href="/admin/logs" className="dropdown-item" role="menuitem">
|
||||
Logs
|
||||
</Link>
|
||||
<Link href="/logo" className="dropdown-item" role="menuitem">
|
||||
Logo generator
|
||||
</Link>
|
||||
</div>
|
||||
</details>
|
||||
) : null}
|
||||
|
||||
<details className="relative">
|
||||
<summary aria-label="User menu" className="list-none cursor-pointer flex items-center [&::-webkit-details-marker]:hidden">
|
||||
<Image className="bg-no-repeat bg-center" src={avatar} alt="" width={54} height={62} unoptimized />
|
||||
<span className="-ml-2 font-semibold" style={{ color: "var(--color-navbar-text, var(--color-text))" }}>{session.user.name}</span>
|
||||
</summary>
|
||||
<div
|
||||
role="menu"
|
||||
className="dropdown-menu absolute right-0 top-full mt-0.5 min-w-[200px] rounded-xl z-50 py-2"
|
||||
className="dropdown-menu absolute right-0 top-full mt-0.5 min-w-[180px] rounded-xl z-50 py-2"
|
||||
>
|
||||
<Link href="/me" className="dropdown-item" role="menuitem">
|
||||
My dashboard
|
||||
<Link href="/admin" className="dropdown-item" role="menuitem">
|
||||
Admin panel
|
||||
</Link>
|
||||
<Link href={`/u/${session.user.name}`} className="dropdown-item" role="menuitem">
|
||||
My profile
|
||||
<Link href="/admin/commandocentrum" className="dropdown-item" role="menuitem">
|
||||
Commandocentrum
|
||||
</Link>
|
||||
<Link href="/settings" className="dropdown-item" role="menuitem">
|
||||
User settings
|
||||
<Link href="/admin/logs" className="dropdown-item" role="menuitem">
|
||||
Logs
|
||||
</Link>
|
||||
<Link href="/settings/2fa" className="dropdown-item" role="menuitem">
|
||||
Two-factor
|
||||
<Link href="/logo" className="dropdown-item" role="menuitem">
|
||||
Logo generator
|
||||
</Link>
|
||||
<Link href="/settings/sessions" className="dropdown-item" role="menuitem">
|
||||
Login activity
|
||||
</Link>
|
||||
<div className="h-px my-1 mx-3" style={{ backgroundColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)" }} />
|
||||
<form
|
||||
action={async () => {
|
||||
"use server";
|
||||
await signOut({ redirectTo: "/" });
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
role="menuitem"
|
||||
className="dropdown-item w-full text-center mx-1 rounded-lg"
|
||||
style={{
|
||||
backgroundColor: "color-mix(in srgb, var(--button-danger-color) 12%, transparent)",
|
||||
color: "var(--button-danger-color)",
|
||||
border: "none",
|
||||
cursor: "pointer",
|
||||
width: "calc(100% - 8px)",
|
||||
}}
|
||||
>
|
||||
Logout
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<details className="relative">
|
||||
<summary
|
||||
aria-label="User menu"
|
||||
className="list-none cursor-pointer flex items-center [&::-webkit-details-marker]:hidden"
|
||||
>
|
||||
<Image
|
||||
className="bg-no-repeat bg-center"
|
||||
src={avatar}
|
||||
alt=""
|
||||
width={54}
|
||||
height={62}
|
||||
unoptimized
|
||||
/>
|
||||
<span
|
||||
className="-ml-2 font-semibold"
|
||||
style={{ color: "var(--color-navbar-text, var(--color-text))" }}
|
||||
>
|
||||
{session.user.name}
|
||||
</span>
|
||||
</summary>
|
||||
<div
|
||||
role="menu"
|
||||
className="dropdown-menu absolute right-0 top-full mt-0.5 min-w-[200px] rounded-xl z-50 py-2"
|
||||
>
|
||||
<Link href="/me" className="dropdown-item" role="menuitem">
|
||||
My dashboard
|
||||
</Link>
|
||||
<Link href={`/u/${session.user.name}`} className="dropdown-item" role="menuitem">
|
||||
My profile
|
||||
</Link>
|
||||
<Link href="/settings" className="dropdown-item" role="menuitem">
|
||||
User settings
|
||||
</Link>
|
||||
<Link href="/settings/2fa" className="dropdown-item" role="menuitem">
|
||||
Two-factor
|
||||
</Link>
|
||||
<Link href="/settings/sessions" className="dropdown-item" role="menuitem">
|
||||
Login activity
|
||||
</Link>
|
||||
<div
|
||||
className="h-px my-1 mx-3"
|
||||
style={{ backgroundColor: "color-mix(in srgb, var(--color-text-muted) 12%, transparent)" }}
|
||||
/>
|
||||
<form
|
||||
action={async () => {
|
||||
"use server";
|
||||
await signOut({ redirectTo: "/" });
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type="submit"
|
||||
role="menuitem"
|
||||
className="dropdown-item w-full text-center mx-1 rounded-lg"
|
||||
style={{
|
||||
backgroundColor: "color-mix(in srgb, var(--button-danger-color) 12%, transparent)",
|
||||
color: "var(--button-danger-color)",
|
||||
border: "none",
|
||||
cursor: "pointer",
|
||||
width: "calc(100% - 8px)",
|
||||
}}
|
||||
>
|
||||
Logout
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user