feat(studio): localize catalog studio UI and polish responsive layout
Route all Catalog Studio strings through the admin.studio namespace (workspace, filters, review, inspector, quality, sync, scale32, organize imports and page titles/subtitles) with English fallback, and add shared StudioPage chrome plus a loading skeleton. Tighten mobile padding on the header and sub-bars.
This commit is contained in:
1 parent
d7d6382b60
commit
56676effc3
28 files changed
+1293
-634
No files matched your search
@@ -1,6 +1,9 @@
|
||||
import { RefreshCw } from "lucide-react";
|
||||
import { redirect } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { OfficialSyncClient } from "@/app/admin/import/official/official-sync-client";
|
||||
import { SyncAllClient } from "@/app/admin/import/sync/sync-all-client";
|
||||
import { StudioPage } from "@/components/admin/studio/studio-page";
|
||||
import { canAccess, getAdminContext, PERMS } from "@/lib/permissions";
|
||||
|
||||
import { CatalogExportClient } from "./catalog-export-client";
|
||||
@@ -12,44 +15,42 @@ export default async function StudioSyncPage(_props: {
|
||||
if (!canAccess(permissions, PERMS.ASSETS_IMPORT, session.user.rank)) {
|
||||
redirect("/admin");
|
||||
}
|
||||
const t = await getTranslations("admin.studio");
|
||||
return (
|
||||
<div className="space-y-8">
|
||||
<CatalogExportClient
|
||||
canConfigure={canAccess(
|
||||
permissions,
|
||||
PERMS.SETTINGS_EDIT,
|
||||
session.user.rank,
|
||||
)}
|
||||
/>
|
||||
<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>
|
||||
<StudioPage
|
||||
icon={RefreshCw}
|
||||
title={t("nav.syncRepository")}
|
||||
subtitle={t("sync.pageSubtitle")}
|
||||
>
|
||||
<div className="space-y-6">
|
||||
<CatalogExportClient
|
||||
canConfigure={canAccess(
|
||||
permissions,
|
||||
PERMS.SETTINGS_EDIT,
|
||||
session.user.rank,
|
||||
)}
|
||||
/>
|
||||
|
||||
<div className="space-y-4">
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-muted-foreground mb-2">
|
||||
Clone Sources
|
||||
<section className="space-y-3 rounded-lg border border-[var(--admin-border)] p-4">
|
||||
<h2 className="text-lg font-semibold">
|
||||
{t("sync.cloneSourcesTitle")}
|
||||
</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 className="text-sm text-[var(--admin-text-muted)]">
|
||||
{t("sync.cloneSourcesBody")}
|
||||
</p>
|
||||
<SyncAllClient />
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div>
|
||||
<h2 className="text-lg font-semibold text-muted-foreground mb-2">
|
||||
Official Furnidata
|
||||
<section className="space-y-3 rounded-lg border border-[var(--admin-border)] p-4">
|
||||
<h2 className="text-lg font-semibold">
|
||||
{t("sync.officialFurnidataTitle")}
|
||||
</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 className="text-sm text-[var(--admin-text-muted)]">
|
||||
{t("sync.officialFurnidataBody")}
|
||||
</p>
|
||||
<OfficialSyncClient />
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</StudioPage>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user