From 592639bcfec22bef9f08f28ea23dc4c60404036a Mon Sep 17 00:00:00 2001 From: Hanashi Date: Thu, 30 Jul 2026 22:35:05 -0400 Subject: [PATCH] remove homepage --- .../signaled/TopBar/AppsQuickMenu.tsx | 112 ------- .../src/components/signaled/TopBar/TopBar.tsx | 26 +- .../apps/artcraft/app/src/config/appMenu.tsx | 308 +----------------- .../apps/artcraft/app/src/pages/MainApp.tsx | 7 - .../app/src/pages/PageApps/AppsIndexPage.tsx | 120 ------- .../artcraft/app/src/pages/Stores/TabState.ts | 3 +- 6 files changed, 4 insertions(+), 572 deletions(-) delete mode 100644 frontend/apps/artcraft/app/src/components/signaled/TopBar/AppsQuickMenu.tsx delete mode 100644 frontend/apps/artcraft/app/src/pages/PageApps/AppsIndexPage.tsx diff --git a/frontend/apps/artcraft/app/src/components/signaled/TopBar/AppsQuickMenu.tsx b/frontend/apps/artcraft/app/src/components/signaled/TopBar/AppsQuickMenu.tsx deleted file mode 100644 index 17a55195..00000000 --- a/frontend/apps/artcraft/app/src/components/signaled/TopBar/AppsQuickMenu.tsx +++ /dev/null @@ -1,112 +0,0 @@ -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { twMerge } from "tailwind-merge"; -import { - useGenerateApps, - useEditApps, - getBadgeStyles, - goToApp, -} from "~/config/appMenu"; - -export const AppsQuickMenu = () => { - const generateApps = useGenerateApps(); - const editApps = useEditApps(); - return ( -
-
-

Create

-
- {generateApps.map((app) => ( - - ))} -
-
- -
-

Edit

-
- {editApps.map((app) => ( - - ))} -
-
-
- ); -}; diff --git a/frontend/apps/artcraft/app/src/components/signaled/TopBar/TopBar.tsx b/frontend/apps/artcraft/app/src/components/signaled/TopBar/TopBar.tsx index a66cfc3c..1a508e98 100644 --- a/frontend/apps/artcraft/app/src/components/signaled/TopBar/TopBar.tsx +++ b/frontend/apps/artcraft/app/src/components/signaled/TopBar/TopBar.tsx @@ -8,7 +8,6 @@ import { faCoins, faGear, faGem, - faHouse, faImages, faCalculator, faExclamation, @@ -76,7 +75,6 @@ import { galleryModalDeleteMedia, galleryModalSubscribeToMediaEvents, } from "~/Helpers/galleryModalTauriBindings"; -import { AppsQuickMenu } from "./AppsQuickMenu"; import { TaskQueue } from "./TaskQueue"; import { UploadImagesButton } from "./UploadImagesButton"; @@ -96,19 +94,8 @@ type SettingsSection = const SWITCHER_THROTTLE_TIME = 500; // milliseconds const CREDITS_POLL_INTERVAL = 60_000; // milliseconds -// NB: See `TabState` for the default tab. The Apps ("More") entry is first so -// it's the landing tab and leftmost in the switcher. +// NB: See `TabState` for the default tab. const appMenuTabs: MenuIconItem[] = [ - { - id: "APPS", - label: "Home", - icon: , - description: "Explore all apps and miniapps", - large: true, - tooltipContent: , - tooltipInteractive: true, - tooltipPosition: "bottom", - }, ...APP_DESCRIPTORS.map((d) => ({ id: d.id, label: d.label, @@ -343,8 +330,6 @@ export const TopBar = ({ pageName }: Props) => { return "Image to 3D Object"; case "IMAGE_TO_3D_WORLD": return "Image to 3D World"; - case "APPS": - return "ArtCraft"; case "BACKGROUND_CHANGE": return "Background Change"; default: @@ -427,15 +412,6 @@ export const TopBar = ({ pageName }: Props) => { switcherThrottle.current = true; setDisableSwitcher(true); - if (tabId === "APPS") { - useTabStore.getState().setActiveTab("APPS"); - setTimeout(() => { - switcherThrottle.current = false; - setDisableSwitcher(false); - }, SWITCHER_THROTTLE_TIME); - return; - } - useTabStore.getState().setActiveTab(tabId as TabId); setTimeout(() => { // Clear the throttle diff --git a/frontend/apps/artcraft/app/src/config/appMenu.tsx b/frontend/apps/artcraft/app/src/config/appMenu.tsx index 10ca9ff5..d80ba701 100644 --- a/frontend/apps/artcraft/app/src/config/appMenu.tsx +++ b/frontend/apps/artcraft/app/src/config/appMenu.tsx @@ -1,22 +1,6 @@ import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; -import { - faCube, - faFilm, - faImage, - faMusic, - faDroplet, - faPhotoFilm, - faGlobe, - faWandMagicSparkles, - faCrosshairs, - faSparkles, - faObjectGroup, -} from "@fortawesome/pro-solid-svg-icons"; -import { useMemo } from "react"; -import { - useExperimentalStore, - useStoryboardPageEnabled, -} from "@storyteller/ui-settings-modal"; +import { faFilm, faImage, faMusic } from "@fortawesome/pro-solid-svg-icons"; +import { useExperimentalStore } from "@storyteller/ui-settings-modal"; import { useTabStore, TabId } from "~/pages/Stores/TabState"; export type AppId = @@ -63,294 +47,6 @@ export const APP_DESCRIPTORS: AppDescriptor[] = [ }, ]; -export interface FullAppItem { - id: string; - label: string; - description: string; - icon: IconDefinition; - category: "generate" | "edit"; - badge?: "NEW" | "BEST" | "SOON" | "BETA"; - action?: AppId; - /** Legacy single-tone icon-square background (e.g. "bg-blue-600/40"). Still - * used as the fallback for the apps-page card styling. */ - color?: string; -} - -// Per-app card palette for the Apps page (webapp-home-style cards). Derived -// from each app's Tailwind color family so the icon box, its border, and the -// hover gradient all share a hue. Keyed by app id; falls back to a neutral -// slate when an id is missing. -interface AppCardPalette { - /** Hover gradient overlay, e.g. "from-blue-500/20 to-blue-500/0". */ - accent: string; - /** Icon box background + border, e.g. "bg-blue-500/20 border-blue-400/30". */ - iconBg: string; - /** Icon glyph color, e.g. "text-blue-300". */ - iconColor: string; -} - -const APP_CARD_PALETTES: Record = { - "text-to-image": { - accent: "from-blue-500/20 to-blue-500/0", - iconBg: "bg-blue-500/20 border-blue-400/30", - iconColor: "text-blue-300", - }, - "image-to-video": { - accent: "from-amber-500/20 to-amber-500/0", - iconBg: "bg-amber-500/20 border-amber-400/30", - iconColor: "text-amber-300", - }, - "create-audio": { - accent: "from-pink-500/20 to-pink-500/0", - iconBg: "bg-pink-500/20 border-pink-400/30", - iconColor: "text-pink-300", - }, - "image-to-3d-object": { - accent: "from-emerald-500/20 to-emerald-500/0", - iconBg: "bg-emerald-500/20 border-emerald-400/30", - iconColor: "text-emerald-300", - }, - "image-to-3d-world": { - accent: "from-sky-500/20 to-sky-500/0", - iconBg: "bg-sky-500/20 border-sky-400/30", - iconColor: "text-sky-300", - }, - angles: { - accent: "from-lime-500/20 to-lime-500/0", - iconBg: "bg-lime-500/20 border-lime-400/30", - iconColor: "text-lime-300", - }, - storyboard: { - accent: "from-fuchsia-500/20 to-fuchsia-500/0", - iconBg: "bg-fuchsia-500/20 border-fuchsia-400/30", - iconColor: "text-fuchsia-300", - }, - "remove-background": { - accent: "from-violet-500/20 to-violet-500/0", - iconBg: "bg-violet-500/20 border-violet-400/30", - iconColor: "text-violet-300", - }, - "video-frame-extractor": { - accent: "from-rose-500/20 to-rose-500/0", - iconBg: "bg-rose-500/20 border-rose-400/30", - iconColor: "text-rose-300", - }, - "background-change": { - accent: "from-orange-500/20 to-orange-500/0", - iconBg: "bg-orange-500/20 border-orange-400/30", - iconColor: "text-orange-300", - }, - "video-editor": { - accent: "from-teal-500/20 to-teal-500/0", - iconBg: "bg-teal-500/20 border-teal-400/30", - iconColor: "text-teal-300", - }, - "video-watermark-removal": { - accent: "from-cyan-500/20 to-cyan-500/0", - iconBg: "bg-cyan-500/20 border-cyan-400/30", - iconColor: "text-cyan-300", - }, - "image-watermark-removal": { - accent: "from-indigo-500/20 to-indigo-500/0", - iconBg: "bg-indigo-500/20 border-indigo-400/30", - iconColor: "text-indigo-300", - }, -}; - -const FALLBACK_APP_CARD_PALETTE: AppCardPalette = { - accent: "from-white/10 to-white/0", - iconBg: "bg-ui-controls border-ui-controls-border", - iconColor: "text-base-fg", -}; - -export const getAppCardPalette = (id: string): AppCardPalette => - APP_CARD_PALETTES[id] ?? FALLBACK_APP_CARD_PALETTE; - -export const ALL_APPS: FullAppItem[] = [ - { - id: "text-to-image", - label: "Create Image", - description: "Generate AI images", - icon: faImage, - category: "generate", - action: "IMAGE", - color: "bg-blue-600/40", - }, - { - id: "image-to-video", - label: "Create Video", - description: "Create video from images", - icon: faFilm, - category: "generate", - action: "VIDEO", - color: "bg-amber-500/40", - }, - { - id: "create-audio", - label: "Create Audio", - description: "Generate music and sound effects", - icon: faMusic, - category: "generate", - action: "AUDIO", - color: "bg-pink-500/40", - }, - { - id: "image-to-3d-object", - label: "Image to 3D Object", - description: "Convert references into textured assets", - icon: faCube, - category: "generate", - action: "IMAGE_TO_3D_OBJECT", - color: "bg-emerald-500/40", - }, - { - id: "image-to-3d-world", - label: "Image to 3D World", - description: "Turn mood boards into explorable worlds", - icon: faGlobe, - category: "generate", - action: "IMAGE_TO_3D_WORLD", - color: "bg-blue-500/40", - }, - { - id: "video-frame-extractor", - label: "Video Frame Extractor", - description: "Extract frames from video", - icon: faPhotoFilm, - category: "edit", - action: "VIDEO_FRAME_EXTRACTOR", - color: "bg-rose-600/40", - }, - { - id: "video-watermark-removal", - label: "Video Watermark Remover", - description: "Remove watermarks from videos", - icon: faDroplet, - category: "edit", - badge: "SOON", - color: "bg-cyan-500/40", - }, - { - id: "image-watermark-removal", - label: "Image Watermark Remover", - description: "Remove watermarks from images", - icon: faDroplet, - category: "edit", - badge: "SOON", - color: "bg-indigo-600/40", - }, - { - id: "remove-background", - label: "Remove Background", - description: "Remove backgrounds from images", - icon: faWandMagicSparkles, - category: "edit", - action: "REMOVE_BACKGROUND", - color: "bg-violet-500/40", - }, - { - id: "angles", - label: "Angles", - description: "Generate new camera angles from a single photo", - icon: faCrosshairs, - category: "generate", - action: "ANGLES", - color: "bg-lime-500/40", - badge: "NEW", - }, - - { - id: "storyboard", - label: "Storyboard", - description: "Plan your shots with a visual storyboard", - icon: faPhotoFilm, - category: "generate", - action: "STORYBOARD", - color: "bg-fuchsia-600/40", - badge: "NEW", - }, - { - id: "moodboard", - label: "Moodboard", - description: "Collect references and steer generations from a board", - icon: faObjectGroup, - category: "generate", - action: "MOODBOARD", - color: "bg-orange-500/40", - badge: "BETA", - }, - { - id: "background-change", - label: "Background Change", - description: "Swap the backdrop of a video using a reference image", - icon: faSparkles, - category: "edit", - action: "BACKGROUND_CHANGE", - color: "bg-orange-500/40", - badge: "NEW", - }, - { - id: "video-editor", - label: "Video Editor", - description: "Edit and assemble videos on a timeline", - icon: faFilm, - category: "edit", - action: "VIDEO_EDITOR", - color: "bg-teal-500/40", - badge: "BETA", - }, -]; - -export const GENERATE_APPS = ALL_APPS.filter( - (app) => app.category === "generate", -); -export const EDIT_APPS = ALL_APPS.filter((app) => app.category === "edit"); - -export const useVisibleApps = (): FullAppItem[] => { - const storyboardEnabled = useStoryboardPageEnabled(); - return useMemo( - () => - ALL_APPS.filter((app) => { - // Background Change is hidden in the desktop app for now. - if (app.action === "BACKGROUND_CHANGE") return false; - if (app.action === "STORYBOARD") return storyboardEnabled; - return true; - }), - [storyboardEnabled], - ); -}; - -export const useGenerateApps = (): FullAppItem[] => { - const visible = useVisibleApps(); - return useMemo( - () => visible.filter((app) => app.category === "generate"), - [visible], - ); -}; - -export const useEditApps = (): FullAppItem[] => { - const visible = useVisibleApps(); - return useMemo( - () => visible.filter((app) => app.category === "edit"), - [visible], - ); -}; - -export const getBadgeStyles = (badge?: string) => { - switch (badge) { - case "NEW": - return "bg-teal-600 text-white"; - case "BEST": - return "bg-primary text-white"; - case "SOON": - return "bg-gray-600 text-white"; - case "BETA": - return "bg-amber-500 text-white"; - default: - return ""; - } -}; - export const goToApp = (action?: string) => { if ( action && diff --git a/frontend/apps/artcraft/app/src/pages/MainApp.tsx b/frontend/apps/artcraft/app/src/pages/MainApp.tsx index 37325151..2409ec40 100644 --- a/frontend/apps/artcraft/app/src/pages/MainApp.tsx +++ b/frontend/apps/artcraft/app/src/pages/MainApp.tsx @@ -39,7 +39,6 @@ import { useBackgroundLoadingMedia } from "~/hooks/useBackgroundLoadingMedia"; import { useTabStore } from "./Stores/TabState"; import { useTextToImageStore } from "./PageImage/TextToImageStore"; -import { AppsIndexPage } from "./PageApps/AppsIndexPage"; import TextToImage from "./PageImage/TextToImage"; import ImageToVideo from "./PageVideo/ImageToVideo"; import CreateAudio from "./PageAudio/CreateAudio"; @@ -160,12 +159,6 @@ const TabBody = () => { // position: fixed; the wrapping
scopes them so they don't // stack as siblings of the TopBar at the MainApp root. switch (tabStore.activeTabId) { - case "APPS": - return ( -
- -
- ); case "IMAGE": return (
diff --git a/frontend/apps/artcraft/app/src/pages/PageApps/AppsIndexPage.tsx b/frontend/apps/artcraft/app/src/pages/PageApps/AppsIndexPage.tsx deleted file mode 100644 index 6fc27cee..00000000 --- a/frontend/apps/artcraft/app/src/pages/PageApps/AppsIndexPage.tsx +++ /dev/null @@ -1,120 +0,0 @@ -import { faArrowRight } from "@fortawesome/pro-solid-svg-icons"; -import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { twMerge } from "tailwind-merge"; -import { - useGenerateApps, - useEditApps, - getAppCardPalette, - getBadgeStyles, - goToApp, - type FullAppItem, -} from "~/config/appMenu"; - -export const AppsIndexPage = () => { - const generateApps = useGenerateApps(); - const editApps = useEditApps(); - const categories = [ - { title: "Create", apps: generateApps }, - { title: "Edit", apps: editApps }, - ]; - - return ( - // The scroll container spans the full window width so its scrollbar sits - // flush against the right edge; horizontal padding lives on the inner - // wrapper instead. -
-
-

- What will you craft today? -

-

- Every tool in your toolbox - pick one and start creating. -

- -
- {categories.map((category) => ( -
-

- {category.title} -

-
- {category.apps.map((app) => ( - - ))} -
-
- ))} -
-
-
- ); -}; - -function AppCard({ app }: { app: FullAppItem }) { - const palette = getAppCardPalette(app.id); - const enabled = !!app.action; - - return ( - - ); -} diff --git a/frontend/apps/artcraft/app/src/pages/Stores/TabState.ts b/frontend/apps/artcraft/app/src/pages/Stores/TabState.ts index ad25ba41..89f2eca3 100644 --- a/frontend/apps/artcraft/app/src/pages/Stores/TabState.ts +++ b/frontend/apps/artcraft/app/src/pages/Stores/TabState.ts @@ -5,7 +5,6 @@ export type TabId = | "EDIT" | "IMAGE" | "AUDIO" - | "APPS" | "VIDEO_FRAME_EXTRACTOR" | "VIDEO_WATERMARK_REMOVAL" | "IMAGE_WATERMARK_REMOVAL" @@ -18,7 +17,7 @@ export type TabId = | "VIDEO_EDITOR" | "MOODBOARD"; -const DEFAULT_TAB: TabId = "APPS"; +const DEFAULT_TAB: TabId = "IMAGE"; interface TabState { // Current active tab