diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-27 01:02:01 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-27 01:02:01 +0200 |
| commit | dfde7592bbad0d79528e3ccaf393ea3d78177b01 (patch) | |
| tree | 9c9ca457f70e4c86b55b26ec6ef79e24b55a949a /apps/web/src/stores/timeline-store.ts | |
| parent | 679ebc02b5501c1432753571283501d08d83267d (diff) | |
| download | opencut-dfde7592bbad0d79528e3ccaf393ea3d78177b01.tar.gz | |
refactor: separate timeline toolbar into new component and add new TrackType type
Diffstat (limited to 'apps/web/src/stores/timeline-store.ts')
| -rw-r--r-- | apps/web/src/stores/timeline-store.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index 3b068d7c..4018c301 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -1,4 +1,5 @@ import { create } from "zustand"; +import type { TrackType } from "@/types/timeline"; export interface TimelineClip { id: string; @@ -13,7 +14,7 @@ export interface TimelineClip { export interface TimelineTrack { id: string; name: string; - type: "video" | "audio" | "effects"; + type: TrackType; clips: TimelineClip[]; muted?: boolean; } @@ -52,7 +53,7 @@ interface TimelineStore { endDrag: () => void; // Actions - addTrack: (type: "video" | "audio" | "effects") => string; + addTrack: (type: TrackType) => string; removeTrack: (trackId: string) => void; addClipToTrack: (trackId: string, clip: Omit<TimelineClip, "id">) => void; removeClipFromTrack: (trackId: string, clipId: string) => void; |
