diff --git a/backend/internal/service/provider.go b/backend/internal/service/provider.go index 6b8905674..c12870d2e 100644 --- a/backend/internal/service/provider.go +++ b/backend/internal/service/provider.go @@ -1044,11 +1044,6 @@ func newAPIChannel2VideoBody(input canvasGenerationInput) (map[string]interface{ if secondsErr != nil || seconds < 1 { seconds = 6 } - if len(images) > 1 && seconds > 10 { - seconds = 10 - } else if seconds > 15 { - seconds = 15 - } ratio := normalizeNewAPIChannel2Ratio(input.Config.Size, modelName) resolution := normalizeNewAPIChannel2Resolution(input.Config.VQuality, modelName) body := map[string]interface{}{ @@ -2170,9 +2165,6 @@ func normalizeXAIVideoDuration(value string) int { if err != nil || duration <= 0 { return 6 } - if duration > 15 { - return 15 - } return duration } @@ -2238,24 +2230,14 @@ func normalizeSeedanceDuration(value string) int { return -1 } seconds, err := strconv.Atoi(strings.TrimSpace(value)) - if err != nil || seconds == 0 { - seconds = 5 - } - if seconds < 4 { - return 4 - } - if seconds > 15 { - return 15 + if err != nil || seconds <= 0 { + return 5 } return seconds } func normalizeSeedanceVideosDuration(value string) int { - seconds := normalizeSeedanceDuration(value) - if seconds < 4 { - return 5 - } - return seconds + return normalizeSeedanceDuration(value) } func normalizeSeedanceRatio(value string) string { diff --git a/backend/internal/service/provider_test.go b/backend/internal/service/provider_test.go index 6c108aa4e..dd262bc4f 100644 --- a/backend/internal/service/provider_test.go +++ b/backend/internal/service/provider_test.go @@ -527,7 +527,7 @@ func TestXAIVideoBodyUsesOfficialImageShapeAndNormalizesSettings(t *testing.T) { if err != nil { t.Fatalf("grokVideoBody() error = %v", err) } - if body["duration"] != 15 || body["aspect_ratio"] != "9:16" || body["resolution"] != "1080p" { + if body["duration"] != 20 || body["aspect_ratio"] != "9:16" || body["resolution"] != "1080p" { t.Fatalf("xAI settings = %#v", body) } image, ok := body["image"].(map[string]interface{}) diff --git a/web/src/components/canvas/canvas-image-settings-popover.tsx b/web/src/components/canvas/canvas-image-settings-popover.tsx index a0cc358dc..818fdf7fa 100644 --- a/web/src/components/canvas/canvas-image-settings-popover.tsx +++ b/web/src/components/canvas/canvas-image-settings-popover.tsx @@ -103,10 +103,10 @@ function ImageSettingsPortal({ width, left: Math.max(margin, Math.min(window.innerWidth - width - margin, left)), ...(topPlacement ? { bottom: window.innerHeight - buttonRect.top + gap, maxHeight: Math.max(260, buttonRect.top - margin * 2) } : { top: buttonRect.bottom + gap, maxHeight: Math.max(260, window.innerHeight - buttonRect.bottom - margin * 2) }), - background: theme.spatial.elevated, + background: theme.canvas.background, border: `1px solid ${theme.toolbar.border}`, borderRadius: 10, - boxShadow: `0 24px 72px ${theme.spatial.shadow}, inset 0 1px 0 rgba(255,255,255,.08)`, + boxShadow: `0 24px 72px ${theme.spatial.shadow}`, padding: 12, overflowY: "auto", color: theme.node.text, diff --git a/web/src/components/canvas/canvas-video-settings-popover.tsx b/web/src/components/canvas/canvas-video-settings-popover.tsx index 82cba0c5c..82612ccd9 100644 --- a/web/src/components/canvas/canvas-video-settings-popover.tsx +++ b/web/src/components/canvas/canvas-video-settings-popover.tsx @@ -91,10 +91,10 @@ function VideoSettingsPortal({ width, left: Math.max(margin, Math.min(window.innerWidth - width - margin, left)), ...(placeAbove ? { bottom: window.innerHeight - buttonRect.top + gap, maxHeight: Math.max(260, topSpace) } : { top: buttonRect.bottom + gap, maxHeight: Math.max(260, bottomSpace) }), - background: theme.spatial.elevated, + background: theme.canvas.background, border: `1px solid ${theme.toolbar.border}`, borderRadius: 10, - boxShadow: `0 24px 72px ${theme.spatial.shadow}, inset 0 1px 0 rgba(255,255,255,.08)`, + boxShadow: `0 24px 72px ${theme.spatial.shadow}`, padding: 12, overflowY: "auto", color: theme.node.text, diff --git a/web/src/components/image-settings-panel.tsx b/web/src/components/image-settings-panel.tsx index 19832796c..a364a63b6 100644 --- a/web/src/components/image-settings-panel.tsx +++ b/web/src/components/image-settings-panel.tsx @@ -121,8 +121,8 @@ export function ImageSettingsPanel({ config, onConfigChange, theme, showTitle = ))} -
+
{secondOptions.map((value) => ( onConfigChange("videoSeconds", String(value))}> {value}s ))} + onConfigChange("videoSeconds", String(value))} />
@@ -148,13 +149,13 @@ function SeedanceVideoSettingsPanel({ config, onConfigChange, theme, showTitle, @@ -162,16 +163,17 @@ function SeedanceVideoSettingsPanel({ config, onConfigChange, theme, showTitle,
-
+
{seedanceDurationOptions.map((value) => ( onConfigChange("videoSeconds", String(value))}> {value}s ))} + onConfigChange("videoSeconds", String(value))} />
-
+
onConfigChange("videoGenerateAudio", String(checked))} /> onConfigChange("videoWatermark", String(checked))} />
@@ -209,7 +211,7 @@ export function normalizeVideoResolutionValue(value: string) { function OptionPill({ selected, disabled = false, theme, onClick, children }: { selected: boolean; disabled?: boolean; theme: CanvasTheme; onClick: () => void; children: ReactNode }) { return ( - ); @@ -228,7 +230,7 @@ function SettingGroup({ title, color, children }: { title: string; color: string function DimensionInput({ prefix, value, disabled, theme, onChange }: { prefix: string; value: number; disabled: boolean; theme: CanvasTheme; onChange: (value: number | null) => void }) { return ( -