媒体生成百分比显示
This commit is contained in:
@@ -31,6 +31,8 @@ interface UploadSelectorProps {
|
||||
maxAudioDuration?: number;
|
||||
usedAudioDuration?: number;
|
||||
hideLimitHint?: boolean;
|
||||
/** 创作类型:'image' 时隐藏真人素材库/虚拟素材库选项 */
|
||||
mediaType?: string;
|
||||
}
|
||||
|
||||
const UploadSelector: React.FC<UploadSelectorProps> = ({
|
||||
@@ -54,6 +56,7 @@ const UploadSelector: React.FC<UploadSelectorProps> = ({
|
||||
maxAudioDuration,
|
||||
usedAudioDuration,
|
||||
hideLimitHint,
|
||||
mediaType,
|
||||
}) => {
|
||||
const fileInputRef = useRef<HTMLInputElement>(null);
|
||||
const [portraitPickerOpen, setPortraitPickerOpen] = useState(false);
|
||||
@@ -146,46 +149,50 @@ const UploadSelector: React.FC<UploadSelectorProps> = ({
|
||||
<DatabaseOutlined style={{ fontSize: 14, color: '#64748b' }} />
|
||||
<span style={{ fontSize: 14, color: '#334155' }}>从资产中选择</span>
|
||||
</div>
|
||||
<div
|
||||
onClick={() => openPortraitPicker('real_person')}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 12,
|
||||
padding: '8px 16px',
|
||||
cursor: 'pointer',
|
||||
transition: 'background 0.15s ease',
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.background = '#f1f5f9';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
e.currentTarget.style.background = 'transparent';
|
||||
}}
|
||||
>
|
||||
<UserOutlined style={{ fontSize: 14, color: '#64748b' }} />
|
||||
<span style={{ fontSize: 14, color: '#334155' }}>真人素材库</span>
|
||||
</div>
|
||||
<div
|
||||
onClick={() => openPortraitPicker('aigc_virtual')}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 12,
|
||||
padding: '8px 16px',
|
||||
cursor: 'pointer',
|
||||
transition: 'background 0.15s ease',
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.background = '#f1f5f9';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
e.currentTarget.style.background = 'transparent';
|
||||
}}
|
||||
>
|
||||
<TeamOutlined style={{ fontSize: 14, color: '#64748b' }} />
|
||||
<span style={{ fontSize: 14, color: '#334155' }}>虚拟素材库</span>
|
||||
</div>
|
||||
{mediaType !== 'image' && (
|
||||
<div
|
||||
onClick={() => openPortraitPicker('real_person')}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 12,
|
||||
padding: '8px 16px',
|
||||
cursor: 'pointer',
|
||||
transition: 'background 0.15s ease',
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.background = '#f1f5f9';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
e.currentTarget.style.background = 'transparent';
|
||||
}}
|
||||
>
|
||||
<UserOutlined style={{ fontSize: 14, color: '#64748b' }} />
|
||||
<span style={{ fontSize: 14, color: '#334155' }}>真人素材库</span>
|
||||
</div>
|
||||
)}
|
||||
{mediaType !== 'image' && (
|
||||
<div
|
||||
onClick={() => openPortraitPicker('aigc_virtual')}
|
||||
style={{
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: 12,
|
||||
padding: '8px 16px',
|
||||
cursor: 'pointer',
|
||||
transition: 'background 0.15s ease',
|
||||
}}
|
||||
onMouseEnter={(e) => {
|
||||
e.currentTarget.style.background = '#f1f5f9';
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
e.currentTarget.style.background = 'transparent';
|
||||
}}
|
||||
>
|
||||
<TeamOutlined style={{ fontSize: 14, color: '#64748b' }} />
|
||||
<span style={{ fontSize: 14, color: '#334155' }}>虚拟素材库</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user