mirror of
https://github.com/storytold/artcraftx.git
synced 2026-11-25 20:01:19 +01:00
remove homepage
This commit is contained in:
1 parent
af0775ab5e
commit
592639bcfe
6 files changed
+4
-572
No files matched your search
@@ -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 (
|
||||
<div className="grid w-[680px] grid-cols-2 gap-3">
|
||||
<div>
|
||||
<h3 className="mb-2 px-2 text-xs font-semibold opacity-50">Create</h3>
|
||||
<div className="space-y-0.5">
|
||||
{generateApps.map((app) => (
|
||||
<button
|
||||
key={app.id}
|
||||
onClick={() => goToApp(app.action)}
|
||||
disabled={!app.action}
|
||||
className={twMerge(
|
||||
"group flex w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-colors",
|
||||
app.action
|
||||
? "cursor-pointer hover:bg-base-fg/10"
|
||||
: "cursor-default opacity-60",
|
||||
)}
|
||||
>
|
||||
<div
|
||||
className={twMerge(
|
||||
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md transition-colors",
|
||||
app.color || "bg-ui-panel",
|
||||
)}
|
||||
>
|
||||
<FontAwesomeIcon icon={app.icon} className="text-sm" />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<div className="truncate text-[13px] font-medium">
|
||||
{app.label}
|
||||
</div>
|
||||
{app.badge && (
|
||||
<span
|
||||
className={twMerge(
|
||||
"shrink-0 rounded-full px-2 py-1 text-[9px] font-bold uppercase tracking-wider",
|
||||
getBadgeStyles(app.badge),
|
||||
)}
|
||||
>
|
||||
{app.badge}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="truncate text-[11px] opacity-60">
|
||||
{app.description}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<h3 className="mb-2 px-2 text-xs font-semibold opacity-50">Edit</h3>
|
||||
<div className="space-y-0.5">
|
||||
{editApps.map((app) => (
|
||||
<button
|
||||
key={app.id}
|
||||
onClick={() => goToApp(app.action)}
|
||||
disabled={!app.action}
|
||||
className={twMerge(
|
||||
"group flex w-full items-center gap-3 rounded-md px-2 py-2 text-left transition-colors",
|
||||
app.action
|
||||
? "cursor-pointer hover:bg-base-fg/10"
|
||||
: "cursor-default opacity-60",
|
||||
)}
|
||||
>
|
||||
<div
|
||||
className={twMerge(
|
||||
"flex h-8 w-8 shrink-0 items-center justify-center rounded-md transition-colors",
|
||||
app.color || "bg-ui-panel",
|
||||
)}
|
||||
>
|
||||
<FontAwesomeIcon icon={app.icon} className="text-sm" />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center gap-1.5">
|
||||
<div className="truncate text-[13px] font-medium">
|
||||
{app.label}
|
||||
</div>
|
||||
{app.badge && (
|
||||
<span
|
||||
className={twMerge(
|
||||
"shrink-0 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",
|
||||
getBadgeStyles(app.badge),
|
||||
)}
|
||||
>
|
||||
{app.badge}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="truncate text-[11px] opacity-60">
|
||||
{app.description}
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -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: <FontAwesomeIcon icon={faHouse} />,
|
||||
description: "Explore all apps and miniapps",
|
||||
large: true,
|
||||
tooltipContent: <AppsQuickMenu />,
|
||||
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
|
||||
|
||||
@@ -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<string, AppCardPalette> = {
|
||||
"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 &&
|
||||
|
||||
@@ -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 <div> scopes them so they don't
|
||||
// stack as siblings of the TopBar at the MainApp root.
|
||||
switch (tabStore.activeTabId) {
|
||||
case "APPS":
|
||||
return (
|
||||
<div>
|
||||
<AppsIndexPage />
|
||||
</div>
|
||||
);
|
||||
case "IMAGE":
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -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.
|
||||
<div className="fixed inset-0 overflow-y-auto bg-ui-background pt-[56px] text-base-fg">
|
||||
<main className="mx-auto max-w-6xl px-6 pb-20 pt-12 sm:pt-20">
|
||||
<h1 className="mx-auto text-center text-4xl font-semibold tracking-tight sm:text-6xl">
|
||||
What will you <span className="text-primary">craft</span> today?
|
||||
</h1>
|
||||
<p className="mx-auto mt-3 max-w-xl text-center text-lg text-base-fg/55">
|
||||
Every tool in your toolbox - pick one and start creating.
|
||||
</p>
|
||||
|
||||
<div className="mt-12 space-y-10">
|
||||
{categories.map((category) => (
|
||||
<section key={category.title}>
|
||||
<h2 className="mb-4 text-sm font-semibold text-base-fg/85">
|
||||
{category.title}
|
||||
</h2>
|
||||
<div className="grid auto-rows-min gap-3 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{category.apps.map((app) => (
|
||||
<AppCard key={app.id} app={app} />
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
))}
|
||||
</div>
|
||||
</main>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
function AppCard({ app }: { app: FullAppItem }) {
|
||||
const palette = getAppCardPalette(app.id);
|
||||
const enabled = !!app.action;
|
||||
|
||||
return (
|
||||
<button
|
||||
onClick={() => goToApp(app.action)}
|
||||
disabled={!enabled}
|
||||
className={twMerge(
|
||||
"group relative block overflow-hidden rounded-2xl bg-ui-controls/50 p-5 text-left transition-colors",
|
||||
enabled
|
||||
? "cursor-pointer hover:bg-ui-controls"
|
||||
: "cursor-default opacity-60",
|
||||
)}
|
||||
>
|
||||
{/* Hover accent — gradient wash matching the app's hue. */}
|
||||
{enabled && (
|
||||
<div
|
||||
aria-hidden
|
||||
className={twMerge(
|
||||
"pointer-events-none absolute -inset-px rounded-2xl bg-gradient-to-br opacity-0 transition-opacity group-hover:opacity-100",
|
||||
palette.accent,
|
||||
)}
|
||||
/>
|
||||
)}
|
||||
|
||||
<div className="relative flex items-start gap-4">
|
||||
<div
|
||||
className={twMerge(
|
||||
"flex h-11 w-11 shrink-0 items-center justify-center rounded-xl border",
|
||||
palette.iconBg,
|
||||
palette.iconColor,
|
||||
)}
|
||||
>
|
||||
<FontAwesomeIcon icon={app.icon} className="text-base" />
|
||||
</div>
|
||||
<div className="min-w-0 flex-1">
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<h3 className="truncate text-base font-semibold text-base-fg">
|
||||
{app.label}
|
||||
</h3>
|
||||
{app.badge && (
|
||||
<span
|
||||
className={twMerge(
|
||||
"shrink-0 rounded-full px-1.5 py-0.5 text-[10px] font-bold uppercase leading-none tracking-wider",
|
||||
getBadgeStyles(app.badge),
|
||||
)}
|
||||
>
|
||||
{app.badge}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
{enabled && (
|
||||
<FontAwesomeIcon
|
||||
icon={faArrowRight}
|
||||
className="text-sm text-base-fg/40 transition-all group-hover:translate-x-0.5 group-hover:text-base-fg/70"
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<p className="mt-1 text-sm leading-snug text-base-fg/55">
|
||||
{app.description}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user