50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
import { redirect } from "next/navigation";
|
|
import { OfficialSyncClient } from "@/app/admin/import/official/official-sync-client";
|
|
import { SyncAllClient } from "@/app/admin/import/sync/sync-all-client";
|
|
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
|
|
|
import { CatalogExportClient } from "./catalog-export-client";
|
|
|
|
export default async function StudioSyncPage(_props: {
|
|
params: Promise<{ locale: string }>;
|
|
}) {
|
|
const { session, permissions } = await getAdminContext();
|
|
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
|
redirect("/admin");
|
|
}
|
|
return (
|
|
<div className="space-y-8">
|
|
<CatalogExportClient />
|
|
<h1 className="text-2xl font-bold tracking-tight">Sync All Sources</h1>
|
|
<p className="text-muted-foreground mt-2">
|
|
Scan configured sources and automatically import any furniture that is
|
|
not yet present in your hotel.
|
|
</p>
|
|
|
|
<div className="space-y-4">
|
|
<div>
|
|
<h2 className="text-lg font-semibold text-muted-foreground mb-2">
|
|
Clone Sources
|
|
</h2>
|
|
<p className="text-sm text-muted-foreground">
|
|
Scan all configured clone sources and automatically import any
|
|
furniture that is not yet present in your hotel.
|
|
</p>
|
|
<SyncAllClient />
|
|
</div>
|
|
|
|
<div>
|
|
<h2 className="text-lg font-semibold text-muted-foreground mb-2">
|
|
Official Furnidata
|
|
</h2>
|
|
<p className="text-sm text-muted-foreground">
|
|
Scan the official Habbo furnidata and automatically import any
|
|
furniture that your hotel doesn't have yet.
|
|
</p>
|
|
<OfficialSyncClient />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|