- Move /admin/import/* tools under /admin/studio/* and add studio nav, layout and tabs - Add shared catalog maintenance panel plus a /admin/studio/maintenance tab - Make furnidata reconciliation overwrite conflicting entries with the DB-authoritative items_base classname/id (surfaced via fixedConflicts) - Add furnidata_translate_enabled setting to skip the heavy localized furnidata build during import (manual build-languages still forces it) - Update staff smoke contract test for the studio hub
28 lines
857 B
TypeScript
28 lines
857 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { StudioClient } from "@/components/admin/studio/studio-client";
|
|
import { buildFurniImportSource } from "@/lib/habbo-gamedata-hotel";
|
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|
import { getTreeFlat } from "@/lib/services/catalog-tree";
|
|
import { getHabboGamedataHotel } from "@/lib/services/habbo-gamedata-hotel";
|
|
|
|
export default async function StudioFurniPage(_props: {
|
|
params: Promise<{ locale: string }>;
|
|
}) {
|
|
const { session, permissions } = await getAdminContext();
|
|
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
|
redirect("/admin");
|
|
}
|
|
|
|
const [hotel, catalogTree] = await Promise.all([
|
|
getHabboGamedataHotel(),
|
|
getTreeFlat(),
|
|
]);
|
|
|
|
return (
|
|
<StudioClient
|
|
source={buildFurniImportSource(hotel)}
|
|
initialTree={catalogTree}
|
|
/>
|
|
);
|
|
}
|