From 1ffb7abe29344971b26ed58b84dd387900896d0b Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sun, 7 Jun 2026 09:13:58 +0300 Subject: [PATCH] Movie Editor: Split/Remove buttons in the timeline toolbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dedicated, always-visible Split (⧅) and Remove (✕) buttons act on the selected clip — replacing the cramped corner actions that the timecode overlapped. Mirror the S / Delete shortcuts; disabled when no clip is selected. Co-Authored-By: Claude Opus 4.8 --- movie_editor/frontend/timeline.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/movie_editor/frontend/timeline.js b/movie_editor/frontend/timeline.js index 12efc316..eeb433e9 100644 --- a/movie_editor/frontend/timeline.js +++ b/movie_editor/frontend/timeline.js @@ -182,6 +182,17 @@ const tc = el("span", "tl-tc", timecode(Math.min(ph, totalSec), p.frame_rate) + " / " + timecode(totalSec, p.frame_rate)); tlTcEl = tc; // keep ref for Player's onPlayheadChanged updates bar.append(tc); + + // Clip actions on the selected clip (also bound to S / Delete). + const hasSel = !!st.selectedSceneId; + const split = el("button", "btn ghost tiny", "⧅ Split"); + split.title = "Split the selected clip at the playhead (S)"; split.disabled = !hasSel; + split.onclick = () => splitSelectedAtPlayhead(); + const del = el("button", "btn ghost tiny danger", "✕ Remove"); + del.title = "Remove the selected clip (Delete / Backspace)"; del.disabled = !hasSel; + del.onclick = () => { if (st.selectedSceneId) S.removeScene(st.selectedSceneId); }; + bar.append(split); bar.append(del); + const spacer = el("div", "tl-spacer"); bar.append(spacer); const keys = el("span", "tl-keys", "S split · ⌫ remove"); keys.title = "Select a clip, then: S splits it at the playhead · Delete/Backspace removes it"; bar.append(keys);