Put default video length on the main Settings panel and let Studio save it.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 19:47:58 -05:00
co-authored by Cursor
parent 86e23499a9
commit e790c9bff7
3 changed files with 44 additions and 23 deletions
+24 -5
View File
@@ -1012,10 +1012,20 @@
<div v-if="studioMode === 'video'" class="space-y-4">
<div class="grid grid-cols-1 items-start gap-3 sm:grid-cols-2">
<DurationField
v-model="duration"
label="Duration"
/>
<div>
<DurationField
v-model="duration"
label="Duration"
/>
<button
type="button"
class="mt-2 text-[11px] text-amber-200/90 hover:text-amber-100"
title="Save this length as the default for new video jobs"
@click="saveDurationAsDefault"
>
Save {{ duration }}s as default
</button>
</div>
<div>
<Thumbwheel
v-model="cfg"
@@ -2302,7 +2312,8 @@ import {
VIDEO_DURATION_DEFAULT,
clampVideoDuration,
clipPartDuration,
defaultVideoDurationPref
defaultVideoDurationPref,
setDefaultVideoDurationPref
} from '~/utils/videoDuration'
const runtimeConfig = useRuntimeConfig()
@@ -2579,6 +2590,8 @@ function selectStudioKind(kind: 'video' | 'image') {
studioMode.value = 'editv2'
outputFocus.value = 'edit'
}
outputFocus.value = 'edit'
}
function applyStudioQueryFromRoute() {
const studio = String(route.query.studio || '').toLowerCase()
@@ -4109,6 +4122,12 @@ function clampDuration(value: number) {
return clampVideoDuration(value, defaultVideoDurationPref())
}
function saveDurationAsDefault() {
const next = setDefaultVideoDurationPref(duration.value)
duration.value = next
toast(`Default video length set to ${next}s`)
}
function clampCfg(value: number) {
return clampVideoCfg(value, turbo.value ? CFG_TURBO : CFG_QUALITY)
}