feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -17,10 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Download as ActionDownload,
|
||||
Copy as ActionCopy,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { copyText } from '../../../../helpers/clipboard';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Modal, Image, Button, Space, Typography, Tag } from '@/components/ui';
|
||||
import { Download, Copy, ImagePlus, Sparkles } from 'lucide-react';
|
||||
import { ImagePlus, Sparkles } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showSuccess, showError } from '../../../../helpers';
|
||||
|
||||
@@ -166,7 +170,7 @@ const ImageDetailModal = ({
|
||||
)}
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={handleDownload}
|
||||
disabled={!task.imageUrl}
|
||||
>
|
||||
@@ -258,7 +262,7 @@ const ImageDetailModal = ({
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Copy size={14} />}
|
||||
icon={<ActionCopy size={14} />}
|
||||
onClick={handleCopyPrompt}
|
||||
className='!text-gray-500 hover:!text-brand-deep dark:hover:!text-brand-from'
|
||||
>
|
||||
|
||||
@@ -17,6 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Wallet as ActionWallet,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
ChevronDown as ActionChevronDown,
|
||||
ChevronUp as ActionChevronUp,
|
||||
History as ActionHistory,
|
||||
Settings as ActionSettings,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -31,17 +39,11 @@ import {
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
Command,
|
||||
History as HistoryIcon,
|
||||
Image as ImageIcon,
|
||||
Lock,
|
||||
RotateCcw,
|
||||
Settings,
|
||||
Sparkles,
|
||||
Type,
|
||||
Wallet,
|
||||
} from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -364,7 +366,7 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
theme='solid'
|
||||
size='large'
|
||||
block
|
||||
icon={<Wallet size={16} />}
|
||||
icon={<ActionWallet size={16} />}
|
||||
onClick={() => navigate('/console/topup')}
|
||||
className='!rounded-2xl'
|
||||
style={{ height: '48px', fontSize: '15px', fontWeight: 700 }}
|
||||
@@ -569,7 +571,7 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
<div className='flex items-center gap-1'>
|
||||
{!formBodyHidden && (
|
||||
<Button
|
||||
icon={<RotateCcw size={12} />}
|
||||
icon={<ActionRotateCcw size={12} />}
|
||||
size='small'
|
||||
theme='borderless'
|
||||
onClick={handleReset}
|
||||
@@ -582,9 +584,9 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
<Button
|
||||
icon={
|
||||
mobileCollapsed ? (
|
||||
<ChevronDown size={14} />
|
||||
<ActionChevronDown size={14} />
|
||||
) : (
|
||||
<ChevronUp size={14} />
|
||||
<ActionChevronUp size={14} />
|
||||
)
|
||||
}
|
||||
size='small'
|
||||
@@ -655,11 +657,16 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
onClick={handleOptimizePrompt}
|
||||
aria-label={t('AI 优化提示词')}
|
||||
className={[
|
||||
'flex items-center gap-1 text-[10px] transition-colors',
|
||||
optimizing
|
||||
? 'text-brand-from'
|
||||
: 'text-gray-400 hover:text-brand-deep dark:hover:text-brand-from',
|
||||
].join(' ')}
|
||||
'app-action-button',
|
||||
[
|
||||
'flex items-center gap-1 text-[10px] transition-colors',
|
||||
optimizing
|
||||
? 'text-brand-from'
|
||||
: 'text-gray-400 hover:text-brand-deep dark:hover:text-brand-from',
|
||||
].join(' '),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
title={
|
||||
textModels?.length
|
||||
? t('AI 优化提示词 (使用 {{m}})', {
|
||||
@@ -701,9 +708,9 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='flex items-center gap-1 text-[10px] text-gray-400 hover:text-brand-deep dark:hover:text-brand-from transition-colors'
|
||||
className='app-action-button flex items-center gap-1 text-[10px] text-gray-400 hover:text-brand-deep dark:hover:text-brand-from transition-colors'
|
||||
>
|
||||
<HistoryIcon size={10} />
|
||||
<ActionHistory size={10} />
|
||||
<span>{t('历史')}</span>
|
||||
</button>
|
||||
</Dropdown>
|
||||
@@ -819,14 +826,14 @@ const ImageGenerationForm = ({ creation }) => {
|
||||
type='button'
|
||||
onClick={() => setShowAdvanced(!showAdvanced)}
|
||||
aria-expanded={showAdvanced}
|
||||
className='flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 hover:text-brand-deep dark:hover:text-brand-from transition-colors'
|
||||
className='app-action-button flex items-center gap-1.5 text-xs text-gray-500 dark:text-gray-400 hover:text-brand-deep dark:hover:text-brand-from transition-colors'
|
||||
>
|
||||
<Settings size={12} />
|
||||
<ActionSettings size={12} />
|
||||
<span>{t('高级选项')}</span>
|
||||
{showAdvanced ? (
|
||||
<ChevronUp size={12} />
|
||||
<ActionChevronUp size={12} />
|
||||
) : (
|
||||
<ChevronDown size={12} />
|
||||
<ActionChevronDown size={12} />
|
||||
)}
|
||||
</button>
|
||||
<Collapsible isOpen={showAdvanced} keepDOM>
|
||||
|
||||
@@ -17,6 +17,21 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { GitCompare as ActionGitCompare } from '@/components/common/icons/ActionIcons';
|
||||
import {
|
||||
Rows as ActionRows,
|
||||
Layout as ActionLayout,
|
||||
LayoutGrid as ActionLayoutGrid,
|
||||
Star as ActionStar,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
X as ActionX,
|
||||
Download as ActionDownload,
|
||||
Copy as ActionCopy,
|
||||
Eye as ActionEye,
|
||||
MoreHorizontal as ActionMoreHorizontal,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
Trash2 as ActionTrash2,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { copyText } from '../../../../helpers/clipboard';
|
||||
import React, { useState, useMemo, useEffect, useRef } from 'react';
|
||||
import {
|
||||
@@ -33,7 +48,6 @@ import {
|
||||
import {
|
||||
RefreshCw,
|
||||
Trash2,
|
||||
Eye,
|
||||
RotateCcw,
|
||||
Download,
|
||||
Copy,
|
||||
@@ -42,15 +56,11 @@ import {
|
||||
AlertCircle,
|
||||
Clock,
|
||||
Image as ImageIcon,
|
||||
MoreHorizontal,
|
||||
CornerUpLeft,
|
||||
ImagePlus,
|
||||
Star,
|
||||
Layout,
|
||||
LayoutGrid,
|
||||
Rows,
|
||||
GitCompare,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IllustrationNoContent } from '../../../../components/common/illustrations';
|
||||
@@ -673,11 +683,11 @@ const ImageTaskList = ({
|
||||
<Button
|
||||
icon={
|
||||
density === 'comfortable' ? (
|
||||
<Rows size={14} />
|
||||
<ActionRows size={14} />
|
||||
) : density === 'compact' ? (
|
||||
<Layout size={14} />
|
||||
<ActionLayout size={14} />
|
||||
) : (
|
||||
<LayoutGrid size={14} />
|
||||
<ActionLayoutGrid size={14} />
|
||||
)
|
||||
}
|
||||
size='small'
|
||||
@@ -690,7 +700,7 @@ const ImageTaskList = ({
|
||||
|
||||
{/* 多选模式切换 */}
|
||||
<Button
|
||||
icon={<GitCompare size={14} />}
|
||||
icon={<ActionGitCompare size={14} />}
|
||||
size='small'
|
||||
theme={selectMode ? 'light' : 'borderless'}
|
||||
type={selectMode ? 'primary' : 'tertiary'}
|
||||
@@ -711,7 +721,7 @@ const ImageTaskList = ({
|
||||
{/* 收藏过滤 */}
|
||||
<Button
|
||||
icon={
|
||||
<Star
|
||||
<ActionStar
|
||||
size={14}
|
||||
fill={favOnly ? 'var(--brand-primary)' : 'none'}
|
||||
color={favOnly ? 'var(--brand-primary)' : 'currentColor'}
|
||||
@@ -731,7 +741,7 @@ const ImageTaskList = ({
|
||||
/>
|
||||
|
||||
<Button
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
size='small'
|
||||
theme='borderless'
|
||||
onClick={() => onRefresh(true, false)}
|
||||
@@ -779,9 +789,9 @@ const ImageTaskList = ({
|
||||
<button
|
||||
type='button'
|
||||
onClick={clearAllFilters}
|
||||
className='inline-flex items-center gap-1 rounded-full px-2 py-1 text-[11px] text-gray-400 hover:bg-brand/10 hover:text-brand-deep dark:hover:bg-brand/15 dark:hover:text-brand-from transition-colors'
|
||||
className='app-action-button inline-flex items-center gap-1 rounded-full px-2 py-1 text-[11px] text-gray-400 hover:bg-brand/10 hover:text-brand-deep dark:hover:bg-brand/15 dark:hover:text-brand-from transition-colors'
|
||||
>
|
||||
<X size={11} />
|
||||
<ActionX size={11} />
|
||||
{t('清除筛选')}
|
||||
</button>
|
||||
)}
|
||||
@@ -803,7 +813,7 @@ const ImageTaskList = ({
|
||||
size='small'
|
||||
type='primary'
|
||||
theme='solid'
|
||||
icon={<GitCompare size={12} />}
|
||||
icon={<ActionGitCompare size={12} />}
|
||||
onClick={openCompare}
|
||||
disabled={selectedIds.size < 2}
|
||||
>
|
||||
@@ -1010,14 +1020,19 @@ const ImageTaskList = ({
|
||||
toggleFavorite(task.id);
|
||||
}}
|
||||
className={[
|
||||
'absolute top-1.5 left-2 z-10 w-6 h-6 rounded-full flex items-center justify-center transition-all',
|
||||
isFav
|
||||
? 'bg-brand text-white shadow-md shadow-brand/30'
|
||||
: 'bg-black/40 text-white/80 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 hover:bg-brand',
|
||||
].join(' ')}
|
||||
'app-action-button',
|
||||
[
|
||||
'absolute top-1.5 left-2 z-10 w-6 h-6 rounded-full flex items-center justify-center transition-all',
|
||||
isFav
|
||||
? 'bg-brand text-white shadow-md shadow-brand/30'
|
||||
: 'bg-black/40 text-white/80 opacity-0 group-hover:opacity-100 [@media(hover:none)]:opacity-100 hover:bg-brand',
|
||||
].join(' '),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
title={isFav ? t('取消收藏') : t('收藏')}
|
||||
>
|
||||
<Star size={11} fill={isFav ? 'white' : 'none'} />
|
||||
<ActionStar size={11} fill={isFav ? 'white' : 'none'} />
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -1100,10 +1115,10 @@ const ImageTaskList = ({
|
||||
e.stopPropagation();
|
||||
handleDownload(task);
|
||||
}}
|
||||
className='w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
className='app-action-button w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
title={t('下载')}
|
||||
>
|
||||
<Download size={13} />
|
||||
<ActionDownload size={13} />
|
||||
</button>
|
||||
<button
|
||||
type='button'
|
||||
@@ -1112,10 +1127,10 @@ const ImageTaskList = ({
|
||||
e.stopPropagation();
|
||||
handleCopyPrompt(task.prompt);
|
||||
}}
|
||||
className='w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
className='app-action-button w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
title={t('复制提示词')}
|
||||
>
|
||||
<Copy size={13} />
|
||||
<ActionCopy size={13} />
|
||||
</button>
|
||||
{onUseAsReference && (
|
||||
<button
|
||||
@@ -1125,7 +1140,7 @@ const ImageTaskList = ({
|
||||
e.stopPropagation();
|
||||
onUseAsReference(task);
|
||||
}}
|
||||
className='w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
className='app-action-button w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
title={t('用作参考图')}
|
||||
>
|
||||
<ImagePlus size={13} />
|
||||
@@ -1138,10 +1153,10 @@ const ImageTaskList = ({
|
||||
e.stopPropagation();
|
||||
onViewDetail(task);
|
||||
}}
|
||||
className='w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
className='app-action-button w-7 h-7 rounded-full bg-white/15 hover:bg-brand backdrop-blur-sm flex items-center justify-center text-white transition-colors'
|
||||
title={t('详情')}
|
||||
>
|
||||
<Eye size={13} />
|
||||
<ActionEye size={13} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
@@ -1293,7 +1308,7 @@ const ImageTaskList = ({
|
||||
{isSuccess && (
|
||||
<>
|
||||
<Button
|
||||
icon={<Eye size={11} />}
|
||||
icon={<ActionEye size={11} />}
|
||||
size='small'
|
||||
className='flex-1 !rounded-md !text-[10px]'
|
||||
style={{ height: '24px' }}
|
||||
@@ -1361,7 +1376,7 @@ const ImageTaskList = ({
|
||||
}
|
||||
>
|
||||
<Button
|
||||
icon={<MoreHorizontal size={11} />}
|
||||
icon={<ActionMoreHorizontal size={11} />}
|
||||
size='small'
|
||||
className='!rounded-md'
|
||||
style={{
|
||||
@@ -1376,7 +1391,7 @@ const ImageTaskList = ({
|
||||
{isFailed && (
|
||||
<>
|
||||
<Button
|
||||
icon={<RotateCcw size={11} />}
|
||||
icon={<ActionRotateCcw size={11} />}
|
||||
size='small'
|
||||
className='flex-1 !rounded-md !text-[10px]'
|
||||
style={{ height: '24px' }}
|
||||
@@ -1385,7 +1400,7 @@ const ImageTaskList = ({
|
||||
{density === 'comfortable' ? t('重试') : ''}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={11} />}
|
||||
icon={<ActionTrash2 size={11} />}
|
||||
size='small'
|
||||
className='!rounded-md'
|
||||
style={{ height: '24px', width: '24px', minWidth: '24px' }}
|
||||
@@ -1398,7 +1413,7 @@ const ImageTaskList = ({
|
||||
)}
|
||||
{(isProcessing || task.status === 'pending') && (
|
||||
<Button
|
||||
icon={<Trash2 size={11} />}
|
||||
icon={<ActionTrash2 size={11} />}
|
||||
size='small'
|
||||
className='w-full !rounded-md !text-[10px]'
|
||||
style={{ height: '24px' }}
|
||||
|
||||
@@ -17,6 +17,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
UserRound as ActionUserRound,
|
||||
Plus as ActionPlus,
|
||||
Trash2 as ActionTrash2,
|
||||
ShieldCheck as ActionShieldCheck,
|
||||
ExternalLink as ActionExternalLink,
|
||||
Image as ActionImage,
|
||||
Check as ActionCheck,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -31,15 +40,7 @@ import {
|
||||
Tooltip,
|
||||
Upload,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Check,
|
||||
ExternalLink,
|
||||
Image as ImageIcon,
|
||||
Plus,
|
||||
ShieldCheck,
|
||||
Trash2,
|
||||
UserRound,
|
||||
} from 'lucide-react';
|
||||
import { Check } from 'lucide-react';
|
||||
import { QRCodeSVG } from 'qrcode.react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showError, showSuccess } from '../../../../../helpers';
|
||||
@@ -188,7 +189,7 @@ const PortraitAssetPicker = ({
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
icon={<UserRound size={16} />}
|
||||
icon={<ActionUserRound size={16} />}
|
||||
theme='light'
|
||||
onClick={() => setVisible(true)}
|
||||
>
|
||||
@@ -220,7 +221,7 @@ const PortraitAssetPicker = ({
|
||||
/>
|
||||
<Tooltip content={t('创建人像')}>
|
||||
<Button
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={handleCreate}
|
||||
loading={busy}
|
||||
disabled={!name.trim() || !consent}
|
||||
@@ -265,7 +266,7 @@ const PortraitAssetPicker = ({
|
||||
<Button
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
icon={<Trash2 size={16} />}
|
||||
icon={<ActionTrash2 size={16} />}
|
||||
onClick={() => confirmDeletePortrait(item)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -278,7 +279,7 @@ const PortraitAssetPicker = ({
|
||||
selectedPortrait.status !== 'active' &&
|
||||
!portrait.session && (
|
||||
<Button
|
||||
icon={<ShieldCheck size={16} />}
|
||||
icon={<ActionShieldCheck size={16} />}
|
||||
onClick={handleVerify}
|
||||
loading={busy}
|
||||
>
|
||||
@@ -297,7 +298,7 @@ const PortraitAssetPicker = ({
|
||||
style={{ width: 240 }}
|
||||
/>
|
||||
<Button
|
||||
icon={<ExternalLink size={16} />}
|
||||
icon={<ActionExternalLink size={16} />}
|
||||
onClick={() =>
|
||||
window.open(
|
||||
portrait.session.h5_url,
|
||||
@@ -325,7 +326,7 @@ const PortraitAssetPicker = ({
|
||||
showUploadList={false}
|
||||
onChange={handleUpload}
|
||||
>
|
||||
<Button icon={<ImageIcon size={16} />} loading={busy}>
|
||||
<Button icon={<ActionImage size={16} />} loading={busy}>
|
||||
{t('上传真人素材')}
|
||||
</Button>
|
||||
</Upload>
|
||||
@@ -360,7 +361,7 @@ const PortraitAssetPicker = ({
|
||||
{asset.status === 'active' && (
|
||||
<Tooltip content={t('选择素材')}>
|
||||
<Button
|
||||
icon={<Check size={16} />}
|
||||
icon={<ActionCheck size={16} />}
|
||||
onClick={() => {
|
||||
onSelect(asset);
|
||||
setVisible(false);
|
||||
@@ -372,7 +373,7 @@ const PortraitAssetPicker = ({
|
||||
<Button
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
icon={<Trash2 size={16} />}
|
||||
icon={<ActionTrash2 size={16} />}
|
||||
onClick={() => confirmDeleteAsset(asset)}
|
||||
/>
|
||||
</Tooltip>
|
||||
|
||||
@@ -17,6 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
ChevronRight as ActionChevronRight,
|
||||
ChevronLeft as ActionChevronLeft,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -29,8 +33,6 @@ import {
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Film,
|
||||
Image as ImageIcon,
|
||||
Images,
|
||||
@@ -132,7 +134,7 @@ const VideoInputPanel = ({
|
||||
return (
|
||||
<div className='vip-expand-fab'>
|
||||
<Button
|
||||
icon={<ChevronRight size={20} />}
|
||||
icon={<ActionChevronRight size={20} />}
|
||||
onClick={onCollapse}
|
||||
aria-label={t('展开')}
|
||||
/>
|
||||
@@ -269,7 +271,7 @@ const VideoInputPanel = ({
|
||||
{collapsible && (
|
||||
<div className='vip-collapse-row'>
|
||||
<Button
|
||||
icon={<ChevronLeft size={18} />}
|
||||
icon={<ActionChevronLeft size={18} />}
|
||||
onClick={onCollapse}
|
||||
size='small'
|
||||
type='tertiary'
|
||||
|
||||
@@ -17,6 +17,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Wallet as ActionWallet,
|
||||
Play as ActionPlay,
|
||||
HelpCircle as ActionHelpCircle,
|
||||
X as ActionX,
|
||||
Download as ActionDownload,
|
||||
Share2 as ActionShare2,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
Square as ActionSquare,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../../../../helpers/clipboard';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
@@ -29,18 +39,7 @@ import {
|
||||
Spin,
|
||||
Tooltip,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Play,
|
||||
Square,
|
||||
Download,
|
||||
RotateCcw,
|
||||
Share2,
|
||||
Film,
|
||||
HelpCircle,
|
||||
X,
|
||||
Loader2,
|
||||
Wallet,
|
||||
} from 'lucide-react';
|
||||
import { Film, Loader2 } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showError, showSuccess } from '../../../../../helpers';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -287,7 +286,7 @@ const VideoPreviewPanel = ({
|
||||
type='warning'
|
||||
theme='solid'
|
||||
size={windowWidth > 768 ? 'default' : 'small'}
|
||||
icon={<Wallet size={16} />}
|
||||
icon={<ActionWallet size={16} />}
|
||||
onClick={() => navigate('/console/topup')}
|
||||
style={{ fontWeight: 600 }}
|
||||
>
|
||||
@@ -298,7 +297,7 @@ const VideoPreviewPanel = ({
|
||||
type='primary'
|
||||
theme='solid'
|
||||
size={windowWidth > 768 ? 'default' : 'small'}
|
||||
icon={<Play size={16} fill='currentColor' />}
|
||||
icon={<ActionPlay size={16} fill='currentColor' />}
|
||||
onClick={isButtonDisabled ? undefined : handleGenerate}
|
||||
disabled={isButtonDisabled || submitting}
|
||||
loading={submitting}
|
||||
@@ -390,7 +389,7 @@ const VideoPreviewPanel = ({
|
||||
showArrow={true}
|
||||
>
|
||||
<Button
|
||||
icon={<HelpCircle size={18} />}
|
||||
icon={<ActionHelpCircle size={18} />}
|
||||
type='tertiary'
|
||||
size={windowWidth > 768 ? 'default' : 'small'}
|
||||
/>
|
||||
@@ -425,7 +424,7 @@ const VideoPreviewPanel = ({
|
||||
>
|
||||
{/* 关闭按钮 */}
|
||||
<Button
|
||||
icon={<X size={16} />}
|
||||
icon={<ActionX size={16} />}
|
||||
type='tertiary'
|
||||
theme='borderless'
|
||||
size='small'
|
||||
@@ -457,14 +456,14 @@ const VideoPreviewPanel = ({
|
||||
<Button
|
||||
type='primary'
|
||||
size={config.buttonSize}
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={handleDownload}
|
||||
>
|
||||
{windowWidth > 768 ? t('下载视频') : t('下载')}
|
||||
</Button>
|
||||
<Button
|
||||
size={config.buttonSize}
|
||||
icon={<Share2 size={16} />}
|
||||
icon={<ActionShare2 size={16} />}
|
||||
onClick={handleShare}
|
||||
>
|
||||
{t('分享')}
|
||||
@@ -472,7 +471,7 @@ const VideoPreviewPanel = ({
|
||||
{canRegenerateVideoTask(displayTask) && (
|
||||
<Button
|
||||
size={config.buttonSize}
|
||||
icon={<RotateCcw size={16} />}
|
||||
icon={<ActionRotateCcw size={16} />}
|
||||
onClick={handleRegenerate}
|
||||
>
|
||||
{windowWidth > 768 ? t('再生成') : t('重新')}
|
||||
@@ -642,7 +641,7 @@ const VideoPreviewPanel = ({
|
||||
<Button
|
||||
type='danger'
|
||||
size={config.buttonSize}
|
||||
icon={<Square size={16} fill='currentColor' />}
|
||||
icon={<ActionSquare size={16} fill='currentColor' />}
|
||||
onClick={onCancel}
|
||||
style={{ marginTop: '32px' }}
|
||||
>
|
||||
@@ -678,7 +677,7 @@ const VideoPreviewPanel = ({
|
||||
<Button
|
||||
type='primary'
|
||||
size={config.buttonSize}
|
||||
icon={<RotateCcw size={16} />}
|
||||
icon={<ActionRotateCcw size={16} />}
|
||||
onClick={handleRegenerate}
|
||||
style={{ marginTop: '24px' }}
|
||||
>
|
||||
|
||||
@@ -17,6 +17,13 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Play as ActionPlay,
|
||||
Download as ActionDownload,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Trash2 as ActionTrash2,
|
||||
AlertCircle as ActionAlertCircle,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import {
|
||||
Table,
|
||||
@@ -32,10 +39,6 @@ import {
|
||||
import {
|
||||
ChevronUp,
|
||||
ChevronDown,
|
||||
RefreshCw,
|
||||
Download,
|
||||
Trash2,
|
||||
Play,
|
||||
CheckCircle2,
|
||||
AlertCircle,
|
||||
Clock,
|
||||
@@ -249,7 +252,7 @@ const VideoTaskQueue = ({
|
||||
<Button
|
||||
size='small'
|
||||
type='tertiary'
|
||||
icon={<Play size={14} />}
|
||||
icon={<ActionPlay size={14} />}
|
||||
onClick={() => onPlay && onPlay(record)}
|
||||
>
|
||||
{!isCompact ? t('播放') : ''}
|
||||
@@ -257,7 +260,7 @@ const VideoTaskQueue = ({
|
||||
<Button
|
||||
size='small'
|
||||
type='tertiary'
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={() => onDownload(record)}
|
||||
>
|
||||
{!isCompact ? t('下载') : ''}
|
||||
@@ -271,7 +274,7 @@ const VideoTaskQueue = ({
|
||||
<Button
|
||||
size='small'
|
||||
type='primary'
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={() => onRegenerate && onRegenerate(record)}
|
||||
>
|
||||
{!isCompact ? t('再生成') : ''}
|
||||
@@ -280,12 +283,14 @@ const VideoTaskQueue = ({
|
||||
<Button
|
||||
size='small'
|
||||
type='danger'
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
onClick={() => {
|
||||
Modal.warning({
|
||||
title: t('确定删除此任务?'),
|
||||
content: t('删除后将无法恢复'),
|
||||
icon: <AlertCircle size={24} style={{ color: '#f59e0b' }} />,
|
||||
icon: (
|
||||
<ActionAlertCircle size={24} style={{ color: '#f59e0b' }} />
|
||||
),
|
||||
okText: t('确定'),
|
||||
cancelText: t('取消'),
|
||||
onOk: () => onDelete(record.task_id),
|
||||
@@ -381,7 +386,7 @@ const VideoTaskQueue = ({
|
||||
<Space wrap>
|
||||
<Button
|
||||
size={!isCompact ? 'default' : 'small'}
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={onRefresh}
|
||||
>
|
||||
{t('刷新')}
|
||||
@@ -390,7 +395,7 @@ const VideoTaskQueue = ({
|
||||
<>
|
||||
<Button
|
||||
size={!isCompact ? 'default' : 'small'}
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={handleBatchDownload}
|
||||
>
|
||||
{t('批量下载')} ({selectedTasks.length})
|
||||
@@ -398,7 +403,7 @@ const VideoTaskQueue = ({
|
||||
<Button
|
||||
size={!isCompact ? 'default' : 'small'}
|
||||
type='danger'
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
onClick={() => {
|
||||
Modal.warning({
|
||||
title: t('确定删除选中的任务?'),
|
||||
@@ -406,7 +411,10 @@ const VideoTaskQueue = ({
|
||||
count: selectedTasks.length,
|
||||
}),
|
||||
icon: (
|
||||
<AlertCircle size={24} style={{ color: '#f59e0b' }} />
|
||||
<ActionAlertCircle
|
||||
size={24}
|
||||
style={{ color: '#f59e0b' }}
|
||||
/>
|
||||
),
|
||||
okText: t('确定删除'),
|
||||
cancelText: t('取消'),
|
||||
|
||||
Reference in New Issue
Block a user