drop the dead code and close the gaps in the verification gate
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
min={minTargetMB(clip.duration_secs)}
|
||||
max={maxTargetMB(clip.duration_secs)}
|
||||
step="0.1"
|
||||
aria-label="target size"
|
||||
bind:value={targetMB}
|
||||
onchange={onPreview}
|
||||
/>
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
min={2}
|
||||
max={256}
|
||||
step={1}
|
||||
aria-label="colors"
|
||||
bind:value={colors}
|
||||
onchange={onChange}
|
||||
/>
|
||||
|
||||
@@ -58,7 +58,6 @@
|
||||
let audioWarning: string | null = $state(null)
|
||||
let retryingAudio: boolean = $state(false)
|
||||
let useFrame: boolean = $state(false)
|
||||
let previewTimer: number | null = null
|
||||
let thumbCache: Map<string, string[]> = $state(new Map())
|
||||
let showDiscardConfirm: boolean = $state(false)
|
||||
let aspectLock: number | null = $state(null)
|
||||
@@ -350,7 +349,6 @@
|
||||
thumbnails = []; deletedFrames = new Set()
|
||||
thumbCache = new Map()
|
||||
previewPath = null; resetTrimPreview()
|
||||
if (previewTimer !== null) { clearTimeout(previewTimer); previewTimer = null }
|
||||
elapsed = 0; phase = "idle"
|
||||
if (config) {
|
||||
format = config.export.default_format
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
} else {
|
||||
stopTimer()
|
||||
}
|
||||
if (e.payload.phase === "idle") { elapsed = 0; phase = "idle" }
|
||||
if (e.payload.phase === "idle") elapsed = 0
|
||||
phase = e.payload.phase
|
||||
}
|
||||
).then(fn => cleanup.push(fn))
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
place-items: center;
|
||||
aspect-ratio: 16 / 9;
|
||||
}
|
||||
.preview-box.empty { aspect-ratio: 16 / 9; }
|
||||
.preview-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -127,6 +127,7 @@
|
||||
<button
|
||||
class="tab"
|
||||
class:active={activeTab === t.id}
|
||||
aria-current={activeTab === t.id ? "true" : undefined}
|
||||
onclick={() => activeTab = t.id}
|
||||
>{t.label}</button>
|
||||
{/each}
|
||||
|
||||
@@ -6,12 +6,10 @@
|
||||
clip,
|
||||
trimStart = $bindable(),
|
||||
trimEnd = $bindable(),
|
||||
onAfterChange = () => {},
|
||||
}: {
|
||||
clip: { temp_path: string; duration_secs: number; width: number; height: number }
|
||||
trimStart: number
|
||||
trimEnd: number
|
||||
onAfterChange?: () => void
|
||||
} = $props()
|
||||
|
||||
let trackEl: HTMLDivElement | null = $state(null)
|
||||
@@ -60,7 +58,6 @@
|
||||
el.releasePointerCapture(e.pointerId)
|
||||
trimPreviewState.dragging = null
|
||||
trimPreviewState.path = null
|
||||
onAfterChange()
|
||||
}
|
||||
|
||||
function onTrackClick(e: PointerEvent) {
|
||||
@@ -73,7 +70,6 @@
|
||||
} else {
|
||||
trimEnd = Math.max(secs, trimStart + 0.1)
|
||||
}
|
||||
onAfterChange()
|
||||
}
|
||||
|
||||
let trimmedDuration = $derived(Math.max(0.1, trimEnd - trimStart))
|
||||
|
||||
Reference in New Issue
Block a user