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:
openhands committed 2026-07-11 12:01:05 +02:00
1 parent 7e1ae17a3b
commit 41be6835bf
347 files changed
+28378 -6091

No files matched your search

+8 -5
View File
@@ -32,7 +32,9 @@ const DEFAULT_LOOK = "hr-100-.hd-180-1.ch-255-66.lg-280-110.sh-305-62";
export async function register(prevState: string | null, formData: FormData): Promise<string | null> {
const raw = {
username: String(formData.get("username") ?? "").trim(),
mail: String(formData.get("mail") ?? "").trim().toLowerCase(),
mail: String(formData.get("mail") ?? "")
.trim()
.toLowerCase(),
password: String(formData.get("password") ?? ""),
look: String(formData.get("look") ?? "").trim() || DEFAULT_LOOK,
};
@@ -61,8 +63,9 @@ export async function register(prevState: string | null, formData: FormData): Pr
// VPN/proxy block (only when enabled in /admin/vpn).
if ((await checkVpn(ip)).blocked) {
return (
await siteSettings.get("vpn_block_message", "")
) || "Registrations from VPN/proxy connections are not allowed.";
(await siteSettings.get("vpn_block_message", "")) ||
"Registrations from VPN/proxy connections are not allowed."
);
}
// Max accounts per IP (0 / unset = unlimited), mirrors AtomCMS.
@@ -85,7 +88,7 @@ export async function register(prevState: string | null, formData: FormData): Pr
const now = Math.floor(Date.now() / 1000);
try {
const created = await prisma.user.create({
await prisma.user.create({
data: {
username,
password: await hashPassword(password),
@@ -100,7 +103,7 @@ export async function register(prevState: string | null, formData: FormData): Pr
if (hasEmail) {
try {
await sendVerification(created.id, mail);
await sendVerification(mail);
} catch {
// No-op: account is created; user can request a new link later.
}