diff options
| author | melad <meladnaieem@yahoo.com> | 2025-07-31 13:50:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-31 12:50:22 +0200 |
| commit | f255ccb818358b90edd0c1bc1f3a690dc1e729ac (patch) | |
| tree | 8c2a0503d591d24edaa6cd0eeea5f152397f6bd3 /apps/web/src/stores/timeline-store.ts | |
| parent | b229d94a8da7b258f1b49867e8cee225d5feb735 (diff) | |
| download | opencut-f255ccb818358b90edd0c1bc1f3a690dc1e729ac.tar.gz | |
feat: add hide or show for media elements, mute or unmute for audio elements (#500)
* feat: create external tools section (#493)
* feat: create external tools section
* fix: better wording
* Feature, added hide or show for media elements, mute or unmute for audio elements both effective on timeline and preview panel, with overlay icon for indicating so and state storing,
* Minor UI vertical separator between magnifier and other buttons
* fixed the AbortError issue in the AudioWaveform component. The error was occurring because of a race condition during cleanup when the component unmounts.
* feat: implement bookmarking functionality in the timeline and project storage
- Added bookmark management methods in the project store for toggling and checking bookmarks.
- Updated the timeline component to display bookmark markers and integrate bookmark actions in the context menu.
- Enhanced the storage service to handle bookmarks in project serialization and deserialization.
- Updated project types to include bookmarks as an array of numbers.
---------
Co-authored-by: Dominik K. <dominik@koch-bautechnik.de>
Co-authored-by: Maze Winther <mazewinther@gmail.com>
Diffstat (limited to 'apps/web/src/stores/timeline-store.ts')
| -rw-r--r-- | apps/web/src/stores/timeline-store.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/web/src/stores/timeline-store.ts b/apps/web/src/stores/timeline-store.ts index f3497be9..0f441176 100644 --- a/apps/web/src/stores/timeline-store.ts +++ b/apps/web/src/stores/timeline-store.ts @@ -126,6 +126,7 @@ interface TimelineStore { pushHistory?: boolean ) => void; toggleTrackMute: (trackId: string) => void; + toggleElementHidden: (trackId: string, elementId: string) => void; // Split operations for elements splitElement: ( @@ -868,6 +869,24 @@ export const useTimelineStore = create<TimelineStore>((set, get) => { ); }, + toggleElementHidden: (trackId, elementId) => { + get().pushHistory(); + updateTracksAndSave( + get()._tracks.map((track) => + track.id === trackId + ? { + ...track, + elements: track.elements.map((element) => + element.id === elementId + ? { ...element, hidden: !element.hidden } + : element + ), + } + : track + ) + ); + }, + updateTextElement: (trackId, elementId, updates) => { get().pushHistory(); updateTracksAndSave( |
