feat(studio): add nitro cleanup tool for fake and broken bundles
This commit is contained in:
1 parent
ce93b92a81
commit
694f87d98c
6 files changed
+869
No files matched your search
@@ -0,0 +1,22 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { NitroCleanupPanel } from "@/components/admin/studio/nitro-cleanup-panel";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
|
||||
export default async function StudioNitroCleanupPage() {
|
||||
const { session, permissions } = await getAdminContext();
|
||||
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
||||
redirect("/admin");
|
||||
}
|
||||
return (
|
||||
<div className="space-y-6 p-4">
|
||||
<div>
|
||||
<h1 className="text-2xl font-bold tracking-tight">Nitro cleanup</h1>
|
||||
<p className="mt-1 text-muted-foreground">
|
||||
Scan the nitro directories for fake bundles (no matching furniture)
|
||||
and broken bundles (unparseable) and remove them.
|
||||
</p>
|
||||
</div>
|
||||
<NitroCleanupPanel />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
ClipboardCheck,
|
||||
Copy,
|
||||
Dumbbell,
|
||||
FileX2,
|
||||
Image as ImageIcon,
|
||||
type LucideIcon,
|
||||
Puzzle,
|
||||
@@ -52,6 +53,11 @@ const maintenance: StudioLink[] = [
|
||||
label: "Catalog maintenance",
|
||||
icon: Wrench,
|
||||
},
|
||||
{
|
||||
href: "/admin/studio/nitro-cleanup",
|
||||
label: "Nitro cleanup",
|
||||
icon: FileX2,
|
||||
},
|
||||
];
|
||||
const activePath = (path: string, href: string) =>
|
||||
path === href || path.startsWith(`${href}/`);
|
||||
|
||||
Reference in new issue
Block a user