Skip to content

Commit b647b6c

Browse files
authored
fix: properly sync model selection dropdown in video generation UI (mudler#8680)
fix(video): initialize model selection dropdown with current model value The Alpine.js link variable was starting empty, causing the dropdown selection to not reflect the currently selected model. This fix initializes the link variable with the current model value from the template (e.g., video/{{.Model}}), following the same pattern used in image.html. Signed-off-by: localai-bot <localai-bot@users.noreply.github.com> Co-authored-by: localai-bot <localai-bot@users.noreply.github.com>
1 parent c187b16 commit b647b6c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

core/http/views/video.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<div class="flex items-center justify-between gap-2">
2121
<label class="text-xs font-medium text-[var(--color-text-secondary)] uppercase tracking-wide flex-shrink-0">Model</label>
2222
</div>
23-
<select x-data="{ link : '' }" x-model="link" x-init="$watch('link', value => window.location = link)"
23+
<select x-data="{ link : '{{if .Model}}video/{{.Model}}{{end}}' }" x-model="link" x-init="$watch('link', value => window.location = link)"
2424
id="model-select"
2525
class="input w-full p-1.5 text-xs"
2626
>

0 commit comments

Comments
 (0)