feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面

This commit is contained in:
zhanjunhao
2026-11-04 19:59:06 +08:00
parent 1fd4e084b6
commit 15192c433b
576 changed files with 18075 additions and 18912 deletions
@@ -18,8 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React, { useState, useEffect } from 'react';
import { Tabs, TabPane } from '@douyinfe/semi-ui';
import { IconImage, IconVideo, IconBolt } from '@douyinfe/semi-icons';
import { Tabs, TabPane } from '@/components/ui';
import { IconImage, IconVideo, IconBolt } from '@/components/ui/icons';
import { useTranslation } from 'react-i18next';
import { useLocation, useNavigate } from 'react-router-dom';
import ImageGenerationTab from './AICreation/ImageGenerationTab';
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React, { useState, useEffect } from 'react';
import { Modal, Typography, Tag } from '@douyinfe/semi-ui';
import { Modal, Typography, Tag } from '@/components/ui';
import { useTranslation } from 'react-i18next';
const { Text } = Typography;
@@ -25,7 +25,7 @@ import {
Space,
Typography,
Tag,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import { Download, Copy, ImagePlus, Sparkles } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { showSuccess, showError } from '../../../../helpers';
@@ -172,7 +172,7 @@ const ImageDetailModal = ({
footer={
// wrap 必须开:三个中文按钮(用作参考图/在此基础上微调/下载图片)合计 ~370px,
// 而 modalWidth 是 viewportWidth-48,390px 屏上扣掉 content 的 padding 只剩 ~294px。
// Space 默认 wrap:false + .semi-modal-content{overflow:hidden},
// Space 默认 wrap:false + .ant-modal-content{overflow:hidden},
// 溢出部分向左溢出并被裁掉 —— 「用作参考图」整个点不到。
<Space wrap style={{ justifyContent: 'flex-end', width: '100%' }}>
{onUseAsReference && task.imageUrl && (
@@ -38,7 +38,7 @@ import {
Tag,
Toast,
Dropdown,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
Upload as UploadIcon,
ChevronDown,
@@ -701,10 +701,10 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
className='!rounded-2xl !shadow-lg !shadow-brand/20 hover:!shadow-xl hover:!shadow-brand/25 !transition-all'
style={{
background: !isFormValid()
? 'var(--semi-color-fill-1)'
? 'var(--ui-color-fill-1)'
: 'linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-primary) 52%, var(--brand-gradient-to) 100%)',
border: 'none',
color: !isFormValid() ? 'var(--semi-color-text-3)' : 'white',
color: !isFormValid() ? 'var(--ui-color-text-3)' : 'white',
height: '48px',
fontSize: '15px',
fontWeight: '700',
@@ -818,7 +818,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
</Tag>
)}
</div>
<div className='[&_.semi-select]:!rounded-2xl [&_.semi-select]:!border-white/[0.55] [&_.semi-select]:!bg-white/[0.55] [&_.semi-select]:!shadow-sm dark:[&_.semi-select]:!border-white/10 dark:[&_.semi-select]:!bg-white/[0.06] [&_.semi-select:hover]:!border-brand/30'>
<div className='[&_.ant-select]:!rounded-2xl [&_.ant-select]:!border-white/[0.55] [&_.ant-select]:!bg-white/[0.55] [&_.ant-select]:!shadow-sm dark:[&_.ant-select]:!border-white/10 dark:[&_.ant-select]:!bg-white/[0.06] [&_.ant-select:hover]:!border-brand/30'>
<ModelSelector
key={mode}
category={currentCategory}
@@ -916,7 +916,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
rows={3}
maxCount={2000}
showClear
className='[&_.semi-input-textarea]:!rounded-2xl [&_.semi-input-textarea]:!border-white/[0.55] [&_.semi-input-textarea]:!bg-white/[0.55] [&_.semi-input-textarea]:!shadow-inner dark:[&_.semi-input-textarea]:!border-white/10 dark:[&_.semi-input-textarea]:!bg-white/[0.06] [&_.semi-input-textarea:hover]:!border-brand/30 [&_.semi-input-textarea:focus]:!border-brand'
className='[&_.ant-input-textarea]:!rounded-2xl [&_.ant-input-textarea]:!border-white/[0.55] [&_.ant-input-textarea]:!bg-white/[0.55] [&_.ant-input-textarea]:!shadow-inner dark:[&_.ant-input-textarea]:!border-white/10 dark:[&_.ant-input-textarea]:!bg-white/[0.06] [&_.ant-input-textarea:hover]:!border-brand/30 [&_.ant-input-textarea:focus]:!border-brand'
/>
<div className='flex flex-wrap items-center gap-1.5 mt-2'>
@@ -1005,7 +1005,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
beforeUpload={() => false}
draggable
showUploadList={false}
className='[&_.semi-upload-drag]:!rounded-2xl [&_.semi-upload-drag]:!border-dashed [&_.semi-upload-drag]:!border-2 [&_.semi-upload-drag]:!border-white/[0.55] [&_.semi-upload-drag]:!bg-white/40 dark:[&_.semi-upload-drag]:!border-white/10 dark:[&_.semi-upload-drag]:!bg-white/[0.05] [&_.semi-upload-drag:hover]:!border-brand/40'
className='[&_.ant-upload-drag]:!rounded-2xl [&_.ant-upload-drag]:!border-dashed [&_.ant-upload-drag]:!border-2 [&_.ant-upload-drag]:!border-white/[0.55] [&_.ant-upload-drag]:!bg-white/40 dark:[&_.ant-upload-drag]:!border-white/10 dark:[&_.ant-upload-drag]:!bg-white/[0.05] [&_.ant-upload-drag:hover]:!border-brand/40'
dragMainText={
<div className='text-center py-3'>
<UploadIcon
@@ -1114,7 +1114,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
step={64}
suffix='px'
size='small'
className='w-full [&_.semi-input-number]:!rounded-lg'
className='w-full [&_.ant-input-number]:!rounded-lg'
/>
</Col>
<Col span={12}>
@@ -1126,7 +1126,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
step={64}
suffix='px'
size='small'
className='w-full [&_.semi-input-number]:!rounded-lg'
className='w-full [&_.ant-input-number]:!rounded-lg'
/>
</Col>
</Row>
@@ -1206,7 +1206,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
max={capability.maxN}
step={1}
size='small'
className='w-full [&_.semi-input-number]:!rounded-lg'
className='w-full [&_.ant-input-number]:!rounded-lg'
/>
</div>
)}
@@ -1222,7 +1222,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
placeholder={t('描述不希望出现的内容(可选)')}
rows={2}
maxCount={500}
className='[&_.semi-input-textarea]:!rounded-lg'
className='[&_.ant-input-textarea]:!rounded-lg'
/>
</div>
)}
@@ -1301,10 +1301,10 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
className='!rounded-2xl !shadow-lg !shadow-brand/20 hover:!shadow-xl hover:!shadow-brand/25 !transition-all'
style={{
background: !isFormValid()
? 'var(--semi-color-fill-1)'
? 'var(--ui-color-fill-1)'
: 'linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-primary) 52%, var(--brand-gradient-to) 100%)',
border: 'none',
color: !isFormValid() ? 'var(--semi-color-text-3)' : 'white',
color: !isFormValid() ? 'var(--ui-color-text-3)' : 'white',
height: '48px',
fontSize: '15px',
fontWeight: '700',
@@ -209,8 +209,8 @@ ImageTaskList/
### 依赖库
- **@douyinfe/semi-ui**:UI 组件库
- **@douyinfe/semi-icons**:图标库
- **antd**:UI 组件库
- **lucide-react**:图标库
- **react-i18next**:国际化
- **React Hooks**:状态管理
@@ -227,12 +227,12 @@ useCallback; // 事件处理函数优化
### CSS 变量
```css
--semi-color-primary // 主色
--semi-color-success // 成功色
--semi-color-warning // 警告色
--semi-color-danger // 危险色
--semi-color-bg-2 // 背景色
--semi-color-border // 边框色
--ui-color-primary // 主色
--ui-color-success // 成功色
--ui-color-warning // 警告色
--ui-color-danger // 危险色
--ui-color-bg-2 // 背景色
--ui-color-border // 边框色
```
### 自定义类
@@ -105,7 +105,7 @@
}
.search-input-enhanced:focus-within {
box-shadow: 0 0 0 2px rgba(var(--semi-color-primary-rgb), 0.2);
box-shadow: 0 0 0 2px rgba(var(--ui-color-primary-rgb), 0.2);
}
/* 标签组样式 */
@@ -132,64 +132,10 @@
}
/* Badge 样式覆盖 - 修复默认蓝色圆形背景 */
.image-task-list .semi-badge-primary.semi-badge-solid .semi-badge-count,
.image-task-list
.semi-badge-primary.semi-badge-solid.semi-badge-block
.semi-badge-count {
background: transparent !important;
background-image: none !important;
box-shadow: none !important;
}
/* 历史标题区域的 Badge 特定样式 */
.image-task-list .semi-badge.semi-badge-primary .semi-badge-count {
background: linear-gradient(
to right,
var(--brand-gradient-from),
var(--brand-gradient-to)
) !important;
border: none !important;
box-shadow: 0 2px 8px
color-mix(in srgb, var(--brand-primary) 30%, transparent) !important;
}
/* 图片生成页局部控件留白:避免搜索/筛选内容贴住玻璃卡片边框 */
.image-task-list .image-task-search.semi-input-wrapper {
padding-left: 10px !important;
padding-right: 8px !important;
border: 1px solid rgb(255 255 255 / 0.5) !important;
background: rgb(255 255 255 / 0.48) !important;
backdrop-filter: blur(14px);
}
.dark .image-task-list .image-task-search.semi-input-wrapper {
border-color: rgb(255 255 255 / 0.1) !important;
background: rgb(255 255 255 / 0.06) !important;
}
.image-task-list .image-task-search .semi-input-prefix {
margin-right: 6px !important;
}
.image-task-list .image-task-search .semi-input {
padding-left: 2px !important;
}
.image-task-list .image-task-filter-select.semi-select {
padding-left: 8px !important;
border: 1px solid rgb(255 255 255 / 0.5) !important;
background: rgb(255 255 255 / 0.48) !important;
backdrop-filter: blur(14px);
}
.dark .image-task-list .image-task-filter-select.semi-select {
border-color: rgb(255 255 255 / 0.1) !important;
background: rgb(255 255 255 / 0.06) !important;
}
.image-task-list .image-task-filter-select .semi-select-selection {
padding-left: 2px !important;
}
.image-task-list .image-task-group-header {
margin-left: -4px;
@@ -205,16 +151,5 @@
}
/* ===== 触屏命中区兜底 ===== */
/* 卡片操作按钮统一 height:24px(Semi size='small'),在触屏上低于 32px 的下限,
且十几个按钮彼此相邻、又叠在图片上,误触率很高。
这里不改视觉高度(改了会撑破密集网格),只用伪元素把可点区域向外扩到 32px。 */
@media (hover: none) {
.image-task-card .semi-button {
position: relative;
}
.image-task-card .semi-button::after {
content: '';
position: absolute;
inset: -5px -3px;
}
}
@@ -28,7 +28,7 @@ import {
Progress,
Popover,
Select,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
RefreshCw,
Trash2,
@@ -30,7 +30,7 @@ import {
Tag,
Tooltip,
Upload,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
Check,
ExternalLink,
@@ -210,7 +210,7 @@ const PortraitAssetPicker = ({
<Empty title={t('真人人像素材未启用')} />
) : (
<div className='flex flex-col gap-5'>
<div className='flex flex-col gap-3 border-b border-solid border-semi-color-border pb-5'>
<div className='flex flex-col gap-3 border-b border-solid border-ui-color-border pb-5'>
<div className='flex gap-2'>
<Input
value={name}
@@ -256,7 +256,7 @@ const PortraitAssetPicker = ({
>
{item.status}
</Tag>
<span className='text-xs text-semi-color-text-2'>
<span className='text-xs text-ui-color-text-2'>
{item.id.slice(-6)}
</span>
</span>
@@ -288,7 +288,7 @@ const PortraitAssetPicker = ({
{portrait.session &&
['pending', 'confirming'].includes(portrait.session.status) && (
<div className='flex flex-col items-center gap-3 border-y border-solid border-semi-color-border py-5'>
<div className='flex flex-col items-center gap-3 border-y border-solid border-ui-color-border py-5'>
<QRCodeSVG value={portrait.session.h5_url} size={184} />
<Progress
percent={Math.round((secondsLeft / 120) * 100)}
@@ -331,13 +331,13 @@ const PortraitAssetPicker = ({
</Upload>
)}
<div className='flex flex-col divide-y divide-semi-color-border'>
<div className='flex flex-col divide-y divide-ui-color-border'>
{assets.map((asset) => (
<div
key={asset.id}
className='flex min-h-[64px] items-center gap-3 py-3'
>
<div className='h-12 w-12 shrink-0 overflow-hidden rounded-[6px] bg-semi-color-fill-0'>
<div className='h-12 w-12 shrink-0 overflow-hidden rounded-[6px] bg-ui-color-fill-0'>
{asset.preview_url && (
<img
src={asset.preview_url}
@@ -30,7 +30,7 @@ import {
Tag,
Typography,
Tooltip,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
ChevronLeft,
ChevronRight,
@@ -373,10 +373,10 @@ const VideoInputPanel = ({
style={{
marginTop: '12px',
padding: '12px',
backgroundColor: 'var(--semi-color-fill-0)',
backgroundColor: 'var(--ui-color-fill-0)',
borderRadius: '8px',
fontSize: '13px',
border: '1px solid var(--semi-color-border)',
border: '1px solid var(--ui-color-border)',
}}
>
<div
@@ -411,7 +411,7 @@ const VideoInputPanel = ({
<CreditCard size={14} />
{t('单价')}
</Text>
<Text strong style={{ color: 'var(--semi-color-danger)' }}>
<Text strong style={{ color: 'var(--ui-color-danger)' }}>
{convertUSDToCurrency(Number(modelInfo.price || 0), 6)}
</Text>
</div>
@@ -462,9 +462,9 @@ const VideoInputPanel = ({
style={{
marginTop: '12px',
padding: '12px',
backgroundColor: 'var(--semi-color-fill-0)',
backgroundColor: 'var(--ui-color-fill-0)',
borderRadius: '8px',
border: '1px solid var(--semi-color-border)',
border: '1px solid var(--ui-color-border)',
}}
>
<Text type='tertiary' size='small'>
@@ -590,9 +590,9 @@ const VideoInputPanel = ({
justifyContent: 'center',
gap: '12px',
padding: '12px',
backgroundColor: 'var(--semi-color-fill-0)',
backgroundColor: 'var(--ui-color-fill-0)',
borderRadius: '8px',
border: '1px solid var(--semi-color-border)',
border: '1px solid var(--ui-color-border)',
}}
>
<img
@@ -668,7 +668,7 @@ const VideoInputPanel = ({
dragSubText={t('支持 JPG、PNG 格式')}
showUploadList={false}
style={{
border: '1px dashed var(--semi-color-border)',
border: '1px dashed var(--ui-color-border)',
borderRadius: '8px',
padding: '24px',
}}
@@ -18,8 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React, { useEffect } from 'react';
import { Card, Typography, Space, Tag } from '@douyinfe/semi-ui';
import { IconCreditCard, IconTickCircle } from '@douyinfe/semi-icons';
import { Card, Typography, Space, Tag } from '@/components/ui';
import { IconCreditCard, IconTickCircle } from '@/components/ui/icons';
import { useTranslation } from 'react-i18next';
import ModelSelector from '../../../../../components/common/ModelSelector';
import { MODEL_CATEGORY } from '../../../../../constants';
@@ -137,7 +137,7 @@ const VideoModelPanel = ({
<Text type='tertiary'>{t('单价')}</Text>
<Text
strong
style={{ fontSize: '18px', color: 'var(--semi-color-primary)' }}
style={{ fontSize: '18px', color: 'var(--ui-color-primary)' }}
>
{convertUSDToCurrency(Number(modelInfo?.price || 0), 6)}
</Text>
@@ -27,7 +27,7 @@ import {
Typography,
Spin,
Tooltip,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
Play,
Square,
@@ -238,8 +238,8 @@ const VideoPreviewPanel = ({
display: 'flex',
alignItems: 'center',
gap: '12px',
backgroundColor: 'var(--semi-color-bg-1)',
borderBottom: '1px solid var(--semi-color-border)',
backgroundColor: 'var(--ui-color-bg-1)',
borderBottom: '1px solid var(--ui-color-border)',
flexShrink: 0,
}}
>
@@ -430,7 +430,7 @@ const VideoPreviewPanel = ({
style={{
marginTop: windowWidth > 768 ? '24px' : '16px',
padding: windowWidth > 768 ? '16px' : '12px',
backgroundColor: 'var(--semi-color-fill-0)',
backgroundColor: 'var(--ui-color-fill-0)',
borderRadius: '8px',
textAlign: 'left',
}}
@@ -27,7 +27,7 @@ import {
Switch,
Space,
Typography,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import { useTranslation } from 'react-i18next';
import { useIsMobile } from '../../../../../hooks/common/useIsMobile';
import ModelSelector from '../../../../../components/common/ModelSelector';
@@ -28,7 +28,7 @@ import {
Modal,
Badge,
Select,
} from '@douyinfe/semi-ui';
} from '@/components/ui';
import {
ChevronUp,
ChevronDown,
@@ -328,8 +328,8 @@ const VideoTaskQueue = ({
left: 0,
right: 0,
height: '40px',
backgroundColor: 'var(--semi-color-bg-1)',
borderTop: '1px solid var(--semi-color-border)',
backgroundColor: 'var(--ui-color-bg-1)',
borderTop: '1px solid var(--ui-color-border)',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
@@ -358,8 +358,8 @@ const VideoTaskQueue = ({
left: 0,
right: 0,
height: `${queueHeight}px`,
backgroundColor: 'var(--semi-color-bg-0)',
borderTop: '1px solid var(--semi-color-border)',
backgroundColor: 'var(--ui-color-bg-0)',
borderTop: '1px solid var(--ui-color-border)',
transition: 'bottom 0.3s',
display: 'flex',
flexDirection: 'column',
@@ -370,7 +370,7 @@ const VideoTaskQueue = ({
<div
style={{
padding: !isCompact ? '12px 16px' : '8px 12px',
borderBottom: '1px solid var(--semi-color-border)',
borderBottom: '1px solid var(--ui-color-border)',
display: 'flex',
justifyContent: 'space-between',
alignItems: 'center',
@@ -205,14 +205,14 @@ const VideoGenerationTab = () => {
? '500px'
: 'auto',
flexShrink: layoutConfig.direction === 'row' ? 0 : 1,
backgroundColor: 'var(--semi-color-bg-1)',
backgroundColor: 'var(--ui-color-bg-1)',
borderRight:
layoutConfig.direction === 'row'
? '1px solid var(--semi-color-border)'
? '1px solid var(--ui-color-border)'
: 'none',
borderBottom:
layoutConfig.direction === 'column'
? '1px solid var(--semi-color-border)'
? '1px solid var(--ui-color-border)'
: 'none',
display: 'flex',
flexDirection: 'column',
@@ -252,7 +252,7 @@ const VideoGenerationTab = () => {
className='app-scrollbar'
style={{
height: '100%',
backgroundColor: 'var(--semi-color-bg-0)',
backgroundColor: 'var(--ui-color-bg-0)',
padding: windowWidth > 768 ? '16px' : '12px',
overflow: 'auto',
}}
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
*/
import React from 'react';
import { Card, Empty } from '@douyinfe/semi-ui';
import { Card, Empty } from '@/components/ui';
import { useTranslation } from 'react-i18next';
import { IllustrationConstruction } from '../../../../components/common/illustrations';
+4 -5
View File
@@ -17,11 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import React, { useContext } from 'react';
import React from 'react';
import { Navigate, useLocation, useNavigate } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
import { BrainCircuit, Image, Video } from 'lucide-react';
import { StatusContext } from '../../context/Status';
import { useMarquee } from '../../hooks/common/useMarquee';
import PageBackground from '../../components/common/PageBackground';
import TextModel from './components/TextModel';
import ImageGeneration from './components/ImageGeneration';
@@ -120,11 +120,10 @@ const MobileBottomNav = ({ currentPath, navigate, isAvailable }) => {
const ExperienceCenter = () => {
const location = useLocation();
const navigate = useNavigate();
const [statusState] = useContext(StatusContext);
const { ready, orgOnly, isAvailable, defaultPath } = useExperienceModules();
// 跑马灯公告是否存在(用于动态计算顶部间距)
const hasMarquee = !!statusState?.status?.marquee_content?.trim();
const { visible: hasMarquee } = useMarquee();
// 默认落地:进第一个对当前用户可用的子页;一个都没有时,org_only 用户回企业
// 空间,其余用户去默认登录落地页。兜底目标都不在体验中心内,不会重定向循环。
@@ -165,7 +164,7 @@ const ExperienceCenter = () => {
return (
<div
className={`flex flex-col md:flex-row h-screen bg-[var(--surface-bg-base)] transition-colors duration-300 overflow-hidden ${hasMarquee ? 'pt-[96px] sm:pt-[104px]' : 'pt-14 sm:pt-16'}`}
className={`flex flex-col md:flex-row h-screen bg-[var(--surface-bg-base)] overflow-hidden ${hasMarquee ? 'pt-[91px] md:pt-[107px]' : 'pt-14 md:pt-[72px]'}`}
>
{/* Sidebar - 桌面端 */}
<div className='hidden md:block'>