summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/panels/assets/assets-panel-store.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/src/components/editor/panels/assets/assets-panel-store.tsx')
-rw-r--r--apps/web/src/components/editor/panels/assets/assets-panel-store.tsx27
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/web/src/components/editor/panels/assets/assets-panel-store.tsx b/apps/web/src/components/editor/panels/assets/assets-panel-store.tsx
index b412de7b..9e9f77c6 100644
--- a/apps/web/src/components/editor/panels/assets/assets-panel-store.tsx
+++ b/apps/web/src/components/editor/panels/assets/assets-panel-store.tsx
@@ -3,17 +3,16 @@ import { create } from "zustand";
import { persist } from "zustand/middleware";
import {
ArrowRightDoubleIcon,
- ClosedCaptionIcon,
+ CameraLensIcon,
Folder03Icon,
Happy01Icon,
HeadphonesIcon,
MagicWand05Icon,
TextIcon,
Settings01Icon,
- SlidersHorizontalIcon,
- ColorsIcon,
} from "@hugeicons/core-free-icons";
import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";
+import { effectsRegistry } from "@/effects";
export const TAB_KEYS = [
"media",
@@ -21,9 +20,8 @@ export const TAB_KEYS = [
"text",
"stickers",
"effects",
+ "lens",
"transitions",
- "captions",
- "adjustment",
"settings",
] as const;
@@ -56,18 +54,14 @@ export const tabs = {
icon: createHugeiconsIcon({ icon: MagicWand05Icon }),
label: "Effects",
},
+ lens: {
+ icon: createHugeiconsIcon({ icon: CameraLensIcon }),
+ label: "Lens",
+ },
transitions: {
icon: createHugeiconsIcon({ icon: ArrowRightDoubleIcon }),
label: "Transitions",
},
- captions: {
- icon: createHugeiconsIcon({ icon: ClosedCaptionIcon }),
- label: "Captions",
- },
- adjustment: {
- icon: createHugeiconsIcon({ icon: SlidersHorizontalIcon }),
- label: "Adjustment",
- },
settings: {
icon: createHugeiconsIcon({ icon: Settings01Icon }),
label: "Settings",
@@ -81,6 +75,13 @@ export type MediaViewMode = "grid" | "list";
export type MediaSortKey = "name" | "type" | "duration" | "size";
export type MediaSortOrder = "asc" | "desc";
+export function getDefaultEffectsTab(): Tab {
+ const hasLensEffects = effectsRegistry
+ .getAll()
+ .some((definition) => definition.category === "lens");
+ return hasLensEffects ? "lens" : "effects";
+}
+
interface AssetsPanelStore {
activeTab: Tab;
setActiveTab: (tab: Tab) => void;