From 72bf6738e111f4c2d0a775b78097e189f4be8755 Mon Sep 17 00:00:00 2001 From: BFlat Date: Thu, 19 Mar 2026 13:21:19 +0700 Subject: [PATCH] =?UTF-8?q?website=20library=20filter=20links,=20added=203?= =?UTF-8?q?d,=20and=20video=20thumbnails=20to=20prope=E2=80=A6=20(#1174)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …rly show --- .../public/images/services/worldlabs.svg | 6 ++ .../apps/artcraft-website/src/app/app.tsx | 1 + .../src/components/lightbox/lightbox.tsx | 15 +++- .../src/pages/library/library.tsx | 82 +++++++++++++++---- 4 files changed, 87 insertions(+), 17 deletions(-) create mode 100644 frontend/apps/artcraft-website/public/images/services/worldlabs.svg diff --git a/frontend/apps/artcraft-website/public/images/services/worldlabs.svg b/frontend/apps/artcraft-website/public/images/services/worldlabs.svg new file mode 100644 index 0000000000..795cf7d000 --- /dev/null +++ b/frontend/apps/artcraft-website/public/images/services/worldlabs.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/frontend/apps/artcraft-website/src/app/app.tsx b/frontend/apps/artcraft-website/src/app/app.tsx index 31e7edd77f..fda52c3910 100644 --- a/frontend/apps/artcraft-website/src/app/app.tsx +++ b/frontend/apps/artcraft-website/src/app/app.tsx @@ -44,6 +44,7 @@ export function App() { } /> } /> } /> + } /> } /> } /> } /> diff --git a/frontend/apps/artcraft-website/src/components/lightbox/lightbox.tsx b/frontend/apps/artcraft-website/src/components/lightbox/lightbox.tsx index 7d753442dc..ae3fb8614b 100644 --- a/frontend/apps/artcraft-website/src/components/lightbox/lightbox.tsx +++ b/frontend/apps/artcraft-website/src/components/lightbox/lightbox.tsx @@ -38,6 +38,7 @@ import { getProviderIconByName, } from "@storyteller/model-list"; import { ActionReminderModal } from "@storyteller/ui-action-reminder-modal"; +import { Viewer3D } from "@storyteller/ui-viewer-3d"; import dayjs from "dayjs"; import useEmblaCarousel from "embla-carousel-react"; import type { EmblaOptionsType } from "embla-carousel"; @@ -84,10 +85,14 @@ const COPY_TIMEOUT = 1500; const SHARE_URL_BASE = "https://getartcraft.com/media/"; const VIDEO_EXTENSIONS = [".mp4", ".webm", ".mov", ".avi", ".mkv", ".m4v"]; +const MODEL_3D_EXTENSIONS = [".glb", ".gltf", ".fbx", ".spz"]; const isVideoUrl = (url: string): boolean => VIDEO_EXTENSIONS.some((ext) => url.toLowerCase().includes(ext)); +const is3DModelUrl = (url: string): boolean => + MODEL_3D_EXTENSIONS.some((ext) => url.toLowerCase().includes(ext)); + // ── Helpers ──────────────────────────────────────────────────────────────── const useCopyFeedback = () => { @@ -362,6 +367,7 @@ export function Lightbox({ }, [batchTokens, propMediaTokens, selectedIndex, mediaToken]); const isVideo = selectedImageUrl ? isVideoUrl(selectedImageUrl) : (propMediaClass === "video"); + const is3D = selectedImageUrl ? is3DModelUrl(selectedImageUrl) : (propMediaClass === "dimensional"); // Keyboard navigation useEffect(() => { @@ -423,6 +429,13 @@ export function Lightbox({
Media not available
+ ) : is3D ? ( + ) : isVideo ? (