summaryrefslogtreecommitdiff
path: root/apps/web/src/components/editor/media-panel/store.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2025-08-18 10:54:28 +0200
committerMaze Winther <mazewinther@gmail.com>2025-08-18 10:54:28 +0200
commit756a7c7caaeada4fff9a51f2ec4fe2968ac3b01e (patch)
tree1194f58254f2450395df18fb8d03469cd3ac3cd9 /apps/web/src/components/editor/media-panel/store.ts
parent13dff382c452be96e1adb05d26bc30fa6de38298 (diff)
downloadopencut-756a7c7caaeada4fff9a51f2ec4fe2968ac3b01e.tar.gz
feat: implement reveal in media feature
Diffstat (limited to 'apps/web/src/components/editor/media-panel/store.ts')
-rw-r--r--apps/web/src/components/editor/media-panel/store.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/web/src/components/editor/media-panel/store.ts b/apps/web/src/components/editor/media-panel/store.ts
index e1212030..eb645ec3 100644
--- a/apps/web/src/components/editor/media-panel/store.ts
+++ b/apps/web/src/components/editor/media-panel/store.ts
@@ -71,9 +71,16 @@ export const tabs: { [key in Tab]: { icon: LucideIcon; label: string } } = {
interface MediaPanelStore {
activeTab: Tab;
setActiveTab: (tab: Tab) => void;
+ highlightMediaId: string | null;
+ requestRevealMedia: (mediaId: string) => void;
+ clearHighlight: () => void;
}
export const useMediaPanelStore = create<MediaPanelStore>((set) => ({
activeTab: "media",
setActiveTab: (tab) => set({ activeTab: tab }),
+ highlightMediaId: null,
+ requestRevealMedia: (mediaId) =>
+ set({ activeTab: "media", highlightMediaId: mediaId }),
+ clearHighlight: () => set({ highlightMediaId: null }),
}));