This commit is contained in:
2026-07-22 11:10:32 +08:00
parent a63039c146
commit 1cb957d20d
3 changed files with 140 additions and 26 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -28,7 +28,7 @@
}
})();
</script>
<script type="module" crossorigin src="/assets/index-DZg1zviY.js"></script>
<script type="module" crossorigin src="/assets/index-hoIjy2R3.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-Bsz_Xon-.css">
</head>
<body>
+138 -24
View File
@@ -3893,6 +3893,12 @@ const AIChatPage: React.FC = () => {
}}>
{selectedRatio === 'auto' ? '智能' : selectedRatio} · {selectedResolution === '1K' ? '1K标清' : selectedResolution === '2K' ? '2K高清' : '4K超清'} · {width}×{height}
</Text>
{multiGenerationEnabled && (
<>
<span style={{ width: 1, height: 14, background: '#E7EAF0' }} />
<span style={{ fontSize: 13, fontWeight: 600, color: '#8b5cf6' }}>{generationCount}</span>
</>
)}
<CaretDownOutlined style={{ fontSize: 10, color: '#8b5cf6', marginLeft: 'auto' }} />
</button>
@@ -4153,6 +4159,57 @@ const AIChatPage: React.FC = () => {
</span>
</div>
</div>
{/* 生成数量 */}
{multiGenerationEnabled && (
<div style={{ marginTop: 16, paddingTop: 16, borderTop: '1px solid #f0f0f5' }}>
<Text style={{
display: 'block',
marginBottom: 8,
fontSize: 12,
fontWeight: 500,
color: '#667085',
}}>
</Text>
<div style={{ display: 'flex', gap: 6 }}>
{Array.from({ length: effectiveMaxGenerationCount }, (_, i) => i + 1).map((num) => (
<button
key={num}
onClick={() => setGenerationCount(num)}
disabled={effectiveMaxGenerationCount <= 1}
style={{
flex: 1,
height: 42,
borderRadius: 6,
border: generationCount === num
? '2px solid #8b5cf6'
: '1px solid #E7EAF0',
backgroundColor: generationCount === num
? '#8b5cf6'
: '#FFFFFF',
cursor: effectiveMaxGenerationCount <= 1 ? 'not-allowed' : 'pointer',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
transition: 'all 0.2s',
opacity: effectiveMaxGenerationCount <= 1 ? 0.5 : 1,
}}
>
<span style={{
fontSize: 14,
fontWeight: 600,
color: generationCount === num
? '#fff'
: '#475467',
}}>
{num}
</span>
</button>
))}
</div>
</div>
)}
</div>
)}
</div>
@@ -4201,6 +4258,12 @@ const AIChatPage: React.FC = () => {
<span style={{ fontSize: 13, fontWeight: 600, color: '#2f3440' }}>{videoResolution?.toUpperCase?.() || videoResolution}</span>
<span style={{ width: 1, height: 14, background: '#E7EAF0' }} />
<span style={{ fontSize: 13, fontWeight: 600, color: '#2f3440' }}>{videoDuration}</span>
{multiGenerationEnabled && (
<>
<span style={{ width: 1, height: 14, background: '#E7EAF0' }} />
<span style={{ fontSize: 13, fontWeight: 600, color: '#8b5cf6' }}>{generationCount}</span>
</>
)}
<CaretDownOutlined style={{ fontSize: 10, color: '#667085', marginLeft: 'auto' }} />
</button>
@@ -4351,17 +4414,34 @@ const AIChatPage: React.FC = () => {
display: 'flex',
alignItems: 'center',
gap: 4,
padding: '4px 12px',
backgroundColor: '#F6F7FA',
borderRadius: 6,
}}>
<span style={{ fontSize: 14, fontWeight: 600, color: '#667085' }}>
{videoDuration}
</span>
<input
type="number"
min={Math.min(...engineOptions.durations)}
max={Math.max(...engineOptions.durations)}
value={videoDuration}
onChange={(e) => {
const v = Number(e.target.value);
if (!isNaN(v)) {
const clamped = Math.min(Math.max(v, Math.min(...engineOptions.durations)), Math.max(...engineOptions.durations));
setVideoDuration(clamped);
}
}}
style={{
width: 56,
height: 32,
textAlign: 'center',
border: '1px solid #E7EAF0',
borderRadius: 6,
fontSize: 14,
fontWeight: 600,
color: '#2f3440',
outline: 'none',
}}
/>
<span style={{ fontSize: 12, color: '#98a2b3' }}></span>
</div>
</div>
</div>
{/* 选择分辨率 */}
@@ -4410,6 +4490,57 @@ const AIChatPage: React.FC = () => {
))}
</div>
</div>
{/* 生成数量 */}
{multiGenerationEnabled && (
<div style={{ marginTop: 16, paddingTop: 16, borderTop: '1px solid #f0f0f5' }}>
<Text style={{
display: 'block',
marginBottom: 8,
fontSize: 12,
fontWeight: 500,
color: '#667085',
}}>
</Text>
<div style={{ display: 'flex', gap: 6 }}>
{Array.from({ length: effectiveMaxGenerationCount }, (_, i) => i + 1).map((num) => (
<button
key={num}
onClick={() => setGenerationCount(num)}
disabled={effectiveMaxGenerationCount <= 1}
style={{
flex: 1,
height: 42,
borderRadius: 6,
border: generationCount === num
? '2px solid #8b5cf6'
: '1px solid #E7EAF0',
backgroundColor: generationCount === num
? '#8b5cf6'
: '#FFFFFF',
cursor: effectiveMaxGenerationCount <= 1 ? 'not-allowed' : 'pointer',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
transition: 'all 0.2s',
opacity: effectiveMaxGenerationCount <= 1 ? 0.5 : 1,
}}
>
<span style={{
fontSize: 14,
fontWeight: 600,
color: generationCount === num
? '#fff'
: '#475467',
}}>
{num}
</span>
</button>
))}
</div>
</div>
)}
</div>
)}
</div>
@@ -4417,23 +4548,6 @@ const AIChatPage: React.FC = () => {
</Space>
<div style={{ display: 'flex', alignItems: 'center', gap: 12, flexShrink: 0 }}>
{multiGenerationEnabled && (
<div style={{ display: 'flex', alignItems: 'center', gap: 6, whiteSpace: 'nowrap', height: 34, padding: '0 8px 0 12px', borderRadius: 11, background: 'rgba(255, 255, 255, 0.92)', border: '1px solid rgba(231, 234, 240, 0.92)', boxShadow: '0 4px 12px rgba(47, 52, 64, 0.04)' }}>
<Text style={{ fontSize: 13, color: '#667085', fontWeight: 600 }}></Text>
<Select
value={generationCount}
onChange={(value) => setGenerationCount(Number(value || 1))}
disabled={effectiveMaxGenerationCount <= 1}
size="small"
variant="borderless"
style={{ width: 68 }}
options={Array.from({ length: effectiveMaxGenerationCount }, (_, index) => ({
value: index + 1,
label: `${index + 1}`,
}))}
/>
</div>
)}
<div style={{ display: 'flex', alignItems: 'center', gap: 6, color: '#667085', whiteSpace: 'nowrap', height: 34, padding: '0 12px', borderRadius: 11, background: 'rgba(255, 255, 255, 0.92)', border: '1px solid rgba(231, 234, 240, 0.92)', boxShadow: '0 4px 12px rgba(47, 52, 64, 0.04)' }}>
<Text style={{ fontSize: 13, color: '#667085', fontWeight: 600 }}></Text>
<Text style={{ fontSize: 13, color: '#2f3440', fontWeight: 800 }}>{getEstimatedCredits()}</Text>