feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等

This commit is contained in:
zhanjunhao
2026-11-10 17:27:36 +08:00
parent 43e7fbc20e
commit 6ea8a0f7c2
195 changed files with 3546 additions and 1984 deletions
+6 -3
View File
@@ -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}
>
+6 -3
View File
@@ -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('配置预算')}
+15 -5
View File
@@ -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,
+9 -13
View File
@@ -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')}
+8 -4
View File
@@ -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('新建顶级部门')}
+9 -11
View File
@@ -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('拒绝')}
+3 -8
View File
@@ -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}
>
+37 -21
View File
@@ -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}
+9 -11
View File
@@ -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}
>
+9 -9
View File
@@ -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);
+8 -4
View File
@@ -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}
>
+12 -7
View File
@@ -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) => {
+8 -4
View File
@@ -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('添加成员')}
+6 -3
View File
@@ -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('新建项目')}
+14 -16
View File
@@ -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}
>
+3 -2
View File
@@ -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>
);
})}
+2 -2
View File
@@ -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}
>
+10 -12
View File
@@ -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('重试')}
+9 -4
View File
@@ -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('转让')}
+13 -7
View File
@@ -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>
)}
+19 -15
View File
@@ -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('复制')}
+2 -2
View File
@@ -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}
>
+2 -2
View File
@@ -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)}