From 013e8be1f06b45b8cd51b73ae662e0cfce28ba0f Mon Sep 17 00:00:00 2001 From: xRangerDE Date: Sun, 10 May 2026 11:46:20 +0200 Subject: [PATCH] feat(clip): add Parts-format preset to Trim-Clip dialog The Trim-Clip filename-format radio group only offered three presets (simple, timestamp, custom template). Users who organise their archive with the global filename_template_parts pattern (e.g. 08.05.2026_Part07.mp4) had to switch to "custom template" and retype {date}_Part{part_padded}.mp4 every time. New "parts" preset: - index.html: 4th radio option, span#formatParts for the live preview - types.ts + renderer-globals.d.ts: filenameFormat union extended - main.ts: makeClipFilename branch produces ${dateStr}_Part${padded}.mp4; sanitizeCustomClip whitelists "parts" so persisted queue items with the new format survive a restart - renderer.ts: getSelectedFilenameFormat returns "parts"; live preview via partNum.padStart(2, "0") - DE/EN locales: clips.formatParts label Co-Authored-By: Claude Opus 4.7 (1M context) --- src/index.html | 5 +++++ src/main.ts | 12 +++++++++--- src/renderer-globals.d.ts | 2 +- src/renderer-locale-de.ts | 1 + src/renderer-locale-en.ts | 1 + src/renderer.ts | 8 ++++++-- src/types.ts | 2 +- 7 files changed, 24 insertions(+), 7 deletions(-) diff --git a/src/index.html b/src/index.html index 2de1a02..12f9028 100644 --- a/src/index.html +++ b/src/index.html @@ -106,6 +106,11 @@ style="width: 18px; height: 18px; accent-color: #9146FF;"> 01.02.2026_CLIP_00-00-00_1.mp4 (mit Zeitstempel) +