From 9dba2a11859035f4c2fd9489d611450b80e4acda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastjan=20Arti=C4=8D?= Date: Thu, 30 Apr 2026 10:34:34 +0000 Subject: [PATCH] iPhone-style trim bar: drag handles instead of sliders MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User feedback: 'tako kot imajo na iphonu - potegnem iz leve in iz desne za na konec... reel pa more biti že v stanju postavljen' Replaced 2 separate range sliders with iPhone-style trim bar: - Single horizontal bar showing full video duration - 2 draggable handles (left = start, right = end) - Selected region highlighted in accent color - Live playhead during playback - Mouse + touch support - Click anywhere on bar = seek to that position - Initial state: handles positioned at auto-selected clip range (just fine-tune left/right, no need to set from scratch) formatTime helper for nice m:ss.c display. --- templates/index.html | 208 ++++++++++++++++++++++++++++++++----------- 1 file changed, 154 insertions(+), 54 deletions(-) diff --git a/templates/index.html b/templates/index.html index 2c37a9b..19bf8fe 100644 --- a/templates/index.html +++ b/templates/index.html @@ -986,6 +986,14 @@ } // ─── EDIT MODAL ───────────────────────────────────── + function formatTime(sec) { + if (!isFinite(sec) || sec < 0) sec = 0; + const m = Math.floor(sec / 60); + const s = Math.floor(sec % 60); + const cs = Math.floor((sec % 1) * 10); + return `${m}:${String(s).padStart(2, "0")}.${cs}`; + } + async function openEditModal(jobId, title) { // Fetch transcript + clip range let data; @@ -1013,41 +1021,56 @@ - + -
-
- - -
-
- - -
-
- - + +
+ +
+ + +
+
-
- 📝 Edit napise (kliknite vrstico za popravek) -
- ${segments.filter(s => s.start < endInit && s.end > startInit).map((s, i) => ` -
- [${s.start.toFixed(1)}s] - -
- `).join("")} -
-
+ +
+
+
+ + +
+ + +
0:00
+
${formatTime(videoDuration)}
+ +
+
+ Začetek: ${formatTime(startInit)} + Konec: ${formatTime(endInit)} + Trajanje: ${(endInit-startInit).toFixed(1)}s +
+
+ + +
+
+ +
+ 📝 Edit napise (kliknite vrstico za popravek) +
+ ${segments.filter(s => s.start < endInit && s.end > startInit).map((s, i) => ` +
+ [${s.start.toFixed(1)}s] + +
+ `).join("")} +
+
+