mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-13 21:32:18 +00:00
Only show cartoon and stylize tabs on the sidebar
This commit is contained in:
1 parent
2ba89c506d
commit
cd79a1b5a4
2 files changed
+4
-75
No files matched your search
@@ -3,25 +3,11 @@ import { FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
|
||||
import {
|
||||
faBrush,
|
||||
faCatSpace,
|
||||
faGlobeSnow,
|
||||
faMountainCity,
|
||||
faPresentationScreen,
|
||||
faRaygun,
|
||||
faSpaghettiMonsterFlying,
|
||||
faUserAstronaut,
|
||||
faVolume,
|
||||
} from "@fortawesome/pro-solid-svg-icons";
|
||||
|
||||
import { TabTitles } from "~/enums";
|
||||
import { AudioTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/AudioTab";
|
||||
import { CreaturesTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/CreaturesTab";
|
||||
import { PlanesTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/PlanesTab";
|
||||
import { ObjectsTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/ObjectsTab";
|
||||
import { SetsTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/SetsTab";
|
||||
import { SkyboxesTab } from "../SidePanelTabs/tabComps/SkyboxesTab";
|
||||
import { StylizeTab } from "~/pages/PageEnigma/comps/SidePanelTabs/tabComps/StylizeTab/StylizeTab";
|
||||
import {
|
||||
AnimeTab,
|
||||
CartoonsTab,
|
||||
} from "../SidePanelTabs/tabComps/CharactersComboTabs";
|
||||
|
||||
@@ -31,55 +17,15 @@ export interface TabItem {
|
||||
component: ReactNode;
|
||||
}
|
||||
|
||||
export const tabList = [
|
||||
{
|
||||
icon: faMountainCity,
|
||||
title: TabTitles.OBJECTS_SETS,
|
||||
component: <SetsTab />,
|
||||
},
|
||||
{
|
||||
icon: faGlobeSnow,
|
||||
title: TabTitles.SKYBOXES,
|
||||
component: <SkyboxesTab />,
|
||||
},
|
||||
{
|
||||
icon: faSpaghettiMonsterFlying,
|
||||
title: TabTitles.OBJECTS_CREATURES,
|
||||
component: <CreaturesTab />,
|
||||
},
|
||||
{
|
||||
icon: faUserAstronaut,
|
||||
title: TabTitles.GROUP_ANIME,
|
||||
component: <AnimeTab />,
|
||||
},
|
||||
export const tabList: TabItem[] = [
|
||||
{
|
||||
icon: faCatSpace,
|
||||
title: TabTitles.GROUP_CARTOONS,
|
||||
component: <CartoonsTab />,
|
||||
},
|
||||
{
|
||||
icon: faRaygun,
|
||||
title: TabTitles.OBJECTS,
|
||||
component: <ObjectsTab />,
|
||||
},
|
||||
{
|
||||
icon: faPresentationScreen,
|
||||
title: TabTitles.PLANES,
|
||||
component: <PlanesTab />,
|
||||
},
|
||||
{
|
||||
icon: faVolume,
|
||||
title: TabTitles.AUDIO,
|
||||
component: <AudioTab />,
|
||||
},
|
||||
{
|
||||
icon: faBrush,
|
||||
title: TabTitles.STYLIZE,
|
||||
component: <StylizeTab />,
|
||||
},
|
||||
{
|
||||
icon: faBrush,
|
||||
title: TabTitles.RENDER,
|
||||
component: <div />,
|
||||
},
|
||||
}
|
||||
];
|
||||
@@ -26,11 +26,6 @@ export const SidePanelMenu = ({
|
||||
selectedTab: TabItem;
|
||||
}) => {
|
||||
useSignals();
|
||||
const showSetsTab = usePosthogFeatureFlag(FeatureFlags.SHOW_SETS_TAB);
|
||||
const showSkyboxesTab = usePosthogFeatureFlag(FeatureFlags.SHOW_SKYBOXES_TAB);
|
||||
const showCreaturesTab = usePosthogFeatureFlag(
|
||||
FeatureFlags.SHOW_CREATURES_TAB,
|
||||
);
|
||||
const showStylePage = usePosthogFeatureFlag(FeatureFlags.SHOW_STYLE_PAGE);
|
||||
return (
|
||||
<div
|
||||
@@ -45,18 +40,6 @@ export const SidePanelMenu = ({
|
||||
>
|
||||
<div className="flex w-full flex-col gap-2">
|
||||
{(tabs ?? []).map((tab) => {
|
||||
if (tab.title === TabTitles.OBJECTS_SETS && !showSetsTab) {
|
||||
return;
|
||||
}
|
||||
if (tab.title === TabTitles.SKYBOXES && !showSkyboxesTab) {
|
||||
return;
|
||||
}
|
||||
if (tab.title === TabTitles.OBJECTS_CREATURES && !showCreaturesTab) {
|
||||
return;
|
||||
}
|
||||
if (tab.title === TabTitles.RENDER && !showStylePage) {
|
||||
return;
|
||||
}
|
||||
return (
|
||||
<button
|
||||
key={tab.title}
|
||||
@@ -66,9 +49,9 @@ export const SidePanelMenu = ({
|
||||
? "border-[#363636] bg-brand-secondary-900/60 opacity-100 hover:bg-brand-secondary-900/60"
|
||||
: "opacity-60",
|
||||
tab.title === TabTitles.STYLIZE &&
|
||||
"bg-brand-primary font-medium opacity-90 hover:border-white/25 hover:bg-brand-primary hover:opacity-100",
|
||||
"bg-brand-primary font-medium opacity-90 hover:border-white/25 hover:bg-brand-primary hover:opacity-100",
|
||||
tab.title === selectedTab.title &&
|
||||
tab.title === TabTitles.STYLIZE
|
||||
tab.title === TabTitles.STYLIZE
|
||||
? "border-white/50 opacity-100 hover:border-white/50"
|
||||
: "",
|
||||
])}
|
||||
|
||||
Reference in new issue
Block a user