diff --git a/web/src/components/Toolbar.tsx b/web/src/components/Toolbar.tsx index 6c4f484..6db38c0 100644 --- a/web/src/components/Toolbar.tsx +++ b/web/src/components/Toolbar.tsx @@ -88,6 +88,11 @@ const ratioItems = [ { label: '9:16', value: '9:16' as AspectRatio }, ]; +const keyframeRatioItems = [ + { label: '自适应', value: 'adaptive' as AspectRatio }, + ...ratioItems, +]; + const durationItems = Array.from({ length: 12 }, (_, i) => { const v = i + 4; return { label: `${v}s`, value: String(v) }; @@ -175,25 +180,18 @@ export function Toolbar() { /> {/* Aspect ratio */} - {isKeyframe ? ( - - ) : ( - setAspectRatio(v as AspectRatio)} - minWidth={100} - trigger={ - - } - /> - )} + setAspectRatio(v as AspectRatio)} + minWidth={100} + trigger={ + + } + /> {/* Duration */} ((set, get) => ({ mode, prevReferences: state.references, references: [], + aspectRatio: 'adaptive', duration: 5, }); } else { diff --git a/web/src/types/index.ts b/web/src/types/index.ts index a1b81ff..f66b297 100644 --- a/web/src/types/index.ts +++ b/web/src/types/index.ts @@ -1,6 +1,6 @@ export type CreationMode = 'universal' | 'keyframe'; export type ModelOption = 'seedance_2.0' | 'seedance_2.0_fast'; -export type AspectRatio = '16:9' | '9:16' | '1:1' | '21:9' | '4:3' | '3:4'; +export type AspectRatio = '16:9' | '9:16' | '1:1' | '21:9' | '4:3' | '3:4' | 'adaptive'; export type Duration = 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15; export type GenerationType = 'video' | 'image'; export type UserRole = 'super_admin' | 'team_admin' | 'member';