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:
+24
-5
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user