feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -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' }}
|
||||
|
||||
Reference in New Issue
Block a user