From 55cab30dec8b09324e0b588fb00c729ee2844126 Mon Sep 17 00:00:00 2001 From: bflatastic Date: Wed, 8 Apr 2026 10:06:22 +0700 Subject: [PATCH] comment out web generation access for now --- .../apps/artcraft-website/src/app/app.tsx | 8 +-- .../src/pages/library/library.tsx | 53 ++++++++++--------- .../src/lib/GalleryDraggableItem.tsx | 6 +-- 3 files changed, 36 insertions(+), 31 deletions(-) diff --git a/frontend/apps/artcraft-website/src/app/app.tsx b/frontend/apps/artcraft-website/src/app/app.tsx index d8c362e21f..06a097545c 100644 --- a/frontend/apps/artcraft-website/src/app/app.tsx +++ b/frontend/apps/artcraft-website/src/app/app.tsx @@ -4,8 +4,8 @@ import Media from "../pages/media"; import PressKit from "../pages/press-kit"; import Navbar from "../components/navbar"; import { ToastContainer } from "../components/toast/toast"; -import CreateImage from "../pages/create-image"; -import CreateVideo from "../pages/create-video"; +// import CreateImage from "../pages/create-image"; +// import CreateVideo from "../pages/create-video"; import Landing2 from "../pages/landing2"; import LandingSD2 from "../pages/landing-sd2"; import TutorialsPage from "../pages/tutorials"; @@ -30,8 +30,8 @@ export function App() { } /> - } /> - } /> + {/* } /> + } /> */} } /> } /> } /> diff --git a/frontend/apps/artcraft-website/src/pages/library/library.tsx b/frontend/apps/artcraft-website/src/pages/library/library.tsx index b82fb69f54..9b8d2c59c1 100644 --- a/frontend/apps/artcraft-website/src/pages/library/library.tsx +++ b/frontend/apps/artcraft-website/src/pages/library/library.tsx @@ -50,7 +50,9 @@ const ROUTE_TO_FILTER: Record = { meshes: "meshes", }; -const getFilterMediaClass = (filter: string): FilterMediaClasses[] | undefined => { +const getFilterMediaClass = ( + filter: string, +): FilterMediaClasses[] | undefined => { switch (filter) { case "image": return [FilterMediaClasses.IMAGE]; @@ -59,7 +61,11 @@ const getFilterMediaClass = (filter: string): FilterMediaClasses[] | undefined = case "meshes": return [FilterMediaClasses.DIMENSIONAL]; default: - return [FilterMediaClasses.IMAGE, FilterMediaClasses.VIDEO, FilterMediaClasses.DIMENSIONAL]; + return [ + FilterMediaClasses.IMAGE, + FilterMediaClasses.VIDEO, + FilterMediaClasses.DIMENSIONAL, + ]; } }; @@ -91,7 +97,9 @@ const getLabel = (item: any) => { export default function Library() { const { filter: filterParam } = useParams<{ filter?: string }>(); const navigate = useNavigate(); - const activeFilter = filterParam ? (ROUTE_TO_FILTER[filterParam] ?? "all") : "all"; + const activeFilter = filterParam + ? (ROUTE_TO_FILTER[filterParam] ?? "all") + : "all"; const [username, setUsername] = useState(null); const [isLoggedIn, setIsLoggedIn] = useState(null); @@ -113,11 +121,7 @@ export default function Library() { const checkSession = async () => { const usersApi = new UsersApi(); const response = await usersApi.GetSession(); - if ( - response.success && - response.data?.loggedIn && - response.data.user - ) { + if (response.success && response.data?.loggedIn && response.data.user) { setUsername(response.data.user.username); setIsLoggedIn(true); } else { @@ -135,8 +139,8 @@ export default function Library() { const thumbnail = isDimensional ? null : getMediaThumbnail(item.media_links, item.media_class, { - size: THUMBNAIL_SIZES.MEDIUM, - }); + size: THUMBNAIL_SIZES.MEDIUM, + }); return { id: item.token, @@ -169,7 +173,9 @@ export default function Library() { if (response.success && response.data) { const newItems = response.data - .filter((item: any) => item.media_type !== FilterMediaType.SCENE_JSON) + .filter( + (item: any) => item.media_type !== FilterMediaType.SCENE_JSON, + ) .map(mapApiItem); if (reset) { @@ -250,17 +256,17 @@ export default function Library() { const navigatePrev = currentIndex > 0 ? () => { - const prev = flatItems[currentIndex - 1]; - setLightboxItem(prev); - } + const prev = flatItems[currentIndex - 1]; + setLightboxItem(prev); + } : undefined; const navigateNext = currentIndex >= 0 && currentIndex < flatItems.length - 1 ? () => { - const next = flatItems[currentIndex + 1]; - setLightboxItem(next); - } + const next = flatItems[currentIndex + 1]; + setLightboxItem(next); + } : undefined; const handleItemDeleted = useCallback((id: string) => { @@ -341,10 +347,11 @@ export default function Library() { - + */} ) : (
diff --git a/frontend/libs/components/gallery-modal/src/lib/GalleryDraggableItem.tsx b/frontend/libs/components/gallery-modal/src/lib/GalleryDraggableItem.tsx index bc56811de0..97c9f3a94a 100644 --- a/frontend/libs/components/gallery-modal/src/lib/GalleryDraggableItem.tsx +++ b/frontend/libs/components/gallery-modal/src/lib/GalleryDraggableItem.tsx @@ -137,7 +137,7 @@ export const GalleryDraggableItem: React.FC = ({ tabIndex={-1} className={twMerge( "w-full group relative overflow-visible rounded-md border-[3px] transition-all focus:outline-none", - "aspect-square", + item.mediaClass === "video" ? "aspect-video" : "aspect-square", selected || bulkSelected ? "border-primary" : disableTooltipAndBadge @@ -171,7 +171,7 @@ export const GalleryDraggableItem: React.FC = ({ alt={item.label} className={twMerge( "h-full w-full bg-black/30", - imageFit === "contain" ? "object-contain" : "object-cover", + item.mediaClass === "video" || imageFit === "contain" ? "object-contain" : "object-cover", )} draggable={false} onError={onImageError} @@ -187,7 +187,7 @@ export const GalleryDraggableItem: React.FC = ({ ); return ( -
+
{/* dropdown menu */} {mode !== "select" && (