feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等
This commit is contained in:
@@ -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 {
|
||||
Eye as ActionEye,
|
||||
Check as ActionCheck,
|
||||
X as ActionX,
|
||||
Ban as ActionBan,
|
||||
RotateCw as ActionRotateCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import {
|
||||
ConsoleCard,
|
||||
ConsoleSearchBar,
|
||||
@@ -35,7 +42,7 @@ import {
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { Search, Eye, Check, X, RotateCw, Ban } from 'lucide-react';
|
||||
import { Search } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
import {
|
||||
INVOICE_STATUS,
|
||||
@@ -298,7 +305,7 @@ const AdminInvoice = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Eye size={14} />}
|
||||
icon={<ActionEye size={14} />}
|
||||
onClick={() => handleViewDetail(record.id)}
|
||||
/>
|
||||
{record.status === INVOICE_STATUS.PENDING && (
|
||||
@@ -307,7 +314,7 @@ const AdminInvoice = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='primary'
|
||||
icon={<Check size={14} />}
|
||||
icon={<ActionCheck size={14} />}
|
||||
onClick={() => {
|
||||
setApproveId(record.id);
|
||||
setApproveVisible(true);
|
||||
@@ -319,7 +326,7 @@ const AdminInvoice = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<X size={14} />}
|
||||
icon={<ActionX size={14} />}
|
||||
onClick={() => {
|
||||
setRejectId(record.id);
|
||||
setRejectVisible(true);
|
||||
@@ -335,7 +342,7 @@ const AdminInvoice = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<Ban size={14} />}
|
||||
icon={<ActionBan size={14} />}
|
||||
onClick={() => handleFailCancel(record.id)}
|
||||
>
|
||||
{t('取消')}
|
||||
@@ -346,7 +353,7 @@ const AdminInvoice = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<RotateCw size={14} />}
|
||||
icon={<ActionRotateCw size={14} />}
|
||||
onClick={() => handleRetry(record.id)}
|
||||
>
|
||||
{t('重试')}
|
||||
@@ -355,7 +362,7 @@ const AdminInvoice = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<Ban size={14} />}
|
||||
icon={<ActionBan size={14} />}
|
||||
onClick={() => handleFailCancel(record.id)}
|
||||
>
|
||||
{t('取消')}
|
||||
|
||||
@@ -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 {
|
||||
Check as ActionCheck,
|
||||
Copy as ActionCopy,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import TableToolbar from '../../components/common/table/TableToolbar';
|
||||
@@ -26,7 +30,7 @@ import {
|
||||
} from '../../components/console/ConsolePrimitives';
|
||||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Search, Copy, Check } from 'lucide-react';
|
||||
import { Search } from 'lucide-react';
|
||||
import {
|
||||
Table,
|
||||
Input,
|
||||
@@ -245,14 +249,14 @@ const AdminOrder = () => {
|
||||
{text}
|
||||
</span>
|
||||
<button
|
||||
className='flex-shrink-0 p-0.5 rounded hover:bg-gray-100 dark:hover:bg-neutral-700 cursor-pointer bg-transparent border-none'
|
||||
className='app-action-button flex-shrink-0 p-0.5 rounded hover:bg-gray-100 dark:hover:bg-neutral-700 cursor-pointer bg-transparent border-none'
|
||||
onClick={() => copyText(text, `trade-${record.id}`)}
|
||||
title={t('复制订单号')}
|
||||
>
|
||||
{copiedId === `trade-${record.id}` ? (
|
||||
<Check size={12} className='text-green-500' />
|
||||
<ActionCheck size={12} className='text-green-500' />
|
||||
) : (
|
||||
<Copy size={12} className='text-gray-400' />
|
||||
<ActionCopy size={12} className='text-gray-400' />
|
||||
)}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
ExternalLink as ActionExternalLink,
|
||||
BarChart3 as ActionBarChart3,
|
||||
Bell as ActionBell,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import TableToolbar from '../../components/common/table/TableToolbar';
|
||||
import {
|
||||
@@ -27,7 +33,7 @@ import { ConsolePageActions } from '../../components/console/ConsolePageContaine
|
||||
import React, { useEffect, useState, useCallback, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Plus, Search, ExternalLink, BarChart3, Bell } from 'lucide-react';
|
||||
import { Search } from 'lucide-react';
|
||||
import {
|
||||
Table,
|
||||
Button,
|
||||
@@ -689,12 +695,12 @@ const AdminOrganizations = () => {
|
||||
if (isRoot()) {
|
||||
return (
|
||||
<button
|
||||
className='inline-flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:underline cursor-pointer bg-transparent border-none p-0 font-inherit text-left'
|
||||
className='app-action-button inline-flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 hover:underline cursor-pointer bg-transparent border-none p-0 font-inherit text-left'
|
||||
onClick={() => handleEnterOrg(record.id)}
|
||||
title={t('进入企业中心')}
|
||||
>
|
||||
<span className='truncate'>{text}</span>
|
||||
<ExternalLink size={12} className='flex-shrink-0' />
|
||||
<ActionExternalLink size={12} className='flex-shrink-0' />
|
||||
</button>
|
||||
);
|
||||
}
|
||||
@@ -1013,13 +1019,16 @@ const AdminOrganizations = () => {
|
||||
{isAdmin() && (
|
||||
<ConsolePageActions>
|
||||
{CLOUD_BRAIN_UI_ENABLED && (
|
||||
<Button icon={<BarChart3 size={16} />} onClick={openEffectUsage}>
|
||||
<Button
|
||||
icon={<ActionBarChart3 size={16} />}
|
||||
onClick={openEffectUsage}
|
||||
>
|
||||
{t('企业使用统计')}
|
||||
</Button>
|
||||
)}
|
||||
{isRoot() && (
|
||||
<Button
|
||||
icon={<Bell size={16} />}
|
||||
icon={<ActionBell size={16} />}
|
||||
onClick={() => setAlertSettingsVisible(true)}
|
||||
>
|
||||
{t('通知设置')}
|
||||
@@ -1028,7 +1037,7 @@ const AdminOrganizations = () => {
|
||||
<Button
|
||||
className='console-create-action'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => {
|
||||
resetCreateForm();
|
||||
setCreateModalVisible(true);
|
||||
|
||||
@@ -17,6 +17,20 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Bot as ActionBot,
|
||||
ArrowRight as ActionArrowRight,
|
||||
ArrowLeft as ActionArrowLeft,
|
||||
CheckCircle2 as ActionCheckCircle2,
|
||||
FileUp as ActionFileUp,
|
||||
X as ActionX,
|
||||
Send as ActionSend,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
Copy as ActionCopy,
|
||||
ThumbsUp as ActionThumbsUp,
|
||||
ThumbsDown as ActionThumbsDown,
|
||||
Download as ActionDownload,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import React, {
|
||||
useCallback,
|
||||
@@ -39,28 +53,18 @@ import {
|
||||
TextArea,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
Bot,
|
||||
BriefcaseBusiness,
|
||||
BookOpenCheck,
|
||||
CheckCircle2,
|
||||
CircleDashed,
|
||||
Clock3,
|
||||
Copy,
|
||||
Download,
|
||||
FileText,
|
||||
FileUp,
|
||||
ListChecks,
|
||||
MessageSquareMore,
|
||||
RotateCcw,
|
||||
Send,
|
||||
Sparkles,
|
||||
Square,
|
||||
ThumbsDown,
|
||||
ThumbsUp,
|
||||
TriangleAlert,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
@@ -1822,14 +1826,21 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<nav className='brain-tabs' aria-label={t('云端大脑导航')}>
|
||||
<button
|
||||
type='button'
|
||||
className={view === 'experts' ? 'is-active' : ''}
|
||||
className={[
|
||||
'app-action-button',
|
||||
view === 'experts' ? 'is-active' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => setView('experts')}
|
||||
>
|
||||
<Bot size={17} /> {t('专家广场')}
|
||||
<ActionBot size={17} /> {t('专家广场')}
|
||||
</button>
|
||||
<button
|
||||
type='button'
|
||||
className={view === 'runs' ? 'is-active' : ''}
|
||||
className={['app-action-button', view === 'runs' ? 'is-active' : '']
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => setView('runs')}
|
||||
>
|
||||
<ListChecks size={17} /> {t('我的任务')}
|
||||
@@ -2034,14 +2045,14 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
</div>
|
||||
<button
|
||||
type='button'
|
||||
className='brain-card-action'
|
||||
className='app-action-button brain-card-action'
|
||||
onClick={(event) => {
|
||||
// 阻断冒泡到整卡 onClick,避免同一动作双触发
|
||||
event.stopPropagation();
|
||||
setSelectedExpert(expert);
|
||||
}}
|
||||
>
|
||||
{t('开始任务')} <ArrowRight size={16} />
|
||||
{t('开始任务')} <ActionArrowRight size={16} />
|
||||
</button>
|
||||
</article>
|
||||
);
|
||||
@@ -2055,10 +2066,10 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<>
|
||||
<button
|
||||
type='button'
|
||||
className='brain-back'
|
||||
className='app-action-button brain-back'
|
||||
onClick={() => setSelectedExpert(null)}
|
||||
>
|
||||
<ArrowLeft size={16} /> {t('返回专家列表')}
|
||||
<ActionArrowLeft size={16} /> {t('返回专家列表')}
|
||||
</button>
|
||||
<div className='brain-composer-heading'>
|
||||
<span className='brain-composer-mark'>
|
||||
@@ -2122,7 +2133,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
key={skill.skill_id}
|
||||
title={skill.description}
|
||||
disabled={atLimit}
|
||||
className={`brain-skill-chip ${checked ? 'is-checked' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`brain-skill-chip ${checked ? 'is-checked' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() =>
|
||||
setManualSkillIds((previous) =>
|
||||
previous.includes(skill.skill_id)
|
||||
@@ -2133,7 +2149,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
)
|
||||
}
|
||||
>
|
||||
{checked ? <CheckCircle2 size={13} /> : null}
|
||||
{checked ? <ActionCheckCircle2 size={13} /> : null}
|
||||
{skill.name || skill.canonical_id}
|
||||
</button>
|
||||
);
|
||||
@@ -2150,7 +2166,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
onChange={uploadAttachment}
|
||||
/>
|
||||
<Button
|
||||
icon={<FileUp size={16} />}
|
||||
icon={<ActionFileUp size={16} />}
|
||||
loading={attachmentBusy}
|
||||
disabled={attachmentBusy || attachments.length >= 5}
|
||||
onClick={() => attachmentInputRef.current?.click()}
|
||||
@@ -2174,11 +2190,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
)}
|
||||
</em>
|
||||
<button
|
||||
className='app-action-button'
|
||||
type='button'
|
||||
aria-label={t('移除附件')}
|
||||
onClick={() => removeAttachment(attachment)}
|
||||
>
|
||||
<X size={14} />
|
||||
<ActionX size={14} />
|
||||
</button>
|
||||
</div>
|
||||
))}
|
||||
@@ -2194,7 +2211,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
type='primary'
|
||||
size='large'
|
||||
block
|
||||
icon={<Send size={17} />}
|
||||
icon={<ActionSend size={17} />}
|
||||
loading={submitting}
|
||||
disabled={
|
||||
!input.trim() ||
|
||||
@@ -2226,7 +2243,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<strong>{runs.length}</strong>
|
||||
</div>
|
||||
<Button
|
||||
icon={<RotateCcw size={15} />}
|
||||
icon={<ActionRotateCcw size={15} />}
|
||||
onClick={loadRuns}
|
||||
aria-label={t('刷新任务')}
|
||||
/>
|
||||
@@ -2329,14 +2346,17 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<Button onClick={cancelRun}>{t('取消任务')}</Button>
|
||||
)}
|
||||
{runDetail.artifact?.content && (
|
||||
<Button icon={<Copy size={15} />} onClick={copyArtifact}>
|
||||
<Button
|
||||
icon={<ActionCopy size={15} />}
|
||||
onClick={copyArtifact}
|
||||
>
|
||||
{t('复制')}
|
||||
</Button>
|
||||
)}
|
||||
{runDetail.artifact?.content &&
|
||||
terminalStatuses.has(activeRun.status) && (
|
||||
<Button
|
||||
icon={<RotateCcw size={15} />}
|
||||
icon={<ActionRotateCcw size={15} />}
|
||||
onClick={() => setRevisionOpen((open) => !open)}
|
||||
>
|
||||
{t('修订产物')}
|
||||
@@ -2383,7 +2403,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Send size={15} />}
|
||||
icon={<ActionSend size={15} />}
|
||||
loading={revising}
|
||||
disabled={!revisionInstruction.trim()}
|
||||
onClick={reviseRun}
|
||||
@@ -2536,7 +2556,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
size='small'
|
||||
theme='light'
|
||||
type='danger'
|
||||
icon={<Copy size={13} />}
|
||||
icon={<ActionCopy size={13} />}
|
||||
onClick={copyErrorReport}
|
||||
>
|
||||
{t('复制报错信息')}
|
||||
@@ -2583,20 +2603,28 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
</button>
|
||||
)}
|
||||
<button
|
||||
className={feedback === 'useful' ? 'is-active' : ''}
|
||||
className={[
|
||||
'app-action-button',
|
||||
feedback === 'useful' ? 'is-active' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => submitFeedback('useful')}
|
||||
aria-label={t('有帮助')}
|
||||
>
|
||||
<ThumbsUp size={16} />
|
||||
<ActionThumbsUp size={16} />
|
||||
</button>
|
||||
<button
|
||||
className={
|
||||
feedback === 'not_useful' ? 'is-active' : ''
|
||||
}
|
||||
className={[
|
||||
'app-action-button',
|
||||
feedback === 'not_useful' ? 'is-active' : '',
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => submitFeedback('not_useful')}
|
||||
aria-label={t('没有帮助')}
|
||||
>
|
||||
<ThumbsDown size={16} />
|
||||
<ActionThumbsDown size={16} />
|
||||
</button>
|
||||
</div>
|
||||
</footer>
|
||||
@@ -2621,7 +2649,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
|
||||
</div>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={downloadArtifact}
|
||||
>
|
||||
{t('获取短期下载链接')}
|
||||
|
||||
@@ -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('取消'),
|
||||
|
||||
@@ -17,17 +17,14 @@ 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, { useMemo, useState, useEffect } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
BrainCircuit,
|
||||
Image,
|
||||
Video,
|
||||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
import { BrainCircuit, Image, Video, Sparkles } from 'lucide-react';
|
||||
import { useSidebarCollapsed } from '../../../hooks/common/useSidebarCollapsed';
|
||||
import { useExperienceModules } from '../useExperienceModules';
|
||||
import { badgeText } from '../../../hooks/creation/creationWatch';
|
||||
@@ -245,7 +242,9 @@ const ExperienceSidebar = ({ unread }) => {
|
||||
<div className='relative p-3'>
|
||||
<button
|
||||
onClick={toggleCollapsed}
|
||||
className={`
|
||||
className={[
|
||||
'app-action-button',
|
||||
`
|
||||
flex items-center justify-center gap-2 w-full py-2 rounded-lg
|
||||
text-gray-500 dark:text-gray-400 text-sm font-medium
|
||||
bg-white/50 dark:bg-neutral-800/50
|
||||
@@ -255,13 +254,16 @@ const ExperienceSidebar = ({ unread }) => {
|
||||
hover:border-brand/30
|
||||
transition-all duration-200
|
||||
${collapsed ? 'px-2' : 'px-3'}
|
||||
`}
|
||||
`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
>
|
||||
{collapsed ? (
|
||||
<ChevronRight size={16} strokeWidth={2.5} />
|
||||
<ActionChevronRight size={16} strokeWidth={2.5} />
|
||||
) : (
|
||||
<>
|
||||
<ChevronLeft size={16} strokeWidth={2.5} />
|
||||
<ActionChevronLeft size={16} strokeWidth={2.5} />
|
||||
<span>{t('收起')}</span>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Download as ActionDownload } from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -44,7 +45,6 @@ import {
|
||||
XCircle,
|
||||
AlertTriangle,
|
||||
Users,
|
||||
Download,
|
||||
} from 'lucide-react';
|
||||
import { API, showError } from '../../helpers';
|
||||
import { exportToCsv, formatTimestampForCsv } from '../../helpers/exportCsv';
|
||||
@@ -512,7 +512,7 @@ export const ExperienceCenterAuditPanel = () => {
|
||||
/>
|
||||
<Button
|
||||
theme='borderless'
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={handleExport}
|
||||
size='small'
|
||||
>
|
||||
|
||||
@@ -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 {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { ConsolePageActions } from '../../components/console/ConsolePageContainer';
|
||||
import React, {
|
||||
useCallback,
|
||||
@@ -47,8 +51,6 @@ import {
|
||||
BadgeCheck,
|
||||
Bot,
|
||||
Cpu,
|
||||
Plus,
|
||||
RefreshCw,
|
||||
Scale,
|
||||
ShieldCheck,
|
||||
} from 'lucide-react';
|
||||
@@ -1260,7 +1262,7 @@ const ExpertPlatform = () => {
|
||||
<div className='expert-platform-shell'>
|
||||
<ConsolePageActions>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={() => void load()}
|
||||
>
|
||||
@@ -1272,7 +1274,7 @@ const ExpertPlatform = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('创建专家')}
|
||||
@@ -1458,7 +1460,7 @@ const ExpertPlatform = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('创建专家')}
|
||||
@@ -1596,7 +1598,7 @@ const ExpertPlatform = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => openCapability()}
|
||||
>
|
||||
{t('登记模型能力')}
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Rocket as ActionRocket } from '@/components/common/icons/ActionIcons';
|
||||
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
|
||||
import {
|
||||
MoonshotMono as Moonshot,
|
||||
@@ -434,7 +435,7 @@ const Home = () => {
|
||||
style={{ color: '#ffffff' }}
|
||||
>
|
||||
{t('立即探索')}{' '}
|
||||
<Rocket
|
||||
<ActionRocket
|
||||
size={20}
|
||||
className='ml-2'
|
||||
style={{ color: '#ffffff' }}
|
||||
|
||||
@@ -17,6 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Download as ActionDownload,
|
||||
Check as ActionCheck,
|
||||
Zap as ActionZap,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import React, { useState, useCallback, useEffect, useContext } from 'react';
|
||||
import { Navigate } from 'react-router-dom';
|
||||
@@ -39,8 +45,6 @@ import {
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Image,
|
||||
Download,
|
||||
RefreshCw,
|
||||
Settings,
|
||||
Zap,
|
||||
AlertCircle,
|
||||
@@ -369,7 +373,7 @@ const ImageGeneration = () => {
|
||||
theme='borderless'
|
||||
type='primary'
|
||||
icon={
|
||||
<Download
|
||||
<ActionDownload
|
||||
size={18}
|
||||
className='text-white hover:text-blue-400 transition-colors'
|
||||
/>
|
||||
@@ -383,7 +387,7 @@ const ImageGeneration = () => {
|
||||
theme='borderless'
|
||||
type='primary'
|
||||
icon={
|
||||
<Check
|
||||
<ActionCheck
|
||||
size={18}
|
||||
className='text-white hover:text-green-400 transition-colors'
|
||||
/>
|
||||
@@ -604,7 +608,7 @@ const ImageGeneration = () => {
|
||||
!selectedModel ||
|
||||
selectedModel.level_locked
|
||||
}
|
||||
icon={<Zap size={16} />}
|
||||
icon={<ActionZap size={16} />}
|
||||
className='w-full'
|
||||
>
|
||||
{isGenerating ? t('创建任务中...') : t('生成图片')}
|
||||
@@ -705,7 +709,7 @@ const ImageGeneration = () => {
|
||||
</h2>
|
||||
<Button
|
||||
type='tertiary'
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() =>
|
||||
loadTasks(pagination.page, pagination.pageSize)
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
EyeOff as ActionEyeOff,
|
||||
Eye as ActionEye,
|
||||
Copy as ActionCopy,
|
||||
BookOpen as ActionBookOpen,
|
||||
HelpCircle as ActionHelpCircle,
|
||||
Search as ActionSearch,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useState, useRef, useEffect, useContext } from 'react';
|
||||
@@ -34,16 +43,7 @@ import {
|
||||
Tooltip,
|
||||
} from 'antd';
|
||||
import { Modal, Pagination } from '@/components/ui';
|
||||
import {
|
||||
BookOpen,
|
||||
Copy,
|
||||
Eye,
|
||||
EyeOff,
|
||||
HelpCircle,
|
||||
Plus,
|
||||
Search,
|
||||
ShieldCheck,
|
||||
} from 'lucide-react';
|
||||
import { ShieldCheck } from 'lucide-react';
|
||||
import Joyride, { STATUS, ACTIONS, EVENTS } from 'react-joyride';
|
||||
import { useTokensData } from '../../hooks/tokens/useTokensData';
|
||||
import EditTokenModal from '../../components/table/tokens/modals/EditTokenModal';
|
||||
@@ -140,7 +140,9 @@ const KeyTable = ({
|
||||
size='small'
|
||||
aria-label={shown ? t('隐藏密钥') : t('显示密钥')}
|
||||
aria-pressed={shown}
|
||||
icon={shown ? <EyeOff size={16} /> : <Eye size={16} />}
|
||||
icon={
|
||||
shown ? <ActionEyeOff size={16} /> : <ActionEye size={16} />
|
||||
}
|
||||
onClick={() => onToggleShowKey(token.id)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -150,7 +152,7 @@ const KeyTable = ({
|
||||
size='small'
|
||||
className='km-copy-btn tour-copy-btn'
|
||||
aria-label={t('复制密钥')}
|
||||
icon={<Copy size={16} />}
|
||||
icon={<ActionCopy size={16} />}
|
||||
onClick={() => onCopy('sk-' + token.key)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -859,7 +861,7 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
<Tooltip title={t('新手教程')}>
|
||||
<Button
|
||||
aria-label={t('新手教程')}
|
||||
icon={<BookOpen size={16} />}
|
||||
icon={<ActionBookOpen size={16} />}
|
||||
onClick={() => navigate('/tutorial?from=key-management')}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -867,7 +869,7 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
<Tooltip title={t('查看操作指引')}>
|
||||
<Button
|
||||
aria-label={t('查看操作指引')}
|
||||
icon={<HelpCircle size={16} />}
|
||||
icon={<ActionHelpCircle size={16} />}
|
||||
onClick={startTour}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -896,7 +898,7 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
<Button onClick={() => setSearchValue('')}>{t('重置')}</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
onClick={() => setSearchValue(searchValue)}
|
||||
>
|
||||
{t('搜索')}
|
||||
@@ -917,7 +919,7 @@ const KeyManagement = ({ embedded = false }) => {
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
className='tour-create-btn'
|
||||
onClick={handleCreate}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import TableToolbar from '../../components/common/table/TableToolbar';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
@@ -30,7 +31,6 @@ import {
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RefreshCw } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
|
||||
const { Text } = Typography;
|
||||
@@ -90,7 +90,7 @@ export default function MyCommission() {
|
||||
/>
|
||||
<TableToolbar title={t('提成列表')}>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={load}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -16,12 +16,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Search as ActionSearch,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { getQuotaPerUnit } from '../../helpers';
|
||||
import { timestamp2string } from '../../helpers/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { RefreshCw, Search } from 'lucide-react';
|
||||
import { Form as AntForm, Tabs as AntTabs } from 'antd';
|
||||
import { Table, Select, Button, Tag, Tooltip } from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
@@ -404,7 +407,7 @@ const OrgAudit = ({ orgId }) => {
|
||||
<Button onClick={() => applyAction('')}>{t('重置')}</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Search size={16} />}
|
||||
icon={<ActionSearch size={16} />}
|
||||
onClick={refresh}
|
||||
>
|
||||
{t('搜索')}
|
||||
@@ -430,7 +433,7 @@ const OrgAudit = ({ orgId }) => {
|
||||
title={t('操作记录')}
|
||||
tools={
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={refresh}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, {
|
||||
useCallback,
|
||||
@@ -35,7 +39,6 @@ import {
|
||||
Progress,
|
||||
Popconfirm,
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import {
|
||||
@@ -445,7 +448,7 @@ const OrgBudgets = ({ orgId }) => {
|
||||
tools={
|
||||
<>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={fetchAll}
|
||||
>
|
||||
@@ -453,7 +456,7 @@ const OrgBudgets = ({ orgId }) => {
|
||||
</Button>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('配置预算')}
|
||||
|
||||
@@ -16,6 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
KeyRound as ActionKeyRound,
|
||||
ShieldCheck as ActionShieldCheck,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -31,7 +37,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
} from '@/components/ui';
|
||||
import { Cable, KeyRound, Plus, RefreshCw, ShieldCheck } from 'lucide-react';
|
||||
import { Cable } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers/api';
|
||||
import {
|
||||
@@ -360,13 +366,17 @@ const OrgConnectors = ({ orgId }) => {
|
||||
<div className='org-connector-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={load}
|
||||
>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<Button theme='solid' icon={<Plus size={16} />} onClick={openCreate}>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('配置 Connector')}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -423,7 +433,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<KeyRound size={14} />}
|
||||
icon={<ActionKeyRound size={14} />}
|
||||
onClick={() => {
|
||||
setSelected(row);
|
||||
setCredentialOpen(true);
|
||||
@@ -454,7 +464,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
</p>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<ShieldCheck size={16} />}
|
||||
icon={<ActionShieldCheck size={16} />}
|
||||
onClick={() => {
|
||||
setGrant((current) => ({
|
||||
...current,
|
||||
|
||||
@@ -16,6 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Search as ActionSearch,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Wallet as ActionWallet,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useEffect,
|
||||
useMemo,
|
||||
@@ -28,16 +33,7 @@ import { timestamp2string } from '../../helpers/utils';
|
||||
import { isMiniProgramWebView } from '../../helpers/miniProgram';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Link, useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Users,
|
||||
Key,
|
||||
Wallet,
|
||||
ArrowRight,
|
||||
RefreshCw,
|
||||
Search,
|
||||
FileText,
|
||||
Activity,
|
||||
} from 'lucide-react';
|
||||
import { Users, Key, ArrowRight, FileText, Activity } from 'lucide-react';
|
||||
import {
|
||||
Avatar as AntAvatar,
|
||||
Card as AntCard,
|
||||
@@ -308,7 +304,7 @@ const MemberUsageSheet = ({ visible, onClose, member, orgId, t }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
onClick={handleSearch}
|
||||
loading={loading}
|
||||
>
|
||||
@@ -682,7 +678,7 @@ const OrgDashboard = ({ orgId, orgRole, orgName, featureFlags }) => {
|
||||
<div className='oc-dash-actions'>
|
||||
<Button onClick={showMembers}>{t('成员用量')}</Button>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => {
|
||||
fetch();
|
||||
fetchQuota(memberQuotaPage, memberQuotaPageSize);
|
||||
@@ -693,7 +689,7 @@ const OrgDashboard = ({ orgId, orgRole, orgName, featureFlags }) => {
|
||||
</Button>
|
||||
{isAdmin && !isMiniProgramWebView() && (
|
||||
<Button
|
||||
icon={<Wallet size={16} />}
|
||||
icon={<ActionWallet size={16} />}
|
||||
theme='solid'
|
||||
type='primary'
|
||||
onClick={() => navigate('/org/recharge')}
|
||||
|
||||
@@ -16,10 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Banner, Button, Form, Toast, Empty, Spin } from '@/components/ui';
|
||||
import { RefreshCw, Plus, Network } from 'lucide-react';
|
||||
import { Network } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import { useActualTheme } from '../../context/Theme';
|
||||
@@ -248,7 +252,7 @@ const OrgDepartments = ({ orgId }) => {
|
||||
<>
|
||||
<Button
|
||||
theme='light'
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
loading={loading}
|
||||
onClick={fetchList}
|
||||
>
|
||||
@@ -256,7 +260,7 @@ const OrgDepartments = ({ orgId }) => {
|
||||
</Button>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
onClick={() => openCreate(0)}
|
||||
>
|
||||
{t('新建顶级部门')}
|
||||
@@ -278,7 +282,7 @@ const OrgDepartments = ({ orgId }) => {
|
||||
>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
onClick={() => openCreate(0)}
|
||||
>
|
||||
{t('新建顶级部门')}
|
||||
|
||||
@@ -16,6 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Check as ActionCheck,
|
||||
X as ActionX,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -36,14 +41,7 @@ import {
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
RefreshCw,
|
||||
Users,
|
||||
TrendingUp,
|
||||
FileClock,
|
||||
Check,
|
||||
X,
|
||||
} from 'lucide-react';
|
||||
import { Users, TrendingUp, FileClock } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
@@ -325,7 +323,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
/>
|
||||
<Button
|
||||
theme='light'
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={() => {
|
||||
if (tab === 'members') fetchMembers();
|
||||
else if (tab === 'usage') fetchUsage();
|
||||
@@ -456,7 +454,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
icon={<Check size={14} />}
|
||||
icon={<ActionCheck size={14} />}
|
||||
onClick={() => decide(r.id, 'approved')}
|
||||
>
|
||||
{t('通过')}
|
||||
@@ -465,7 +463,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
size='small'
|
||||
type='danger'
|
||||
theme='light'
|
||||
icon={<X size={14} />}
|
||||
icon={<ActionX size={14} />}
|
||||
onClick={() => decide(r.id, 'rejected')}
|
||||
>
|
||||
{t('拒绝')}
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -30,13 +31,7 @@ import {
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Activity,
|
||||
FlaskConical,
|
||||
Gauge,
|
||||
RefreshCw,
|
||||
ShieldAlert,
|
||||
} from 'lucide-react';
|
||||
import { Activity, FlaskConical, Gauge, ShieldAlert } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import { useIsMobile } from '../../hooks/common/useIsMobile';
|
||||
@@ -369,7 +364,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
|
||||
/>
|
||||
)}
|
||||
<Button
|
||||
icon={<RefreshCw size={15} />}
|
||||
icon={<ActionRefreshCw size={15} />}
|
||||
loading={loading}
|
||||
onClick={load}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
BookOpenText as ActionBookOpenText,
|
||||
UploadCloud as ActionUploadCloud,
|
||||
Settings2 as ActionSettings2,
|
||||
ClipboardCopy as ActionClipboardCopy,
|
||||
CheckCircle2 as ActionCheckCircle2,
|
||||
Building2 as ActionBuilding2,
|
||||
Search as ActionSearch,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useCallback,
|
||||
useEffect,
|
||||
@@ -38,11 +49,8 @@ import {
|
||||
Toast,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
BookOpenText,
|
||||
Boxes,
|
||||
Building2,
|
||||
CheckCircle2,
|
||||
ClipboardCopy,
|
||||
Clock4,
|
||||
Database,
|
||||
FileText,
|
||||
@@ -50,12 +58,7 @@ import {
|
||||
HardDrive,
|
||||
Link2,
|
||||
Loader2,
|
||||
Plus,
|
||||
RefreshCw,
|
||||
Search,
|
||||
Settings2,
|
||||
ShieldCheck,
|
||||
UploadCloud,
|
||||
XCircle,
|
||||
} from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
@@ -1355,13 +1358,16 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
</div>
|
||||
<div className='knowledge-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button icon={<RefreshCw size={16} />} onClick={() => fetchBases()}>
|
||||
<Button
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => fetchBases()}
|
||||
>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => setCreateVisible(true)}
|
||||
>
|
||||
{t('新建知识库')}
|
||||
@@ -1422,11 +1428,16 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
<button
|
||||
type='button'
|
||||
key={base.id}
|
||||
className={`knowledge-library-card ${active ? 'is-active' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`knowledge-library-card ${active ? 'is-active' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
onClick={() => setSelectedId(base.id)}
|
||||
>
|
||||
<span className='knowledge-library-icon'>
|
||||
<BookOpenText size={18} />
|
||||
<ActionBookOpenText size={18} />
|
||||
</span>
|
||||
<span className='knowledge-library-copy'>
|
||||
<strong>{base.name}</strong>
|
||||
@@ -1482,7 +1493,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
/>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<UploadCloud size={16} />}
|
||||
icon={<ActionUploadCloud size={16} />}
|
||||
loading={uploading}
|
||||
disabled={hasActiveJobs}
|
||||
title={
|
||||
@@ -1495,7 +1506,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
{t('上传文档')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
disabled={
|
||||
hasActiveJobs || selected.base.current_generation_id <= 0
|
||||
}
|
||||
@@ -1511,7 +1522,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
{t('重建索引')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Settings2 size={16} />}
|
||||
icon={<ActionSettings2 size={16} />}
|
||||
title={t('编辑名称、可见范围与启用状态')}
|
||||
onClick={openEditBase}
|
||||
>
|
||||
@@ -1580,7 +1591,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<ClipboardCopy size={14} />}
|
||||
icon={<ActionClipboardCopy size={14} />}
|
||||
onClick={() =>
|
||||
copyJobDiagnostics(t('重建索引任务'), reindexJob, {})
|
||||
}
|
||||
@@ -1737,7 +1748,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<ClipboardCopy size={14} />}
|
||||
icon={<ActionClipboardCopy size={14} />}
|
||||
title={t('复制任务 ID、阶段与错误详情')}
|
||||
onClick={() =>
|
||||
copyJobDiagnostics(
|
||||
@@ -1799,15 +1810,20 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
return (
|
||||
<button
|
||||
type='button'
|
||||
className={`knowledge-expert ${bound ? 'is-bound' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`knowledge-expert ${bound ? 'is-bound' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
key={expert.id}
|
||||
onClick={() => toggleExpert(expert.id, bound)}
|
||||
>
|
||||
<span>
|
||||
{bound ? (
|
||||
<CheckCircle2 size={17} />
|
||||
<ActionCheckCircle2 size={17} />
|
||||
) : (
|
||||
<Building2 size={17} />
|
||||
<ActionBuilding2 size={17} />
|
||||
)}
|
||||
</span>
|
||||
<span>
|
||||
@@ -1896,7 +1912,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
)}
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Search size={16} />}
|
||||
icon={<ActionSearch size={16} />}
|
||||
loading={searching}
|
||||
disabled={!searchQuery.trim()}
|
||||
onClick={runSearch}
|
||||
|
||||
@@ -16,17 +16,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Search as ActionSearch,
|
||||
Download as ActionDownload,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useEffect, useState, useMemo, useCallback } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
RefreshCw,
|
||||
Wallet,
|
||||
Zap,
|
||||
BarChart3,
|
||||
Download,
|
||||
Search,
|
||||
} from 'lucide-react';
|
||||
import { Wallet, Zap, BarChart3 } from 'lucide-react';
|
||||
import { Card as AntCard, Form as AntForm, Tabs as AntTabs } from 'antd';
|
||||
import {
|
||||
Table,
|
||||
@@ -812,7 +810,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
<Button onClick={handleReset}>{t('重置')}</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Search size={16} />}
|
||||
icon={<ActionSearch size={16} />}
|
||||
onClick={() => handleSearch(false)}
|
||||
loading={loading}
|
||||
>
|
||||
@@ -868,13 +866,13 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
tools={
|
||||
<>
|
||||
<Button
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={() => setExportModalVisible(true)}
|
||||
>
|
||||
{t('导出')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => handleSearch(true)}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
UserPlus as ActionUserPlus,
|
||||
Upload as ActionUpload,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -30,12 +35,7 @@ import {
|
||||
Typography,
|
||||
Tooltip,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
RefreshCw,
|
||||
UserPlus,
|
||||
Upload as UploadIcon,
|
||||
IdCard,
|
||||
} from 'lucide-react';
|
||||
import { IdCard } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
@@ -442,18 +442,18 @@ const OrgMemberAccounts = ({
|
||||
// 原型员工列表工具区:刷新 / 新建员工(主按钮)/ CSV 导入;回调不变
|
||||
const actions = (
|
||||
<>
|
||||
<Button icon={<RefreshCw size={16} />} onClick={fetchAll}>
|
||||
<Button icon={<ActionRefreshCw size={16} />} onClick={fetchAll}>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<UserPlus size={16} />}
|
||||
icon={<ActionUserPlus size={16} />}
|
||||
onClick={() => setCreateVisible(true)}
|
||||
>
|
||||
{t('创建员工账号')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<UploadIcon size={16} />}
|
||||
icon={<ActionUpload size={16} />}
|
||||
onClick={() => {
|
||||
setImportResult(null);
|
||||
setImportFile(null);
|
||||
|
||||
@@ -16,10 +16,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Pencil as ActionPencil,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useEffect, useState, useCallback, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Users, RefreshCw, Layers, Pencil, ShieldCheck } from 'lucide-react';
|
||||
import { Users, Layers, ShieldCheck } from 'lucide-react';
|
||||
import {
|
||||
Table,
|
||||
Button,
|
||||
@@ -363,7 +367,7 @@ const OrgMembers = ({
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='oc-member-remark'
|
||||
className='app-action-button oc-member-remark'
|
||||
onClick={() => {
|
||||
const current = record.remark || '';
|
||||
editingRemarkIdRef.current = record.id;
|
||||
@@ -377,7 +381,7 @@ const OrgMembers = ({
|
||||
) : (
|
||||
<span className='oc-muted'>{t('添加备注')}</span>
|
||||
)}
|
||||
<Pencil size={12} aria-hidden />
|
||||
<ActionPencil size={12} aria-hidden />
|
||||
</button>
|
||||
</Tooltip>
|
||||
);
|
||||
@@ -722,7 +726,7 @@ const OrgMembers = ({
|
||||
title={t('员工列表')}
|
||||
tools={
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => fetch(page, pageSize)}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
FileCheck2 as ActionFileCheck2,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
OctagonX as ActionOctagonX,
|
||||
Code2 as ActionCode2,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -27,7 +33,6 @@ import {
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { Code2, FileCheck2, OctagonX, RotateCcw } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, getUserIdFromLocalStorage } from '../../helpers';
|
||||
import { useIsMobile } from '../../hooks/common/useIsMobile';
|
||||
@@ -253,7 +258,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<FileCheck2 size={14} />}
|
||||
icon={<ActionFileCheck2 size={14} />}
|
||||
disabled={
|
||||
!versionId || row.review?.status !== 'reviewing' || !isReviewer
|
||||
}
|
||||
@@ -292,7 +297,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
icon={<ActionRotateCcw size={14} />}
|
||||
disabled={!versionId}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到当前列表版本'), (reason) =>
|
||||
@@ -308,7 +313,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
<Button
|
||||
size='small'
|
||||
type='danger'
|
||||
icon={<OctagonX size={14} />}
|
||||
icon={<ActionOctagonX size={14} />}
|
||||
disabled={row.definition.emergency_stopped}
|
||||
onClick={() =>
|
||||
askReason(t('紧急停用 Skill'), (reason) =>
|
||||
@@ -409,7 +414,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
</div>
|
||||
<div className='org-skills-hero-actions'>
|
||||
<PageGuideTrigger guide={guide} />
|
||||
<Button icon={<Code2 size={16} />} onClick={openCreateEditor}>
|
||||
<Button icon={<ActionCode2 size={16} />} onClick={openCreateEditor}>
|
||||
{t('创建私有 Skill')}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -589,7 +594,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
</span>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
icon={<ActionRotateCcw size={14} />}
|
||||
disabled={row.review?.status !== 'approved'}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到该历史版本'), async (reason) => {
|
||||
@@ -630,7 +635,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
render: (_, row) => (
|
||||
<Button
|
||||
size='small'
|
||||
icon={<RotateCcw size={14} />}
|
||||
icon={<ActionRotateCcw size={14} />}
|
||||
disabled={row.review?.status !== 'approved'}
|
||||
onClick={() =>
|
||||
askReason(t('回滚到该历史版本'), async (reason) => {
|
||||
|
||||
@@ -16,6 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Pencil as ActionPencil,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -29,7 +34,6 @@ import {
|
||||
Empty,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus, Pencil } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
@@ -230,7 +234,7 @@ const OrgProjectManage = ({ orgId }) => {
|
||||
/>
|
||||
<Button
|
||||
theme='light'
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={() => {
|
||||
fetchScope();
|
||||
fetchMembers();
|
||||
@@ -262,7 +266,7 @@ const OrgProjectManage = ({ orgId }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
icon={<Pencil size={14} />}
|
||||
icon={<ActionPencil size={14} />}
|
||||
onClick={() => {
|
||||
setRenameValue(currentProject?.name || '');
|
||||
setRenameModal(true);
|
||||
@@ -273,7 +277,7 @@ const OrgProjectManage = ({ orgId }) => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
onClick={() => setAddModal(true)}
|
||||
>
|
||||
{t('添加成员')}
|
||||
|
||||
@@ -16,6 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -29,7 +33,6 @@ import {
|
||||
Tag,
|
||||
Select,
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
@@ -384,12 +387,12 @@ const OrgProjects = ({ orgId }) => {
|
||||
title={t('项目列表')}
|
||||
tools={
|
||||
<>
|
||||
<Button icon={<RefreshCw size={16} />} onClick={fetchList}>
|
||||
<Button icon={<ActionRefreshCw size={16} />} onClick={fetchList}>
|
||||
{t('刷新')}
|
||||
</Button>
|
||||
<Button
|
||||
theme='solid'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('新建项目')}
|
||||
|
||||
@@ -16,18 +16,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Copy as ActionCopy,
|
||||
Search as ActionSearch,
|
||||
RotateCcw as ActionRotateCcw,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import i18next from 'i18next';
|
||||
import {
|
||||
Copy,
|
||||
Database,
|
||||
MessageSquareText,
|
||||
RefreshCw,
|
||||
RotateCcw,
|
||||
Search,
|
||||
SlidersHorizontal,
|
||||
} from 'lucide-react';
|
||||
import { Database, MessageSquareText, SlidersHorizontal } from 'lucide-react';
|
||||
import {
|
||||
Table,
|
||||
Button,
|
||||
@@ -351,10 +349,10 @@ const OrgPromptRecords = ({ orgId }) => {
|
||||
<button
|
||||
type='button'
|
||||
aria-label={t('复制提示词')}
|
||||
className='inline-flex h-7 w-7 flex-none items-center justify-center rounded-md text-gray-400 transition-colors hover:bg-brand/10 hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40'
|
||||
className='app-action-button inline-flex h-7 w-7 flex-none items-center justify-center rounded-md text-gray-400 transition-colors hover:bg-brand/10 hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40'
|
||||
onClick={(event) => handleCopyPrompt(event, text)}
|
||||
>
|
||||
<Copy size={14} />
|
||||
<ActionCopy size={14} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
)}
|
||||
@@ -473,10 +471,10 @@ const OrgPromptRecords = ({ orgId }) => {
|
||||
{record.prompt && (
|
||||
<button
|
||||
type='button'
|
||||
className='inline-flex h-8 flex-none items-center gap-1.5 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-card)] px-2.5 text-xs font-medium text-gray-600 transition-colors hover:border-brand/30 hover:bg-brand/5 hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 dark:text-gray-300'
|
||||
className='app-action-button inline-flex h-8 flex-none items-center gap-1.5 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-card)] px-2.5 text-xs font-medium text-gray-600 transition-colors hover:border-brand/30 hover:bg-brand/5 hover:text-brand focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40 dark:text-gray-300'
|
||||
onClick={(event) => handleCopyPrompt(event, record.prompt)}
|
||||
>
|
||||
<Copy size={14} />
|
||||
<ActionCopy size={14} />
|
||||
{t('复制提示词')}
|
||||
</button>
|
||||
)}
|
||||
@@ -579,13 +577,13 @@ const OrgPromptRecords = ({ orgId }) => {
|
||||
<div className='flex flex-wrap gap-2 sm:col-span-2 xl:col-span-1 xl:flex-nowrap'>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
onClick={applyFilter}
|
||||
loading={loading || membersLoading}
|
||||
>
|
||||
{t('查询')}
|
||||
</Button>
|
||||
<Button icon={<RotateCcw size={14} />} onClick={resetFilters}>
|
||||
<Button icon={<ActionRotateCcw size={14} />} onClick={resetFilters}>
|
||||
{t('重置')}
|
||||
</Button>
|
||||
</div>
|
||||
@@ -603,7 +601,7 @@ const OrgPromptRecords = ({ orgId }) => {
|
||||
}
|
||||
actions={
|
||||
<Button
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={() => fetch(page, pageSize, appliedFilters)}
|
||||
loading={loading || membersLoading}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Check as ActionCheck } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState, useCallback, useMemo } from 'react';
|
||||
import { timestamp2string } from '../../helpers/utils';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -28,7 +29,7 @@ import {
|
||||
InputNumber,
|
||||
Select,
|
||||
} from '@/components/ui';
|
||||
import { Check, CheckCircle, Clock, XCircle } from 'lucide-react';
|
||||
import { CheckCircle, Clock, XCircle } from 'lucide-react';
|
||||
import { Button as AntButton } from 'antd';
|
||||
import {
|
||||
API,
|
||||
@@ -694,7 +695,7 @@ const OrgRecharge = ({ orgId }) => {
|
||||
onClick={() => handlePreTopUp(method.type)}
|
||||
>
|
||||
{method.name}
|
||||
{selected && <Check size={14} />}
|
||||
{selected && <ActionCheck size={14} />}
|
||||
</AntButton>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -16,12 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Form as AntForm, Tabs as AntTabs } from 'antd';
|
||||
import { Table, Button, Tag, Toast, Input, Popconfirm } from '@/components/ui';
|
||||
import { RefreshCw } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
@@ -257,7 +257,7 @@ const OrgRequests = ({ orgId, orgRole, featureFlags }) => {
|
||||
title={t('申请列表')}
|
||||
tools={
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={fetchList}
|
||||
>
|
||||
|
||||
@@ -17,16 +17,14 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Home as ActionHome,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useCallback, useEffect, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
Building2,
|
||||
AlertTriangle,
|
||||
RefreshCw,
|
||||
HelpCircle,
|
||||
Home,
|
||||
} from 'lucide-react';
|
||||
import { Building2, AlertTriangle, HelpCircle } from 'lucide-react';
|
||||
import { Button } from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { UserContext } from '../../context/User';
|
||||
@@ -118,9 +116,9 @@ const OrgResolver = ({
|
||||
<div className='mt-6 text-center'>
|
||||
<button
|
||||
onClick={() => navigate('/')}
|
||||
className='inline-flex items-center gap-1.5 text-sm text-gray-400 dark:text-gray-500 hover:text-brand-deep transition-colors'
|
||||
className='app-action-button inline-flex items-center gap-1.5 text-sm text-gray-400 dark:text-gray-500 hover:text-brand-deep transition-colors'
|
||||
>
|
||||
<Home size={14} />
|
||||
<ActionHome size={14} />
|
||||
{t('返回首页')}
|
||||
</button>
|
||||
</div>
|
||||
@@ -167,7 +165,7 @@ const OrgResolver = ({
|
||||
<Button
|
||||
size='large'
|
||||
block
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => runCheck()}
|
||||
className='mt-4'
|
||||
>
|
||||
@@ -230,7 +228,7 @@ const OrgResolver = ({
|
||||
<Button
|
||||
size='large'
|
||||
block
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => runCheck()}
|
||||
className='mt-4'
|
||||
>
|
||||
@@ -260,7 +258,7 @@ const OrgResolver = ({
|
||||
type='primary'
|
||||
size='large'
|
||||
block
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => runCheck(true)}
|
||||
>
|
||||
{t('重试')}
|
||||
|
||||
@@ -17,6 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Check as ActionCheck,
|
||||
Copy as ActionCopy,
|
||||
ArrowRightLeft as ActionArrowRightLeft,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import React, {
|
||||
useEffect,
|
||||
@@ -27,7 +33,6 @@ import React, {
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { ArrowRightLeft, Copy, Check, RefreshCw } from 'lucide-react';
|
||||
import {
|
||||
Input,
|
||||
InputNumber,
|
||||
@@ -512,7 +517,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
const headingExtra = (onSave, saving, disabled = false) => (
|
||||
<AntSpace wrap>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={handleRefresh}
|
||||
loading={refreshing}
|
||||
>
|
||||
@@ -537,7 +542,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
className='oc-copy-btn'
|
||||
aria-label={label}
|
||||
title={label}
|
||||
icon={copied ? <Check size={14} /> : <Copy size={14} />}
|
||||
icon={copied ? <ActionCheck size={14} /> : <ActionCopy size={14} />}
|
||||
onClick={onClick}
|
||||
/>
|
||||
);
|
||||
@@ -900,7 +905,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
</div>
|
||||
<Button
|
||||
type='warning'
|
||||
icon={<ArrowRightLeft size={16} />}
|
||||
icon={<ActionArrowRightLeft size={16} />}
|
||||
onClick={() => setTransferModalVisible(true)}
|
||||
>
|
||||
{t('转让')}
|
||||
|
||||
@@ -16,6 +16,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
ChevronDown as ActionChevronDown,
|
||||
ChevronRight as ActionChevronRight,
|
||||
ChevronLeft as ActionChevronLeft,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useContext, useEffect, useMemo, useRef, useState } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -25,9 +30,6 @@ import {
|
||||
FileSearch,
|
||||
Receipt,
|
||||
Settings,
|
||||
ChevronDown,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
CreditCard,
|
||||
Network,
|
||||
Folder,
|
||||
@@ -536,10 +538,10 @@ const OrgSidebar = ({
|
||||
type='button'
|
||||
onClick={() => toggleGroup(group.key)}
|
||||
aria-expanded={!folded}
|
||||
className='ui-org-group-toggle'
|
||||
className='app-action-button ui-org-group-toggle'
|
||||
>
|
||||
<span>{group.label}</span>
|
||||
<ChevronDown
|
||||
<ActionChevronDown
|
||||
size={13}
|
||||
className={folded ? 'is-folded' : ''}
|
||||
aria-hidden='true'
|
||||
@@ -587,10 +589,14 @@ const OrgSidebar = ({
|
||||
<button
|
||||
type='button'
|
||||
onClick={toggleCollapsed}
|
||||
className='ui-center-sidebar-collapse'
|
||||
className='app-action-button ui-center-sidebar-collapse'
|
||||
aria-label={collapsed ? t('展开导航') : t('收起导航')}
|
||||
>
|
||||
{collapsed ? <ChevronRight size={16} /> : <ChevronLeft size={16} />}
|
||||
{collapsed ? (
|
||||
<ActionChevronRight size={16} />
|
||||
) : (
|
||||
<ActionChevronLeft size={16} />
|
||||
)}
|
||||
{!collapsed && <span>{t('收起导航')}</span>}
|
||||
</button>
|
||||
)}
|
||||
|
||||
@@ -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 {
|
||||
EyeOff as ActionEyeOff,
|
||||
Eye as ActionEye,
|
||||
Copy as ActionCopy,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { writeClipboardText } from '../../helpers/clipboard';
|
||||
import TableEmpty from '../../components/common/table/TableEmpty';
|
||||
import React, {
|
||||
@@ -27,16 +34,7 @@ import React, {
|
||||
useRef,
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
Key,
|
||||
Plus,
|
||||
Copy,
|
||||
Eye,
|
||||
EyeOff,
|
||||
Layers,
|
||||
Check,
|
||||
RefreshCw,
|
||||
} from 'lucide-react';
|
||||
import { Key, Layers, Check } from 'lucide-react';
|
||||
import {
|
||||
Table,
|
||||
Button,
|
||||
@@ -247,7 +245,13 @@ const OrgTokens = ({ orgId, orgRole }) => {
|
||||
type='text'
|
||||
size='small'
|
||||
aria-label={isVisible ? t('隐藏密钥') : t('显示密钥')}
|
||||
icon={isVisible ? <EyeOff size={16} /> : <Eye size={16} />}
|
||||
icon={
|
||||
isVisible ? (
|
||||
<ActionEyeOff size={16} />
|
||||
) : (
|
||||
<ActionEye size={16} />
|
||||
)
|
||||
}
|
||||
onClick={() => toggleShowKey(record.id)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -257,7 +261,7 @@ const OrgTokens = ({ orgId, orgRole }) => {
|
||||
type='text'
|
||||
size='small'
|
||||
aria-label={t('复制密钥')}
|
||||
icon={<Copy size={16} />}
|
||||
icon={<ActionCopy size={16} />}
|
||||
onClick={() => copyToClipboard(fullKey)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -414,7 +418,7 @@ const OrgTokens = ({ orgId, orgRole }) => {
|
||||
tools={
|
||||
<>
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => fetch(page, pageSize)}
|
||||
loading={loading}
|
||||
>
|
||||
@@ -423,7 +427,7 @@ const OrgTokens = ({ orgId, orgRole }) => {
|
||||
{canCreate && (
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => setCreateModalVisible(true)}
|
||||
>
|
||||
{t('创建密钥')}
|
||||
@@ -932,7 +936,7 @@ const CreateTokenModal = ({
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
icon={<Copy size={14} />}
|
||||
icon={<ActionCopy size={14} />}
|
||||
onClick={() => copyKey(newKey)}
|
||||
>
|
||||
{t('复制')}
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Breadcrumb,
|
||||
@@ -31,7 +32,6 @@ import {
|
||||
Wallet,
|
||||
Key,
|
||||
FileClock,
|
||||
RefreshCw,
|
||||
Clock,
|
||||
BarChart3,
|
||||
Coins,
|
||||
@@ -425,7 +425,7 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
</Button>
|
||||
<Button
|
||||
theme='light'
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={() => {
|
||||
fetchSummary();
|
||||
|
||||
@@ -16,6 +16,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
ChevronRight as ActionChevronRight,
|
||||
ChevronDown as ActionChevronDown,
|
||||
Users as ActionUsers,
|
||||
Plus as ActionPlus,
|
||||
Pencil as ActionPencil,
|
||||
Trash2 as ActionTrash2,
|
||||
LayoutGrid as ActionLayoutGrid,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
memo,
|
||||
useCallback,
|
||||
@@ -50,17 +59,7 @@ import {
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Plus,
|
||||
Pencil,
|
||||
Trash2,
|
||||
LayoutGrid,
|
||||
Network,
|
||||
Building2,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
Users,
|
||||
} from 'lucide-react';
|
||||
import { Network, Building2 } from 'lucide-react';
|
||||
import OrgScopedLimitButtons from './OrgScopedLimitButtons';
|
||||
import { buildDeptFullNameMap } from './deptTree';
|
||||
import { renderQuota } from '../../../helpers/render';
|
||||
@@ -188,7 +187,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
className='nodrag inline-flex h-5 items-center gap-0.5 rounded-md px-1 text-xs text-gray-500 transition-colors hover:bg-brand/10 hover:text-brand dark:text-gray-400'
|
||||
className='app-action-button nodrag inline-flex h-5 items-center gap-0.5 rounded-md px-1 text-xs text-gray-500 transition-colors hover:bg-brand/10 hover:text-brand dark:text-gray-400'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onToggleCollapse(dept.id);
|
||||
@@ -197,11 +196,11 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
>
|
||||
{collapsed ? (
|
||||
<>
|
||||
<ChevronRight size={13} />
|
||||
<ActionChevronRight size={13} />
|
||||
<span className='font-medium'>+{hiddenCount}</span>
|
||||
</>
|
||||
) : (
|
||||
<ChevronDown size={13} />
|
||||
<ActionChevronDown size={13} />
|
||||
)}
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -218,14 +217,14 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<Tooltip content={t('查看直属成员')}>
|
||||
<button
|
||||
type='button'
|
||||
className='nodrag inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-gray-500 transition-colors hover:bg-brand/10 hover:text-brand dark:text-gray-400'
|
||||
className='app-action-button nodrag inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-xs text-gray-500 transition-colors hover:bg-brand/10 hover:text-brand dark:text-gray-400'
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onShowMembers(dept);
|
||||
}}
|
||||
onDoubleClick={(e) => e.stopPropagation()}
|
||||
>
|
||||
<Users size={11} />
|
||||
<ActionUsers size={11} />
|
||||
{memberCount}
|
||||
</button>
|
||||
</Tooltip>
|
||||
@@ -299,7 +298,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
onClick={() => onAddChild(dept)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -309,7 +308,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
icon={<Pencil size={14} />}
|
||||
icon={<ActionPencil size={14} />}
|
||||
onClick={() => onEdit(dept)}
|
||||
/>
|
||||
</Tooltip>
|
||||
@@ -322,7 +321,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
/>
|
||||
</Popconfirm>
|
||||
</div>
|
||||
@@ -727,7 +726,7 @@ const FlowInner = ({
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
icon={<LayoutGrid size={13} />}
|
||||
icon={<ActionLayoutGrid size={13} />}
|
||||
onClick={relayout}
|
||||
>
|
||||
{t('整理布局')}
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -30,7 +31,6 @@ import { Table, Empty, Spin, Progress } from '@/components/ui';
|
||||
import '../../../styles/org-center.css';
|
||||
import { VChart } from '@visactor/react-vchart';
|
||||
import { initVChartTheme } from '@/components/ui/chartTheme';
|
||||
import { RefreshCw } from 'lucide-react';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
import { renderQuota } from '../../../helpers/render';
|
||||
@@ -547,7 +547,7 @@ const OrgAnalyticsPanel = ({
|
||||
<AntButton
|
||||
className='oc-ea-refresh'
|
||||
aria-label={t('刷新分析')}
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
loading={loading}
|
||||
onClick={() => fetchAll(true)}
|
||||
/>
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Layers as ActionLayers } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Select, Toast, Tooltip } from '@/components/ui';
|
||||
@@ -183,7 +184,7 @@ const OrgScopedLimitButtons = ({
|
||||
size: 'small',
|
||||
theme: 'light',
|
||||
type: modelConfigured ? 'primary' : 'tertiary',
|
||||
icon: <Layers size={14} />,
|
||||
icon: <ActionLayers size={14} />,
|
||||
})}
|
||||
onClick={openModelModal}
|
||||
>
|
||||
@@ -203,7 +204,7 @@ const OrgScopedLimitButtons = ({
|
||||
size: 'small',
|
||||
theme: 'light',
|
||||
type: groupConfigured ? 'primary' : 'tertiary',
|
||||
icon: <Layers size={14} />,
|
||||
icon: <ActionLayers size={14} />,
|
||||
})}
|
||||
onClick={openGroupsModal}
|
||||
>
|
||||
|
||||
@@ -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,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import TableEmpty from '../../../components/common/table/TableEmpty';
|
||||
import React, { useMemo } from 'react';
|
||||
import { Card, Table, Tag } from 'antd';
|
||||
import { Clock, Download, RefreshCw } from 'lucide-react';
|
||||
import { Clock } from 'lucide-react';
|
||||
import { Button, Pagination } from '@/components/ui';
|
||||
import { useTaskLogsData } from '../../../hooks/task-logs/useTaskLogsData';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
@@ -226,7 +230,7 @@ const OrgTaskRecords = () => {
|
||||
)}
|
||||
{/* 导出当前页为 CSV,空列表时禁用 */}
|
||||
<Button
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={() => exportTaskLogsPageCsv(logs, isAdminUser, t)}
|
||||
disabled={!logs || logs.length === 0}
|
||||
>
|
||||
@@ -234,7 +238,7 @@ const OrgTaskRecords = () => {
|
||||
</Button>
|
||||
{/* 与筛选“搜索”同一处理函数(同步 URL 筛选条件并重新加载第 1 页) */}
|
||||
<Button
|
||||
icon={<RefreshCw size={16} />}
|
||||
icon={<ActionRefreshCw size={16} />}
|
||||
onClick={() => taskLogsData.refresh()}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Menu as ActionMenu } from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useContext,
|
||||
useEffect,
|
||||
@@ -28,7 +29,6 @@ import { Routes, Route, Navigate, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button } from '@/components/ui';
|
||||
import OrgSideSheet from './components/OrgSideSheet';
|
||||
import { Menu } from 'lucide-react';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { useMarquee } from '../../hooks/common/useMarquee';
|
||||
import { UserContext } from '../../context/User';
|
||||
@@ -486,7 +486,7 @@ const Organization = () => {
|
||||
{/* 移动端顶栏:汉堡菜单 + 当前企业名(窄屏唯一的菜单入口) */}
|
||||
<div className='md:hidden flex items-center gap-2 px-3 h-12 flex-shrink-0 border-b border-[var(--border-subtle)] bg-[var(--surface-header)] relative z-20'>
|
||||
<Button
|
||||
icon={<Menu size={20} />}
|
||||
icon={<ActionMenu size={20} />}
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
onClick={() => setMobileNavOpen(true)}
|
||||
|
||||
@@ -16,6 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Copy as ActionCopy,
|
||||
ReceiptText as ActionReceiptText,
|
||||
ChevronRight as ActionChevronRight,
|
||||
Pencil as ActionPencil,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import {
|
||||
Badge,
|
||||
@@ -32,13 +38,10 @@ import {
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ChevronRight,
|
||||
Copy,
|
||||
CreditCard,
|
||||
Info,
|
||||
Megaphone,
|
||||
Network,
|
||||
Pencil,
|
||||
ReceiptText,
|
||||
Users,
|
||||
Wallet,
|
||||
@@ -163,11 +166,11 @@ const PartnerCodeChip = ({ code, t }) => (
|
||||
if (await copy(code)) showSuccess(t('伙伴编号已复制'));
|
||||
else showError(t('复制失败,请手动复制'));
|
||||
}}
|
||||
className='flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-brand/10 text-brand-deep hover:bg-brand/20 transition-colors text-xs font-mono font-semibold cursor-pointer border-none'
|
||||
className='app-action-button flex items-center gap-1.5 px-2.5 py-1 rounded-md bg-brand/10 text-brand-deep hover:bg-brand/20 transition-colors text-xs font-mono font-semibold cursor-pointer border-none'
|
||||
title={t('点击复制')}
|
||||
>
|
||||
{code}
|
||||
<Copy size={12} />
|
||||
<ActionCopy size={12} />
|
||||
</button>
|
||||
);
|
||||
|
||||
@@ -340,17 +343,17 @@ function Overview({ dashboard, t, onGoto }) {
|
||||
<button
|
||||
type='button'
|
||||
onClick={() => onGoto?.('bills')}
|
||||
className='w-full flex items-center justify-between gap-2 rounded-lg bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 px-4 py-3 mt-4 cursor-pointer hover:bg-orange-100 dark:hover:bg-orange-900/30 transition-colors'
|
||||
className='app-action-button w-full flex items-center justify-between gap-2 rounded-lg bg-orange-50 dark:bg-orange-900/20 border border-orange-200 dark:border-orange-800 px-4 py-3 mt-4 cursor-pointer hover:bg-orange-100 dark:hover:bg-orange-900/30 transition-colors'
|
||||
>
|
||||
<span className='flex items-center gap-2 text-sm text-orange-700 dark:text-orange-300'>
|
||||
<ReceiptText size={15} className='flex-shrink-0' />
|
||||
<ActionReceiptText size={15} className='flex-shrink-0' />
|
||||
{t('您有 {{n}} 张账单待确认,请尽快核对——确认后才会进入打款流程', {
|
||||
n: pendingBills,
|
||||
})}
|
||||
</span>
|
||||
<span className='flex items-center gap-0.5 text-sm font-medium text-orange-700 dark:text-orange-300 flex-shrink-0'>
|
||||
{t('去确认')}
|
||||
<ChevronRight size={15} />
|
||||
<ActionChevronRight size={15} />
|
||||
</span>
|
||||
</button>
|
||||
)}
|
||||
@@ -1157,7 +1160,7 @@ function PayoutAccount({ t, readOnly }) {
|
||||
</div>
|
||||
{!readOnly && (
|
||||
<Button
|
||||
icon={<Pencil size={14} />}
|
||||
icon={<ActionPencil size={14} />}
|
||||
size='small'
|
||||
onClick={() => setEditing(true)}
|
||||
>
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { PanelLeftOpen as ActionPanelLeftOpen } from '@/components/common/icons/ActionIcons';
|
||||
import React, {
|
||||
useContext,
|
||||
useEffect,
|
||||
@@ -26,7 +27,7 @@ import React, {
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Spin } from '@/components/ui';
|
||||
import { PanelLeftOpen, ListChecks } from 'lucide-react';
|
||||
import { ListChecks } from 'lucide-react';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Layout, Toast, Modal, Banner } from '@/components/ui';
|
||||
@@ -1579,9 +1580,9 @@ const Playground = ({ isExperienceMode = false }) => {
|
||||
type='button'
|
||||
onClick={() => setShowSessionDrawer(true)}
|
||||
aria-label={t('Open conversations')}
|
||||
className='bg-white/90 dark:bg-neutral-800/90 backdrop-blur border border-gray-200/80 dark:border-neutral-700/80 rounded-full shadow-sm flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-200 active:scale-95 transition'
|
||||
className='app-action-button bg-white/90 dark:bg-neutral-800/90 backdrop-blur border border-gray-200/80 dark:border-neutral-700/80 rounded-full shadow-sm flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-200 active:scale-95 transition'
|
||||
>
|
||||
<PanelLeftOpen size={14} />
|
||||
<ActionPanelLeftOpen size={14} />
|
||||
{t('Conversations')}
|
||||
</button>
|
||||
{!selectionMode && message.length > 0 && (
|
||||
@@ -1589,7 +1590,7 @@ const Playground = ({ isExperienceMode = false }) => {
|
||||
type='button'
|
||||
onClick={enterSelectionMode}
|
||||
aria-label={t('多选导出')}
|
||||
className='bg-white/90 dark:bg-neutral-800/90 backdrop-blur border border-gray-200/80 dark:border-neutral-700/80 rounded-full shadow-sm flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-200 active:scale-95 transition'
|
||||
className='app-action-button bg-white/90 dark:bg-neutral-800/90 backdrop-blur border border-gray-200/80 dark:border-neutral-700/80 rounded-full shadow-sm flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium text-gray-700 dark:text-gray-200 active:scale-95 transition'
|
||||
>
|
||||
<ListChecks size={14} />
|
||||
{t('多选')}
|
||||
|
||||
@@ -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 { Check as ActionCheck } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { getCurrencyConfig } from '../../helpers/render';
|
||||
import { renderQuota } from '../../helpers';
|
||||
import { calculatePresetPayableAmount } from '../../helpers/rechargeAmount';
|
||||
import { Check } from 'lucide-react';
|
||||
|
||||
// 折扣角标:0.99 → 99折,0.9 → 9折(与原型一致的中文折扣写法)
|
||||
const formatDiscountRate = (discount) => {
|
||||
@@ -65,7 +65,12 @@ const AmountCard = ({
|
||||
type='button'
|
||||
onClick={onClick}
|
||||
aria-pressed={selected}
|
||||
className={`rc-amount ${selected ? 'selected' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`rc-amount ${selected ? 'selected' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
>
|
||||
{/* 角标:优先显示自定义badge,其次显示折扣 */}
|
||||
{badge ? (
|
||||
@@ -110,7 +115,7 @@ const AmountCard = ({
|
||||
<span className='rc-amount-bonus'>+{renderQuota(bonus)}</span>
|
||||
)}
|
||||
|
||||
{selected && <Check size={12} className='rc-amount-check' />}
|
||||
{selected && <ActionCheck size={12} className='rc-amount-check' />}
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Search as ActionSearch } from '@/components/common/icons/ActionIcons';
|
||||
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
|
||||
import React, { useState, useEffect, useMemo } from 'react';
|
||||
import { Button as AntButton, Empty as AntEmpty, Tag as AntTag } from 'antd';
|
||||
@@ -29,7 +30,6 @@ import {
|
||||
Toast,
|
||||
Pagination,
|
||||
} from '@/components/ui';
|
||||
import { Search } from 'lucide-react';
|
||||
import { API, timestamp2string } from '../../helpers';
|
||||
import { isAdmin } from '../../helpers/utils';
|
||||
|
||||
@@ -221,7 +221,7 @@ const HistoryPanel = ({ t, refreshTrigger }) => {
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Search size={14} />}
|
||||
icon={<ActionSearch size={14} />}
|
||||
onClick={() => loadTopups(page, pageSize)}
|
||||
>
|
||||
{t('搜索')}
|
||||
|
||||
@@ -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 {
|
||||
Check as ActionCheck,
|
||||
ArrowUpRight as ActionArrowUpRight,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState, useContext } from 'react';
|
||||
import { Segmented } from 'antd';
|
||||
import {
|
||||
@@ -28,7 +32,7 @@ import {
|
||||
Banner,
|
||||
Progress,
|
||||
} from '@/components/ui';
|
||||
import { ArrowUpRight, Crown, Zap, Check, Clock } from 'lucide-react';
|
||||
import { Crown, Zap, Clock } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { UserContext } from '../../context/User';
|
||||
import { API, showError, showSuccess, renderQuota } from '../../helpers';
|
||||
@@ -441,7 +445,12 @@ const MembershipPanel = () => {
|
||||
type='button'
|
||||
onClick={() => handlePlanClick(plan)}
|
||||
aria-pressed={isSelected}
|
||||
className={`rc-plan ${isSelected ? 'selected' : ''}`}
|
||||
className={[
|
||||
'app-action-button',
|
||||
`rc-plan ${isSelected ? 'selected' : ''}`,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' ')}
|
||||
>
|
||||
{(plan.badge || plan.is_recommend) && (
|
||||
<span className='rc-plan-badge'>
|
||||
@@ -467,15 +476,15 @@ const MembershipPanel = () => {
|
||||
)}
|
||||
<ul className='rc-plan-features'>
|
||||
<li>
|
||||
<Check size={12} />
|
||||
<ActionCheck size={12} />
|
||||
{t('每日自动重置额度')}
|
||||
</li>
|
||||
<li>
|
||||
<Check size={12} />
|
||||
<ActionCheck size={12} />
|
||||
{t('会员额度优先消耗')}
|
||||
</li>
|
||||
<li>
|
||||
<Check size={12} />
|
||||
<ActionCheck size={12} />
|
||||
{t('额度用完转账户余额')}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -485,9 +494,9 @@ const MembershipPanel = () => {
|
||||
{subText && <small>{subText}</small>}
|
||||
</span>
|
||||
{isSelected ? (
|
||||
<Check size={14} />
|
||||
<ActionCheck size={14} />
|
||||
) : (
|
||||
<ArrowUpRight size={14} />
|
||||
<ActionArrowUpRight size={14} />
|
||||
)}
|
||||
</span>
|
||||
</button>
|
||||
|
||||
@@ -17,10 +17,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Check as ActionCheck } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Alert } from 'antd';
|
||||
import { Button, Spin, Tooltip } from '@/components/ui';
|
||||
import { Check } from 'lucide-react';
|
||||
import {
|
||||
AlipayBrandIcon,
|
||||
StripeBrandIcon,
|
||||
@@ -226,7 +226,7 @@ const RechargePanel = ({
|
||||
className={`rc-pay-method ${selected ? 'is-selected' : ''}`}
|
||||
>
|
||||
{method.name}
|
||||
{selected && <Check size={14} />}
|
||||
{selected && <ActionCheck size={14} />}
|
||||
</Button>
|
||||
);
|
||||
if (disabled && minTopupVal > Number(topUpCount || 0)) {
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { ExternalLink as ActionExternalLink } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Input, Skeleton } from '@/components/ui';
|
||||
import { ExternalLink } from 'lucide-react';
|
||||
import { useMinimumLoadingTime } from '../../hooks/common/useMinimumLoadingTime';
|
||||
|
||||
/**
|
||||
@@ -78,8 +78,12 @@ const WalletCard = ({
|
||||
{topUpLink && (
|
||||
<div className='rc-wallet-link'>
|
||||
{t('在找兑换码?')}{' '}
|
||||
<button type='button' onClick={openTopUpLink}>
|
||||
{t('购买兑换码')} <ExternalLink size={12} />
|
||||
<button
|
||||
className='app-action-button'
|
||||
type='button'
|
||||
onClick={openTopUpLink}
|
||||
>
|
||||
{t('购买兑换码')} <ActionExternalLink size={12} />
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Zap as ActionZap,
|
||||
ChevronRight as ActionChevronRight,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import {
|
||||
Empty,
|
||||
@@ -28,7 +33,7 @@ import {
|
||||
Statistic,
|
||||
theme,
|
||||
} from 'antd';
|
||||
import { RefreshCw, Server, ChevronRight, Zap, Clock } from 'lucide-react';
|
||||
import { Server, ChevronRight, Clock } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError } from '../../helpers';
|
||||
import { isAdmin } from '../../helpers/utils';
|
||||
@@ -175,7 +180,7 @@ const TestModelCell = ({ modelName, groupName, t }) => {
|
||||
return (
|
||||
<div className='flex items-center gap-3'>
|
||||
<Button size='small' loading={testing} onClick={handleTest}>
|
||||
<Zap size={12} className='mr-1' />
|
||||
<ActionZap size={12} className='mr-1' />
|
||||
{testing ? t('测试中') : t('测试')}
|
||||
</Button>
|
||||
{result && (
|
||||
@@ -548,7 +553,7 @@ const GroupMonitor = () => {
|
||||
}}
|
||||
>
|
||||
{t('详情')}
|
||||
<ChevronRight
|
||||
<ActionChevronRight
|
||||
size={16}
|
||||
className='transition-transform group-hover:translate-x-0.5'
|
||||
/>
|
||||
@@ -677,7 +682,7 @@ const GroupMonitor = () => {
|
||||
|
||||
<Button
|
||||
icon={
|
||||
<RefreshCw
|
||||
<ActionRefreshCw
|
||||
className={`w-4 h-4 ${refreshing ? 'animate-spin' : ''}`}
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { RefreshCw as ActionRefreshCw } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect, useCallback } from 'react';
|
||||
import {
|
||||
Card,
|
||||
@@ -39,7 +40,6 @@ import {
|
||||
AlertTriangle,
|
||||
CheckCircle,
|
||||
XCircle,
|
||||
RefreshCw,
|
||||
ChevronDown,
|
||||
ChevronUp,
|
||||
} from 'lucide-react';
|
||||
@@ -554,7 +554,7 @@ const GroupMonitorAdmin = () => {
|
||||
<div className='flex justify-end mb-4'>
|
||||
<Button
|
||||
icon={
|
||||
<RefreshCw
|
||||
<ActionRefreshCw
|
||||
className={`w-4 h-4 ${refreshing ? 'animate-spin' : ''}`}
|
||||
/>
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
Tag,
|
||||
Popconfirm,
|
||||
} from '@/components/ui';
|
||||
import { IconPlus, IconEdit, IconDelete } from '@/components/ui/icons';
|
||||
import { IconPlus } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
|
||||
@@ -119,18 +119,14 @@ const AmountOptionsManager = ({
|
||||
title: t('操作'),
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
size='small'
|
||||
icon={<IconEdit />}
|
||||
onClick={() => handleEdit(record)}
|
||||
>
|
||||
<Button onClick={() => handleEdit(record)} type='link' size='small'>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定删除该档位吗?')}
|
||||
onConfirm={() => handleDelete(record.id)}
|
||||
>
|
||||
<Button size='small' type='danger' icon={<IconDelete />}>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
@@ -19,6 +19,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import { useEffectEvent } from '../../../hooks/common/useEffectEvent';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import { Button as AntButton } from 'antd';
|
||||
import './settings-chats.css';
|
||||
import {
|
||||
Banner,
|
||||
Button,
|
||||
@@ -32,13 +34,7 @@ import {
|
||||
Input,
|
||||
Divider,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IconPlus,
|
||||
IconEdit,
|
||||
IconDelete,
|
||||
IconSearch,
|
||||
IconSaveStroked,
|
||||
} from '@/components/ui/icons';
|
||||
import { IconPlus, IconSearch, IconSaveStroked } from '@/components/ui/icons';
|
||||
import {
|
||||
compareObjects,
|
||||
API,
|
||||
@@ -107,8 +103,9 @@ export default function SettingsChats(props) {
|
||||
async function onSubmit() {
|
||||
try {
|
||||
console.log('Starting validation...');
|
||||
await refForm.current
|
||||
.validate()
|
||||
await (
|
||||
editMode === 'json' ? refForm.current.validate() : Promise.resolve()
|
||||
)
|
||||
.then(() => {
|
||||
console.log('Validation passed');
|
||||
const updateArray = compareObjects(inputs, inputsRow);
|
||||
@@ -196,22 +193,12 @@ export default function SettingsChats(props) {
|
||||
setEditingConfig({ name: '', url: '' });
|
||||
setIsEdit(false);
|
||||
setModalVisible(true);
|
||||
setTimeout(() => {
|
||||
if (modalFormRef.current) {
|
||||
modalFormRef.current.setValues({ name: '', url: '' });
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
|
||||
const handleEditConfig = (config) => {
|
||||
setEditingConfig({ ...config });
|
||||
setIsEdit(true);
|
||||
setModalVisible(true);
|
||||
setTimeout(() => {
|
||||
if (modalFormRef.current) {
|
||||
modalFormRef.current.setValues(config);
|
||||
}
|
||||
}, 100);
|
||||
};
|
||||
|
||||
const handleDeleteConfig = (id) => {
|
||||
@@ -325,22 +312,21 @@ export default function SettingsChats(props) {
|
||||
key: 'action',
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<IconEdit />}
|
||||
<AntButton
|
||||
type='link'
|
||||
size='small'
|
||||
onClick={() => handleEditConfig(record)}
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
type='danger'
|
||||
icon={<IconDelete />}
|
||||
</AntButton>
|
||||
<AntButton
|
||||
type='link'
|
||||
danger
|
||||
size='small'
|
||||
onClick={() => handleDeleteConfig(record.id)}
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</AntButton>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
@@ -369,13 +355,6 @@ export default function SettingsChats(props) {
|
||||
onChange={(e) => {
|
||||
const newMode = e.target.value;
|
||||
setEditMode(newMode);
|
||||
|
||||
// 确保模式切换时数据正确同步
|
||||
setTimeout(() => {
|
||||
if (newMode === 'json' && refForm.current) {
|
||||
refForm.current.setValues(inputs);
|
||||
}
|
||||
}, 100);
|
||||
}}
|
||||
>
|
||||
<Radio value='visual'>{t('可视化编辑')}</Radio>
|
||||
@@ -385,31 +364,33 @@ export default function SettingsChats(props) {
|
||||
|
||||
{editMode === 'visual' ? (
|
||||
<div>
|
||||
<Space style={{ marginBottom: 16 }}>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<IconPlus />}
|
||||
onClick={handleAddConfig}
|
||||
>
|
||||
{t('添加聊天配置')}
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
theme='solid'
|
||||
icon={<IconSaveStroked />}
|
||||
onClick={onSubmit}
|
||||
>
|
||||
{t('保存聊天设置')}
|
||||
</Button>
|
||||
<div className='settings-chats-toolbar'>
|
||||
<Input
|
||||
prefix={<IconSearch />}
|
||||
placeholder={t('搜索聊天应用名称')}
|
||||
value={searchText}
|
||||
onChange={(value) => setSearchText(value)}
|
||||
style={{ width: 250 }}
|
||||
className='settings-chats-search'
|
||||
showClear
|
||||
/>
|
||||
</Space>
|
||||
<div className='settings-chats-actions'>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<IconPlus />}
|
||||
onClick={handleAddConfig}
|
||||
>
|
||||
{t('添加聊天配置')}
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
theme='solid'
|
||||
icon={<IconSaveStroked />}
|
||||
onClick={onSubmit}
|
||||
>
|
||||
{t('保存聊天设置')}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Table
|
||||
columns={columns}
|
||||
@@ -481,7 +462,10 @@ export default function SettingsChats(props) {
|
||||
onCancel={handleModalCancel}
|
||||
width={600}
|
||||
>
|
||||
<Form getFormApi={(api) => (modalFormRef.current = api)}>
|
||||
<Form
|
||||
values={editingConfig}
|
||||
getFormApi={(api) => (modalFormRef.current = api)}
|
||||
>
|
||||
<Form.Input
|
||||
field='name'
|
||||
label={t('聊天应用名称')}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
.settings-chats-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
gap: 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.settings-chats-search {
|
||||
width: 250px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.settings-chats-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
gap: 8px;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.settings-chats-search {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Plus as ActionPlus,
|
||||
Trash2 as ActionTrash2,
|
||||
Save as ActionSave,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -35,7 +40,7 @@ import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import { Plus, Edit, Trash2, Save, Settings } from 'lucide-react';
|
||||
import { Settings } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -277,20 +282,17 @@ const SettingsAPIInfo = ({ options, refresh }) => {
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<Edit size={14} />}
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
size='small'
|
||||
onClick={() => handleEditApi(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
size='small'
|
||||
onClick={() => handleDeleteApi(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
@@ -338,14 +340,14 @@ const SettingsAPIInfo = ({ options, refresh }) => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='primary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
className='w-full md:w-auto'
|
||||
onClick={handleAddApi}
|
||||
>
|
||||
{t('添加API')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
onClick={handleBatchDelete}
|
||||
@@ -356,7 +358,7 @@ const SettingsAPIInfo = ({ options, refresh }) => {
|
||||
{selectedRowKeys.length > 0 && `(${selectedRowKeys.length})`}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Save size={14} />}
|
||||
icon={<ActionSave size={14} />}
|
||||
onClick={submitApiInfo}
|
||||
loading={loading}
|
||||
disabled={!hasChanges}
|
||||
|
||||
@@ -17,6 +17,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Plus as ActionPlus,
|
||||
Trash2 as ActionTrash2,
|
||||
Save as ActionSave,
|
||||
Maximize2 as ActionMaximize2,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -36,7 +42,7 @@ import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import { Plus, Edit, Trash2, Save, Bell, Maximize2 } from 'lucide-react';
|
||||
import { Bell } from 'lucide-react';
|
||||
import {
|
||||
API,
|
||||
showError,
|
||||
@@ -175,20 +181,17 @@ const SettingsAnnouncements = ({ options, refresh }) => {
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<Edit size={14} />}
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
size='small'
|
||||
onClick={() => handleEditAnnouncement(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
size='small'
|
||||
onClick={() => handleDeleteAnnouncement(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
@@ -410,14 +413,14 @@ const SettingsAnnouncements = ({ options, refresh }) => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='primary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
className='w-full md:w-auto'
|
||||
onClick={handleAddAnnouncement}
|
||||
>
|
||||
{t('添加公告')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
onClick={handleBatchDelete}
|
||||
@@ -428,7 +431,7 @@ const SettingsAnnouncements = ({ options, refresh }) => {
|
||||
{selectedRowKeys.length > 0 && `(${selectedRowKeys.length})`}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Save size={14} />}
|
||||
icon={<ActionSave size={14} />}
|
||||
onClick={submitAnnouncements}
|
||||
loading={loading}
|
||||
disabled={!hasChanges}
|
||||
@@ -551,7 +554,7 @@ const SettingsAnnouncements = ({ options, refresh }) => {
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
size='small'
|
||||
icon={<Maximize2 size={14} />}
|
||||
icon={<ActionMaximize2 size={14} />}
|
||||
style={{ marginBottom: 16 }}
|
||||
onClick={() => setShowContentModal(true)}
|
||||
>
|
||||
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Plus as ActionPlus,
|
||||
Trash2 as ActionTrash2,
|
||||
Save as ActionSave,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -34,7 +39,7 @@ import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import { Plus, Edit, Trash2, Save, HelpCircle } from 'lucide-react';
|
||||
import { HelpCircle } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -111,20 +116,17 @@ const SettingsFAQ = ({ options, refresh }) => {
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<Edit size={14} />}
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
size='small'
|
||||
onClick={() => handleEditFaq(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
size='small'
|
||||
onClick={() => handleDeleteFaq(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
@@ -329,14 +331,14 @@ const SettingsFAQ = ({ options, refresh }) => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='primary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
className='w-full md:w-auto'
|
||||
onClick={handleAddFaq}
|
||||
>
|
||||
{t('添加问答')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
onClick={handleBatchDelete}
|
||||
@@ -347,7 +349,7 @@ const SettingsFAQ = ({ options, refresh }) => {
|
||||
{selectedRowKeys.length > 0 && `(${selectedRowKeys.length})`}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Save size={14} />}
|
||||
icon={<ActionSave size={14} />}
|
||||
onClick={submitFAQ}
|
||||
loading={loading}
|
||||
disabled={!hasChanges}
|
||||
|
||||
@@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
Plus as ActionPlus,
|
||||
Trash2 as ActionTrash2,
|
||||
Save as ActionSave,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Button,
|
||||
@@ -33,7 +38,7 @@ import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import { Plus, Edit, Trash2, Save, Activity } from 'lucide-react';
|
||||
import { Activity } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -116,20 +121,17 @@ const SettingsUptimeKuma = ({ options, refresh }) => {
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<Edit size={14} />}
|
||||
theme='light'
|
||||
type='tertiary'
|
||||
size='small'
|
||||
onClick={() => handleEditGroup(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
size='small'
|
||||
onClick={() => handleDeleteGroup(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
@@ -352,14 +354,14 @@ const SettingsUptimeKuma = ({ options, refresh }) => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='primary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
className='w-full md:w-auto'
|
||||
onClick={handleAddGroup}
|
||||
>
|
||||
{t('添加分类')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Trash2 size={14} />}
|
||||
icon={<ActionTrash2 size={14} />}
|
||||
type='danger'
|
||||
theme='light'
|
||||
onClick={handleBatchDelete}
|
||||
@@ -370,7 +372,7 @@ const SettingsUptimeKuma = ({ options, refresh }) => {
|
||||
{selectedRowKeys.length > 0 && `(${selectedRowKeys.length})`}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<Save size={14} />}
|
||||
icon={<ActionSave size={14} />}
|
||||
onClick={submitUptimeGroups}
|
||||
loading={loading}
|
||||
disabled={!hasChanges}
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Tag,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { IconDelete, IconEdit, IconPlus } from '@/components/ui/icons';
|
||||
import { IconDelete, IconPlus } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
|
||||
@@ -356,23 +356,20 @@ export default function SettingImagePricing({ options, refresh }) {
|
||||
render: (_text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
theme='borderless'
|
||||
aria-label={t('编辑')}
|
||||
onClick={() => openEdit(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定删除此图片定价配置吗?')}
|
||||
onConfirm={() => remove(index)}
|
||||
>
|
||||
<Button
|
||||
icon={<IconDelete />}
|
||||
size='small'
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
aria-label={t('删除')}
|
||||
/>
|
||||
<Button aria-label={t('删除')} type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
|
||||
@@ -246,7 +246,11 @@ const SettingModelCategory = () => {
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button size='small' onClick={() => handleEditLevel1(record)}>
|
||||
<Button
|
||||
onClick={() => handleEditLevel1(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('修改')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@@ -256,7 +260,7 @@ const SettingModelCategory = () => {
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
>
|
||||
<Button size='small' type='danger'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -292,7 +296,11 @@ const SettingModelCategory = () => {
|
||||
width: 150,
|
||||
render: (text, record) => (
|
||||
<Space>
|
||||
<Button size='small' onClick={() => handleEditLevel2(record)}>
|
||||
<Button
|
||||
onClick={() => handleEditLevel2(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('修改')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
@@ -302,7 +310,7 @@ const SettingModelCategory = () => {
|
||||
okText={t('确定')}
|
||||
cancelText={t('取消')}
|
||||
>
|
||||
<Button size='small' type='danger'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -402,20 +410,19 @@ const SettingModelCategory = () => {
|
||||
{t('新建二级分类')}
|
||||
</Button>
|
||||
</div>
|
||||
{selectedLevel1Id ? (
|
||||
<Table
|
||||
// 列宽合计远超窄屏视口;没有 scroll 时表格会压缩到 min-content 硬塞进去,
|
||||
// 末尾的操作列落在视口外,且 iOS 上滚动条不可见、毫无可拖动提示
|
||||
scroll={{ x: 'max-content' }}
|
||||
columns={level2Columns}
|
||||
dataSource={level2Categories}
|
||||
rowKey='id'
|
||||
pagination={false}
|
||||
empty={<Empty description={t('暂无数据')} />}
|
||||
/>
|
||||
) : (
|
||||
<Empty description={t('请先选择一级分类')} />
|
||||
{!selectedLevel1Id && (
|
||||
<div className='mb-3'>{t('请先选择一级分类')}</div>
|
||||
)}
|
||||
<Table
|
||||
// 列宽合计远超窄屏视口;没有 scroll 时表格会压缩到 min-content 硬塞进去,
|
||||
// 末尾的操作列落在视口外,且 iOS 上滚动条不可见、毫无可拖动提示
|
||||
scroll={{ x: 'max-content' }}
|
||||
columns={level2Columns}
|
||||
dataSource={level2Categories}
|
||||
rowKey='id'
|
||||
pagination={false}
|
||||
empty={<Empty description={t('暂无数据')} />}
|
||||
/>
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Switch,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { IconPlus, IconDelete, IconEdit } from '@/components/ui/icons';
|
||||
import { IconPlus, IconDelete } from '@/components/ui/icons';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -373,15 +373,19 @@ export default function SettingVideoModel(props) {
|
||||
render: (text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
onClick={() => handleEditPricing(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定要删除此定价配置吗?')}
|
||||
onConfirm={() => handleDeletePricing(index)}
|
||||
>
|
||||
<Button icon={<IconDelete />} size='small' type='danger' />
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
@@ -450,15 +454,19 @@ export default function SettingVideoModel(props) {
|
||||
render: (text, record, index) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
onClick={() => handleEditModel(record, index)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定要删除此模型吗?')}
|
||||
onConfirm={() => handleDeleteModel(index)}
|
||||
>
|
||||
<Button icon={<IconDelete />} size='small' type='danger' />
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
|
||||
@@ -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 {
|
||||
Save as ActionSave,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import { useEffectEvent } from '../../../hooks/common/useEffectEvent';
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
@@ -36,8 +40,6 @@ import {
|
||||
import {
|
||||
Bot,
|
||||
Sparkles,
|
||||
Save,
|
||||
RefreshCw,
|
||||
Globe,
|
||||
Paperclip,
|
||||
Image,
|
||||
@@ -1132,14 +1134,14 @@ export default function SettingsExperienceCenter({ options, refresh }) {
|
||||
<div className='flex gap-2 mt-6'>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Save size={14} />}
|
||||
icon={<ActionSave size={14} />}
|
||||
onClick={handleSave}
|
||||
loading={saving}
|
||||
>
|
||||
{t('保存配置')}
|
||||
</Button>
|
||||
<Button
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={loadAllModels}
|
||||
loading={loading}
|
||||
>
|
||||
|
||||
@@ -20,6 +20,12 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
// 运营设置 → 语言与地区:按访客 IP 国家自动选择界面语言的配置卡片。
|
||||
// 整份配置存于单个 option key "LanguageSetting"(JSON),后端入库前整份校验;
|
||||
// 这里的前端校验只为即时提示,口径与 setting/language_setting.Validate 一致。
|
||||
import {
|
||||
ArrowUp as ActionArrowUp,
|
||||
ArrowDown as ActionArrowDown,
|
||||
Trash2 as ActionTrash2,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
Banner,
|
||||
@@ -34,7 +40,6 @@ import {
|
||||
Switch,
|
||||
Typography,
|
||||
} from '@/components/ui';
|
||||
import { ArrowDown, ArrowUp, Plus, Trash2 } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess, showWarning } from '../../../helpers';
|
||||
import { LANGUAGE_CATALOG, getLanguageEntry } from '../../../i18n/catalog';
|
||||
@@ -476,7 +481,7 @@ export default function SettingsLanguage(props) {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
icon={<ArrowUp size={14} />}
|
||||
icon={<ActionArrowUp size={14} />}
|
||||
aria-label={t('上移')}
|
||||
disabled={index === 0}
|
||||
onClick={() => moveLanguage(index, -1)}
|
||||
@@ -485,7 +490,7 @@ export default function SettingsLanguage(props) {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
icon={<ArrowDown size={14} />}
|
||||
icon={<ActionArrowDown size={14} />}
|
||||
aria-label={t('下移')}
|
||||
disabled={index === enabledEntries.length - 1}
|
||||
onClick={() => moveLanguage(index, 1)}
|
||||
@@ -572,7 +577,7 @@ export default function SettingsLanguage(props) {
|
||||
<Button
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
icon={<Trash2 size={16} />}
|
||||
icon={<ActionTrash2 size={16} />}
|
||||
aria-label={t('删除规则')}
|
||||
onClick={() => removeRule(index)}
|
||||
/>
|
||||
@@ -582,7 +587,7 @@ export default function SettingsLanguage(props) {
|
||||
</div>
|
||||
<Button
|
||||
className='!mt-3'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
disabled={!nextRuleLanguage}
|
||||
onClick={addRule}
|
||||
>
|
||||
|
||||
@@ -34,12 +34,7 @@ import {
|
||||
Select,
|
||||
Popconfirm,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IconPlus,
|
||||
IconDelete,
|
||||
IconEdit,
|
||||
IconRefresh,
|
||||
} from '@/components/ui/icons';
|
||||
import { IconPlus, IconRefresh } from '@/components/ui/icons';
|
||||
import { Crown, Sparkles, Zap } from 'lucide-react';
|
||||
import { API, showError, showSuccess, renderQuota } from '../../../helpers';
|
||||
import QuotaInput from '../../../components/common/ui/QuotaInput';
|
||||
@@ -265,18 +260,22 @@ export default function SettingsMembership() {
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button
|
||||
icon={<IconEdit />}
|
||||
size='small'
|
||||
onClick={() => {
|
||||
setEditingPlan({ ...record });
|
||||
setEditModalVisible(true);
|
||||
}}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定删除此方案?')}
|
||||
onConfirm={() => deletePlan(record.id)}
|
||||
>
|
||||
<Button icon={<IconDelete />} size='small' type='danger' />
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
</Space>
|
||||
),
|
||||
|
||||
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { Plus as ActionPlus } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useState, useRef } from 'react';
|
||||
import {
|
||||
Banner,
|
||||
@@ -34,7 +35,6 @@ import {
|
||||
const { Text } = Typography;
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Plus, Trash2 } from 'lucide-react';
|
||||
|
||||
export default function SettingsPaymentGatewayCreem(props) {
|
||||
const { t } = useTranslation();
|
||||
@@ -234,19 +234,20 @@ export default function SettingsPaymentGatewayCreem(props) {
|
||||
render: (_, record) => (
|
||||
<div className='flex gap-2'>
|
||||
<Button
|
||||
type='tertiary'
|
||||
size='small'
|
||||
onClick={() => openProductModal(record)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
type='danger'
|
||||
theme='borderless'
|
||||
size='small'
|
||||
icon={<Trash2 size={14} />}
|
||||
onClick={() => deleteProduct(record.productId)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
@@ -302,7 +303,7 @@ export default function SettingsPaymentGatewayCreem(props) {
|
||||
<Text strong>{t('产品配置')}</Text>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
onClick={() => openProductModal()}
|
||||
>
|
||||
{t('添加产品')}
|
||||
|
||||
@@ -594,24 +594,23 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
render: (_, row) => (
|
||||
<div className='flex flex-wrap gap-2'>
|
||||
<Button
|
||||
size='small'
|
||||
htmlType='button'
|
||||
onClick={() => inspectOperationOrder(row.trade_no)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('查询远端状态')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
htmlType='button'
|
||||
onClick={() => reconcileOperationOrder(row.trade_no)}
|
||||
disabled={!row.third_trade_no}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('触发对账')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
type='danger'
|
||||
htmlType='button'
|
||||
onClick={() => {
|
||||
setExpireOrder(row);
|
||||
@@ -619,12 +618,13 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
setForceExpireConfirmed(false);
|
||||
setExpireReason(t('确认该订单未完成 PayPal 支付'));
|
||||
}}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('确认未付款并过期')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
type='warning'
|
||||
htmlType='button'
|
||||
onClick={() => {
|
||||
setExpireOrder(row);
|
||||
@@ -634,6 +634,8 @@ export default function SettingsPaymentGatewayPayPal(props) {
|
||||
t('管理员确认远端状态无法核验,强制关闭该 PayPal 订单'),
|
||||
);
|
||||
}}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('强制过期')}
|
||||
</Button>
|
||||
|
||||
@@ -1281,20 +1281,18 @@ export default function ModelCostSettings() {
|
||||
render: (_, row) => (
|
||||
<Space>
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
disabled={historyCount(row) === 0}
|
||||
onClick={() => setHistoryModel(row.model_name)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('版本')}({historyCount(row)})
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
disabled={!row.slots.some((k) => isPositive(slotValue(row, k)))}
|
||||
onClick={() => clearModel(row)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('清空')}
|
||||
</Button>
|
||||
@@ -1408,7 +1406,7 @@ export default function ModelCostSettings() {
|
||||
/>
|
||||
<RadioGroup
|
||||
type='button'
|
||||
buttonSize='small'
|
||||
buttonSize='default'
|
||||
value={fillFilter}
|
||||
onChange={(e) => {
|
||||
setFillFilter(e.target.value);
|
||||
@@ -1699,7 +1697,6 @@ export default function ModelCostSettings() {
|
||||
render: (_, r) => (
|
||||
<Space>
|
||||
<Button
|
||||
size='small'
|
||||
onClick={() =>
|
||||
setAdvanced({
|
||||
base: r,
|
||||
@@ -1709,6 +1706,8 @@ export default function ModelCostSettings() {
|
||||
note: r.note || '',
|
||||
})
|
||||
}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
@@ -1719,7 +1718,7 @@ export default function ModelCostSettings() {
|
||||
)}
|
||||
onConfirm={() => deleteRow(r.id)}
|
||||
>
|
||||
<Button type='danger' size='small'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -1839,9 +1838,6 @@ export default function ModelCostSettings() {
|
||||
title: t('操作'),
|
||||
render: (_, r) => (
|
||||
<Button
|
||||
size='small'
|
||||
theme='light'
|
||||
type='primary'
|
||||
onClick={() => {
|
||||
setUncoveredVisible(false);
|
||||
switchChannel(String(r.channel_id));
|
||||
@@ -1849,6 +1845,8 @@ export default function ModelCostSettings() {
|
||||
setFillFilter('all');
|
||||
setSnapshotTick((v) => v + 1);
|
||||
}}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('去配置')}
|
||||
</Button>
|
||||
|
||||
@@ -989,9 +989,6 @@ export default function ModelOfficialPriceSettings(props) {
|
||||
width: 90,
|
||||
render: (_, record) => (
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='tertiary'
|
||||
disabled={
|
||||
!prices[record.model_name] &&
|
||||
!Object.keys(drafts).some((k) =>
|
||||
@@ -999,6 +996,8 @@ export default function ModelOfficialPriceSettings(props) {
|
||||
)
|
||||
}
|
||||
onClick={() => clearModel(record.model_name)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('清空')}
|
||||
</Button>
|
||||
|
||||
@@ -30,13 +30,7 @@ import {
|
||||
Checkbox,
|
||||
Tag,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IconDelete,
|
||||
IconPlus,
|
||||
IconSearch,
|
||||
IconSave,
|
||||
IconEdit,
|
||||
} from '@/components/ui/icons';
|
||||
import { IconPlus, IconSearch, IconSave } from '@/components/ui/icons';
|
||||
import { API, showError, showSuccess, getQuotaPerUnit } from '../../../helpers';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -237,16 +231,17 @@ export default function ModelSettingsVisualEditor(props) {
|
||||
key: 'action',
|
||||
render: (_, record) => (
|
||||
<Space>
|
||||
<Button onClick={() => editModel(record)} type='link' size='small'>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
<Button
|
||||
type='primary'
|
||||
icon={<IconEdit />}
|
||||
onClick={() => editModel(record)}
|
||||
></Button>
|
||||
<Button
|
||||
icon={<IconDelete />}
|
||||
type='danger'
|
||||
onClick={() => deleteModel(record.name)}
|
||||
/>
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -17,12 +17,15 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import {
|
||||
RefreshCcw as ActionRefreshCcw,
|
||||
CheckSquare as ActionCheckSquare,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useCallback, useMemo, useEffect } from 'react';
|
||||
import {
|
||||
Button,
|
||||
Table,
|
||||
Tag,
|
||||
Empty,
|
||||
Checkbox,
|
||||
Form,
|
||||
Input,
|
||||
@@ -31,12 +34,7 @@ import {
|
||||
Modal,
|
||||
} from '@/components/ui';
|
||||
import { IconSearch } from '@/components/ui/icons';
|
||||
import {
|
||||
RefreshCcw,
|
||||
CheckSquare,
|
||||
AlertTriangle,
|
||||
CheckCircle,
|
||||
} from 'lucide-react';
|
||||
import { AlertTriangle, CheckCircle } from 'lucide-react';
|
||||
import {
|
||||
API,
|
||||
showError,
|
||||
@@ -47,10 +45,6 @@ import {
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
import { DEFAULT_ENDPOINT } from '../../../constants';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
IllustrationNoResult,
|
||||
IllustrationNoResultDark,
|
||||
} from '../../../components/common/illustrations';
|
||||
import ChannelSelectorModal from '../../../components/settings/ChannelSelectorModal';
|
||||
|
||||
function ConflictConfirmModal({ t, visible, items, onOk, onCancel }) {
|
||||
@@ -107,9 +101,6 @@ export default function UpstreamRatioSync(props) {
|
||||
const [differences, setDifferences] = useState({});
|
||||
const [resolutions, setResolutions] = useState({});
|
||||
|
||||
// 是否已经执行过同步
|
||||
const [hasSynced, setHasSynced] = useState(false);
|
||||
|
||||
// 分页相关状态
|
||||
const [currentPage, setCurrentPage] = useState(1);
|
||||
const [pageSize, setPageSize] = useState(10);
|
||||
@@ -227,7 +218,6 @@ export default function UpstreamRatioSync(props) {
|
||||
|
||||
setDifferences(differences);
|
||||
setResolutions({});
|
||||
setHasSynced(true);
|
||||
|
||||
if (Object.keys(differences).length === 0) {
|
||||
showSuccess(t('未找到差异化倍率,无需同步'));
|
||||
@@ -428,7 +418,7 @@ export default function UpstreamRatioSync(props) {
|
||||
<div className='flex flex-col md:flex-row justify-between items-center gap-4 w-full'>
|
||||
<div className='flex flex-col md:flex-row gap-2 w-full md:w-auto order-2 md:order-1'>
|
||||
<Button
|
||||
icon={<RefreshCcw size={14} />}
|
||||
icon={<ActionRefreshCcw size={14} />}
|
||||
className='w-full md:w-auto mt-2'
|
||||
onClick={() => {
|
||||
setModalVisible(true);
|
||||
@@ -445,7 +435,7 @@ export default function UpstreamRatioSync(props) {
|
||||
|
||||
return (
|
||||
<Button
|
||||
icon={<CheckSquare size={14} />}
|
||||
icon={<ActionCheckSquare size={14} />}
|
||||
type='secondary'
|
||||
onClick={applySync}
|
||||
disabled={!hasSelections}
|
||||
@@ -543,27 +533,6 @@ export default function UpstreamRatioSync(props) {
|
||||
}, [filteredDataSource]);
|
||||
|
||||
const renderDifferenceTable = () => {
|
||||
if (filteredDataSource.length === 0) {
|
||||
return (
|
||||
<Empty
|
||||
image={<IllustrationNoResult style={{ width: 150, height: 150 }} />}
|
||||
darkModeImage={
|
||||
<IllustrationNoResultDark style={{ width: 150, height: 150 }} />
|
||||
}
|
||||
description={
|
||||
searchKeyword.trim()
|
||||
? t('未找到匹配的模型')
|
||||
: Object.keys(differences).length === 0
|
||||
? hasSynced
|
||||
? t('暂无差异化倍率显示')
|
||||
: t('请先选择同步渠道')
|
||||
: t('请先选择同步渠道')
|
||||
}
|
||||
style={{ padding: 30 }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: t('模型'),
|
||||
|
||||
@@ -37,11 +37,34 @@
|
||||
}
|
||||
|
||||
.settings-page .ant-form > .ant-card + .ant-card,
|
||||
.settings-page .ant-card + .ant-card,
|
||||
.settings-page .ant-form + .ant-form,
|
||||
.settings-page .ant-form section + section {
|
||||
margin-top: var(--settings-section-gap);
|
||||
}
|
||||
|
||||
.settings-page .console-alert--settings .ant-alert-icon {
|
||||
color: var(--settings-alert-icon-color);
|
||||
}
|
||||
|
||||
/* Align native and adapted toolbar icons without their inline SVG baseline gap. */
|
||||
.settings-page .ant-btn:not(.hidden):has(.ant-btn-icon) {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.settings-page .ant-btn .ant-btn-icon,
|
||||
.settings-page .ant-btn .ant-btn-icon > .anticon {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.settings-page .ant-btn .ant-btn-icon svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.settings-page .ui-form-section {
|
||||
margin: 0 0 24px;
|
||||
color: var(--text-primary);
|
||||
@@ -144,7 +167,9 @@
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.settings-form-dialog :is(.ant-modal-footer, .ant-drawer-footer) .lucide {
|
||||
.settings-form-dialog
|
||||
:is(.ant-modal-footer, .ant-drawer-footer)
|
||||
:is(.lucide, .app-action-icon) {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,6 @@ import {
|
||||
Banner,
|
||||
Button,
|
||||
Card,
|
||||
Empty,
|
||||
Popconfirm,
|
||||
Select,
|
||||
Space,
|
||||
@@ -266,53 +265,55 @@ const SettingsWeyAiContent = () => {
|
||||
render: (_, item, index) => (
|
||||
<Space wrap>
|
||||
<Button
|
||||
size='small'
|
||||
onClick={() => setEditor({ visible: true, item })}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
{item.status === 'published' ? (
|
||||
<Button
|
||||
size='small'
|
||||
loading={busyId === item.id}
|
||||
onClick={() => setStatus(item, 'offline')}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('下架')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
size='small'
|
||||
type='primary'
|
||||
loading={busyId === item.id}
|
||||
onClick={() => setStatus(item, 'published')}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('发布')}
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
disabled={index === 0}
|
||||
aria-label={t('上移')}
|
||||
onClick={() => move(index, -1)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
↑
|
||||
{t('上移')}
|
||||
</Button>
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
disabled={index === items.length - 1}
|
||||
aria-label={t('下移')}
|
||||
onClick={() => move(index, 1)}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
↓
|
||||
{t('下移')}
|
||||
</Button>
|
||||
<Popconfirm
|
||||
title={t('确定删除这个条目?')}
|
||||
content={t('删除后客户端不再显示;它的文件 7 天后清理')}
|
||||
onConfirm={() => remove(item)}
|
||||
>
|
||||
<Button size='small' type='danger' theme='borderless'>
|
||||
<Button type='link' size='small' danger>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
@@ -401,17 +402,13 @@ const SettingsWeyAiContent = () => {
|
||||
{t('新建条目')}
|
||||
</Button>
|
||||
</div>
|
||||
{items.length === 0 ? (
|
||||
<Empty description={t('还没有条目')} />
|
||||
) : (
|
||||
<Table
|
||||
rowKey='id'
|
||||
columns={columns}
|
||||
dataSource={items}
|
||||
pagination={false}
|
||||
size='small'
|
||||
/>
|
||||
)}
|
||||
<Table
|
||||
rowKey='id'
|
||||
columns={columns}
|
||||
dataSource={items}
|
||||
pagination={false}
|
||||
size='small'
|
||||
/>
|
||||
</Card>
|
||||
|
||||
<SettingsWeyAiContentEditor
|
||||
|
||||
@@ -198,24 +198,28 @@ const SettingsWeyAiReleaseNotes = () => {
|
||||
width: 240,
|
||||
render: (_, note) => (
|
||||
<Space>
|
||||
<Button size='small' onClick={() => setDraft({ ...note })}>
|
||||
<Button
|
||||
onClick={() => setDraft({ ...note })}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('编辑')}
|
||||
</Button>
|
||||
{note.status === 'published' ? (
|
||||
<Button
|
||||
size='small'
|
||||
type='warning'
|
||||
loading={busyId === note.id}
|
||||
onClick={() => setStatus(note, 'draft')}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('撤回')}
|
||||
</Button>
|
||||
) : (
|
||||
<Button
|
||||
size='small'
|
||||
theme='solid'
|
||||
loading={busyId === note.id}
|
||||
onClick={() => setStatus(note, 'published')}
|
||||
type='link'
|
||||
size='small'
|
||||
>
|
||||
{t('发布')}
|
||||
</Button>
|
||||
@@ -225,7 +229,12 @@ const SettingsWeyAiReleaseNotes = () => {
|
||||
content={t('删除后客户端不再显示这个版本的说明')}
|
||||
onConfirm={() => remove(note)}
|
||||
>
|
||||
<Button size='small' type='danger' disabled={busyId === note.id}>
|
||||
<Button
|
||||
disabled={busyId === note.id}
|
||||
type='link'
|
||||
size='small'
|
||||
danger
|
||||
>
|
||||
{t('删除')}
|
||||
</Button>
|
||||
</Popconfirm>
|
||||
|
||||
@@ -17,9 +17,9 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { ListFilter as ActionListFilter } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useRef } from 'react';
|
||||
import { Button } from 'antd';
|
||||
import { ListFilter } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { SkillCardSkeleton } from './SkillCard';
|
||||
|
||||
@@ -105,7 +105,7 @@ const SkillCatalog = ({
|
||||
aria-expanded={filtersOpen}
|
||||
aria-controls='skill-market-filters'
|
||||
onClick={onToggleFilters}
|
||||
icon={<ListFilter size={16} aria-hidden='true' />}
|
||||
icon={<ActionListFilter size={16} aria-hidden='true' />}
|
||||
>
|
||||
{t(filtersOpen ? '收起筛选' : '筛选')}
|
||||
</Button>
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Search as ActionSearch } from '@/components/common/icons/ActionIcons';
|
||||
import React from 'react';
|
||||
import { Button, Input } from 'antd';
|
||||
import { Search } from 'lucide-react';
|
||||
@@ -139,7 +140,9 @@ const SkillMarketHero = ({ value, onChange, onSearch, onReset, onClear }) => {
|
||||
<Button
|
||||
type='primary'
|
||||
htmlType='submit'
|
||||
icon={<Search size={16} strokeWidth={1.65} aria-hidden='true' />}
|
||||
icon={
|
||||
<ActionSearch size={16} strokeWidth={1.65} aria-hidden='true' />
|
||||
}
|
||||
>
|
||||
{t('搜索')}
|
||||
</Button>
|
||||
|
||||
@@ -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 {
|
||||
Ban as ActionBan,
|
||||
ShieldCheck as ActionShieldCheck,
|
||||
CalendarClock as ActionCalendarClock,
|
||||
Pencil as ActionPencil,
|
||||
Plus as ActionPlus,
|
||||
CreditCard as ActionCreditCard,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import {
|
||||
ConsoleCard,
|
||||
ConsoleSearchBar,
|
||||
@@ -27,17 +35,7 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useEffectEvent } from '../../hooks/common/useEffectEvent';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
CreditCard,
|
||||
Search,
|
||||
Ban,
|
||||
ShieldCheck,
|
||||
CalendarClock,
|
||||
Pencil,
|
||||
Sparkles,
|
||||
History,
|
||||
Plus,
|
||||
} from 'lucide-react';
|
||||
import { CreditCard, Search, Sparkles, History } from 'lucide-react';
|
||||
import {
|
||||
Button,
|
||||
Checkbox,
|
||||
@@ -436,7 +434,7 @@ const Subscription = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<Ban size={12} />}
|
||||
icon={<ActionBan size={12} />}
|
||||
onClick={() => openBan(r)}
|
||||
>
|
||||
{t('封禁')}
|
||||
@@ -447,7 +445,7 @@ const Subscription = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='primary'
|
||||
icon={<ShieldCheck size={12} />}
|
||||
icon={<ActionShieldCheck size={12} />}
|
||||
onClick={() => openUnban(r)}
|
||||
>
|
||||
{t('解封')}
|
||||
@@ -457,7 +455,7 @@ const Subscription = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<CalendarClock size={12} />}
|
||||
icon={<ActionCalendarClock size={12} />}
|
||||
onClick={() => openExtend(r)}
|
||||
>
|
||||
{t('延长')}
|
||||
@@ -467,7 +465,7 @@ const Subscription = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Pencil size={12} />}
|
||||
icon={<ActionPencil size={12} />}
|
||||
onClick={() => openEdit(r)}
|
||||
>
|
||||
{t('编辑')}
|
||||
@@ -582,14 +580,14 @@ const Subscription = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={14} />}
|
||||
icon={<ActionPlus size={14} />}
|
||||
onClick={openCreate}
|
||||
>
|
||||
{t('新建会员')}
|
||||
</Button>
|
||||
<Button
|
||||
type='tertiary'
|
||||
icon={<CreditCard size={14} />}
|
||||
icon={<ActionCreditCard size={14} />}
|
||||
onClick={() => navigate('/console/setting?tab=membership')}
|
||||
>
|
||||
{t('会员管理')}
|
||||
|
||||
@@ -16,6 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Zap as ActionZap,
|
||||
UserPlus as ActionUserPlus,
|
||||
Copy as ActionCopy,
|
||||
Link as ActionLink,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect, useContext, useRef } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -31,12 +37,10 @@ import {
|
||||
Tag,
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Copy,
|
||||
Users,
|
||||
BarChart2,
|
||||
TrendingUp,
|
||||
Gift,
|
||||
Zap,
|
||||
CreditCard,
|
||||
DollarSign,
|
||||
UserPlus,
|
||||
@@ -365,7 +369,7 @@ const Invite = () => {
|
||||
setTransferAmount(stats.current_aff_quota || 0);
|
||||
setOpenTransfer(true);
|
||||
}}
|
||||
icon={<Zap size={15} />}
|
||||
icon={<ActionZap size={15} />}
|
||||
className='!rounded-full !border-0 !bg-gradient-to-r !from-rose-500 !to-orange-400 !px-4 !shadow-lg !shadow-rose-500/20'
|
||||
>
|
||||
{t('\u5212\u8f6c\u5230\u4f59\u989d')}
|
||||
@@ -375,7 +379,7 @@ const Invite = () => {
|
||||
<Button
|
||||
theme='light'
|
||||
type='primary'
|
||||
icon={<UserPlus size={15} />}
|
||||
icon={<ActionUserPlus size={15} />}
|
||||
onClick={() => setOpenBindInviter(true)}
|
||||
className='!rounded-full !border !border-sky-200 !bg-sky-50/80 !px-4 !text-sky-700 dark:!border-sky-400/20 dark:!bg-sky-400/[0.08] dark:!text-sky-300'
|
||||
>
|
||||
@@ -458,7 +462,7 @@ const Invite = () => {
|
||||
theme='solid'
|
||||
size='large'
|
||||
onClick={handleCopyLink}
|
||||
icon={<Copy size={16} />}
|
||||
icon={<ActionCopy size={16} />}
|
||||
className='!rounded-full !border-0 !bg-gradient-to-r !from-rose-500 !to-orange-400 !px-6 !shadow-lg !shadow-rose-500/20'
|
||||
>
|
||||
{t('\u590d\u5236')}
|
||||
@@ -537,7 +541,7 @@ const Invite = () => {
|
||||
type='primary'
|
||||
theme='solid'
|
||||
onClick={() => setOpenBindInviter(true)}
|
||||
icon={<Link size={16} />}
|
||||
icon={<ActionLink size={16} />}
|
||||
className='!rounded-full !border-0 !bg-gradient-to-r !from-sky-500 !to-cyan-400 !px-5'
|
||||
>
|
||||
{t('\u7ed1\u5b9a')}
|
||||
|
||||
@@ -16,6 +16,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import {
|
||||
Eye as ActionEye,
|
||||
X as ActionX,
|
||||
Download as ActionDownload,
|
||||
Plus as ActionPlus,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useState, useEffect, useCallback, useContext } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
@@ -32,7 +38,7 @@ import {
|
||||
Empty,
|
||||
Spin,
|
||||
} from '@/components/ui';
|
||||
import { Receipt, Plus, Download, Eye, X } from 'lucide-react';
|
||||
import { Receipt } from 'lucide-react';
|
||||
import UserCenterPageHeader from '../../components/common/UserCenterPageHeader';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
import {
|
||||
@@ -360,7 +366,7 @@ const Invoice = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Eye size={14} />}
|
||||
icon={<ActionEye size={14} />}
|
||||
onClick={() => handleViewDetail(record.id)}
|
||||
>
|
||||
{t('详情')}
|
||||
@@ -370,7 +376,7 @@ const Invoice = () => {
|
||||
size='small'
|
||||
theme='borderless'
|
||||
type='danger'
|
||||
icon={<X size={14} />}
|
||||
icon={<ActionX size={14} />}
|
||||
onClick={() => handleCancel(record.id)}
|
||||
>
|
||||
{t('取消')}
|
||||
@@ -380,7 +386,7 @@ const Invoice = () => {
|
||||
<Button
|
||||
size='small'
|
||||
theme='borderless'
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
onClick={() =>
|
||||
window.open(`/api/user/invoice/download/${record.id}`, '_blank')
|
||||
}
|
||||
@@ -500,7 +506,7 @@ const Invoice = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Plus size={16} />}
|
||||
icon={<ActionPlus size={16} />}
|
||||
loading={submitting}
|
||||
onClick={handleSubmit}
|
||||
disabled={selectedTopupIds.length === 0}
|
||||
@@ -632,7 +638,7 @@ const Invoice = () => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
block
|
||||
onClick={() =>
|
||||
window.open(
|
||||
|
||||
@@ -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, { useMemo, useContext } from 'react';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
import {
|
||||
@@ -32,8 +36,6 @@ import {
|
||||
UserRound,
|
||||
Receipt,
|
||||
Gift,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Activity,
|
||||
MonitorDown,
|
||||
} from 'lucide-react';
|
||||
@@ -227,11 +229,15 @@ const UserCenterSidebar = () => {
|
||||
</nav>
|
||||
<button
|
||||
type='button'
|
||||
className='ui-center-sidebar-collapse'
|
||||
className='app-action-button ui-center-sidebar-collapse'
|
||||
onClick={toggleCollapsed}
|
||||
aria-label={collapsed ? t('展开导航') : t('收起导航')}
|
||||
>
|
||||
{collapsed ? <ChevronRight size={16} /> : <ChevronLeft size={16} />}
|
||||
{collapsed ? (
|
||||
<ActionChevronRight size={16} />
|
||||
) : (
|
||||
<ActionChevronLeft size={16} />
|
||||
)}
|
||||
{!collapsed && <span>{t('收起导航')}</span>}
|
||||
</button>
|
||||
</aside>
|
||||
|
||||
@@ -92,7 +92,6 @@ const UserDashboard = () => {
|
||||
dashboardData.consumeQuota,
|
||||
dashboardData.consumeTokens,
|
||||
dashboardData.times,
|
||||
dashboardData.trendData,
|
||||
dashboardData.performanceMetrics,
|
||||
dashboardData.navigate,
|
||||
dashboardData.t,
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Upload as ActionUpload } from '@/components/common/icons/ActionIcons';
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, Image, Typography } from '@/components/ui';
|
||||
import { Upload } from 'lucide-react';
|
||||
@@ -117,7 +118,7 @@ export default function QrCodeUpload({
|
||||
hidden
|
||||
/>
|
||||
<Button
|
||||
icon={<Upload size={14} />}
|
||||
icon={<ActionUpload size={14} />}
|
||||
loading={uploading}
|
||||
disabled={busy || uploading}
|
||||
onClick={() => inputRef.current?.click()}
|
||||
|
||||
@@ -173,9 +173,7 @@ export function validateSettings(values) {
|
||||
[...new Set(TABS.flatMap((tab) => tab.fields))]
|
||||
.map((key) => [
|
||||
key,
|
||||
key === 'insights' &&
|
||||
!values.insights?.categories?.length &&
|
||||
!values.insights?.articles?.length
|
||||
key === 'insights' && !values.insights?.articles?.length
|
||||
? '请完善动态与洞察的配置'
|
||||
: validateField(key, values[key]),
|
||||
])
|
||||
|
||||
@@ -23,15 +23,18 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
// 结构:hero(版本/动作)→ 为你推荐 → 客户端能做什么 → 全部安装包 → 三步开始。
|
||||
// 加载失败 / 未开放 / 暂无安装包三种状态都保留 hero 与说明区,只替换安装包区域。
|
||||
|
||||
import {
|
||||
Download as ActionDownload,
|
||||
RefreshCw as ActionRefreshCw,
|
||||
Globe as ActionGlobe,
|
||||
ExternalLink as ActionExternalLink,
|
||||
} from '@/components/common/icons/ActionIcons';
|
||||
import React, { useContext, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Skeleton, Tag } from '@/components/ui';
|
||||
import {
|
||||
AlertTriangle,
|
||||
Cpu,
|
||||
Download,
|
||||
ExternalLink,
|
||||
Globe,
|
||||
Laptop,
|
||||
LogIn,
|
||||
Monitor,
|
||||
@@ -283,7 +286,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
</span>
|
||||
</div>
|
||||
<Button
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
theme={isReco ? 'solid' : 'light'}
|
||||
type='primary'
|
||||
aria-label={`${t('下载')} ${file.name}`}
|
||||
@@ -341,7 +344,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
size='large'
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={() => download(recommended.url)}
|
||||
>
|
||||
{t('下载 WeyAi')}
|
||||
@@ -386,7 +389,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
size='large'
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<Download size={16} />}
|
||||
icon={<ActionDownload size={16} />}
|
||||
onClick={() => download(androidApk.url)}
|
||||
>
|
||||
{t('下载 Android 版')}
|
||||
@@ -475,7 +478,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
<Button
|
||||
theme='solid'
|
||||
type='primary'
|
||||
icon={<RefreshCw size={14} />}
|
||||
icon={<ActionRefreshCw size={14} />}
|
||||
onClick={load}
|
||||
>
|
||||
{t('重试')}
|
||||
@@ -545,7 +548,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
</span>
|
||||
</div>
|
||||
<Button
|
||||
icon={<Download size={14} />}
|
||||
icon={<ActionDownload size={14} />}
|
||||
theme='light'
|
||||
type='primary'
|
||||
aria-label={`${t('下载')} ${androidApk.name}`}
|
||||
@@ -616,7 +619,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
/sso/start 再被弹回登录,不如顶栏那样先引导登录 */}
|
||||
{isLoggedIn && webVisible && webUrl && (
|
||||
<Button
|
||||
icon={<Globe size={14} />}
|
||||
icon={<ActionGlobe size={14} />}
|
||||
theme='light'
|
||||
type='primary'
|
||||
onClick={() => window.open(webUrl, '_blank', 'noopener')}
|
||||
@@ -625,7 +628,7 @@ const WeyAiDownload = ({ embedded = false }) => {
|
||||
</Button>
|
||||
)}
|
||||
<Button
|
||||
icon={<ExternalLink size={14} />}
|
||||
icon={<ActionExternalLink size={14} />}
|
||||
onClick={() => {
|
||||
window.location.href = OPEN_APP_URL;
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user