From 6ea8a0f7c2c286185291a8fe5703359837aa6e10 Mon Sep 17 00:00:00 2001 From: zhanjunhao <642307404@qq.com> Date: Tue, 10 Nov 2026 17:27:36 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=90=88=E5=B9=B6=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=90=8E=20=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE=20ui=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96=E3=80=81bug=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E3=80=81=E5=85=A8=E5=B1=80=E7=BB=9F=E4=B8=80=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E5=AF=B9=E9=BD=90=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 2 + CLAUDE.md | 2 + docs/ui/ANTD_UNIFICATION_PLAN.md | 24 + package-lock.json | 1 + package.json | 5 +- .../analytics/CollapsibleHeader.jsx | 6 +- .../analytics/orgReport/ActionCenter.jsx | 5 +- .../analytics/orgReport/Overview.jsx | 4 +- src/components/analytics/orgReport/Tables.jsx | 5 +- .../auth/AuthCustomerServiceFloat.jsx | 5 +- src/components/auth/LoginForm.jsx | 9 +- src/components/auth/OrgCredentialResult.jsx | 11 +- src/components/auth/RegisterForm.jsx | 11 +- .../DocumentRenderer/AgreementModal.jsx | 7 +- .../common/DocumentRenderer/index.jsx | 56 +- src/components/common/PageGuide/index.jsx | 28 +- src/components/common/icons/ActionIcons.js | 606 +++++++++++++++++ .../common/modals/NewUserGiftModal.jsx | 20 +- .../common/modals/UserSurveyModal.jsx | 20 +- .../common/table/ColumnSettings.jsx | 4 +- .../common/table/FilterSearchButton.jsx | 4 +- .../common/table/filter-search-button.css | 2 +- .../common/ui/ChannelKeyDisplay.jsx | 12 +- src/components/common/ui/RichTextEditor.jsx | 6 +- .../console/ConsoleModuleFilters.jsx | 36 +- src/components/console/ConsolePrimitives.jsx | 16 +- src/components/console/console.css | 2 +- src/components/console/module-alignment.css | 6 +- src/components/creation/CreationDock.jsx | 97 +-- .../creation/ModelPicker/ModelPicker.jsx | 16 +- .../creation/WorkFeed/ApiCodePanel.jsx | 17 +- .../creation/WorkFeed/FilterBar.jsx | 13 +- src/components/creation/WorkFeed/WorkCard.jsx | 29 +- .../creation/WorkFeed/WorkDetailDrawer.jsx | 9 +- src/components/creation/WorkFeed/WorkFeed.jsx | 4 +- src/components/creation/params/ImageSlot.jsx | 14 +- src/components/creation/params/SeedInput.jsx | 2 +- .../CustomerServiceQRCard.jsx | 5 +- src/components/customer-service/index.jsx | 33 +- src/components/dashboard/DashboardHeader.jsx | 9 +- src/components/dashboard/UptimePanel.jsx | 5 +- src/components/dashboard/index.jsx | 1 - .../dashboard/modals/SearchModal.jsx | 10 +- src/components/layout/Marquee.jsx | 5 +- src/components/layout/SiderBar.jsx | 18 +- .../layout/headerbar/LanguageSelector.jsx | 4 +- .../layout/headerbar/MobileNavMenu.jsx | 5 +- .../layout/headerbar/NotificationButton.jsx | 4 +- .../layout/headerbar/ThemeToggle.jsx | 2 +- src/components/layout/headerbar/UserArea.jsx | 5 +- src/components/playground/ChatArea.jsx | 33 +- src/components/playground/CodeViewer.jsx | 14 +- src/components/playground/ConfigManager.jsx | 16 +- .../playground/CustomInputRender.jsx | 147 ++-- .../playground/CustomRequestEditor.jsx | 5 +- src/components/playground/DebugPanel.jsx | 5 +- .../playground/FilePreviewModal.jsx | 47 +- src/components/playground/FloatingButtons.jsx | 16 +- .../playground/ImagePreviewModal.jsx | 54 +- src/components/playground/ImageUrlInput.jsx | 10 +- src/components/playground/MessageActions.jsx | 18 +- src/components/playground/MessageContent.jsx | 73 +- .../playground/MessageSelectionBar.jsx | 9 +- .../playground/ParameterControl.jsx | 45 +- src/components/playground/SSEViewer.jsx | 22 +- src/components/playground/SessionSidebar.jsx | 30 +- src/components/playground/SettingsPanel.jsx | 13 +- .../promotion/PromotionPosterModal.jsx | 32 +- src/components/quality/QualityAlerts.jsx | 5 +- src/components/quality/QualityFilterBar.jsx | 13 +- .../settings/ContentGuardSetting.jsx | 15 +- .../settings/CustomerServiceSetting.jsx | 40 +- .../settings/DataSecuritySetting.jsx | 15 +- .../settings/LevelPolicySetting.jsx | 227 ++++--- src/components/settings/PersonalSetting.jsx | 6 +- .../settings/TutorialVideoSetting.jsx | 34 +- .../personal/sections/AvatarSection.jsx | 11 +- .../personal/sections/NotificationSection.jsx | 18 +- .../table/admin-tokens/AdminTokensActions.jsx | 4 +- .../table/channels/ChannelsTabs.jsx | 4 +- .../model-pricing/market/MarketCatalog.jsx | 5 +- .../table/model-pricing/market/MarketHero.jsx | 3 +- .../model-pricing/market/MarketModelCard.jsx | 5 +- .../table/models/ModelsColumnDefs.jsx | 4 +- src/components/table/models/ModelsTabs.jsx | 4 +- .../table/models/models-vendor-tabs.css | 2 +- .../table/task-logs/TaskLogsActions.jsx | 14 +- .../table/task-logs/TaskLogsFilters.jsx | 3 +- src/components/table/task-logs/index.jsx | 5 +- .../table/tokens/modals/EditTokenModal.jsx | 18 +- .../table/usage-logs/UsageLogsFilters.jsx | 4 +- src/components/table/usage-logs/index.jsx | 6 +- src/components/table/users/UsersActions.jsx | 4 +- src/components/topup/InvitationCard.jsx | 10 +- src/components/topup/RechargeCard.jsx | 5 +- src/components/ui/chat.jsx | 12 +- src/components/ui/form.jsx | 21 +- src/components/ui/icons.jsx | 625 +++--------------- src/index.jsx | 1 + src/pages/AdminInvoice/index.jsx | 21 +- src/pages/AdminOrder/index.jsx | 12 +- src/pages/AdminOrganizations/index.jsx | 21 +- src/pages/CloudBrain/index.jsx | 96 ++- .../AICreation/ImageDetailModal.jsx | 10 +- .../AICreation/ImageGenerationForm.jsx | 49 +- .../components/AICreation/ImageTaskList.jsx | 79 ++- .../AICreation/Video/PortraitAssetPicker.jsx | 35 +- .../AICreation/Video/VideoInputPanel.jsx | 10 +- .../AICreation/Video/VideoPreviewPanel.jsx | 41 +- .../AICreation/Video/VideoTaskQueue.jsx | 34 +- .../components/ExperienceSidebar.jsx | 26 +- src/pages/ExperienceCenterAudit/index.jsx | 4 +- src/pages/ExpertPlatform/index.jsx | 14 +- src/pages/Home/index.jsx | 3 +- src/pages/ImageGeneration/index.jsx | 16 +- src/pages/KeyManagement/index.jsx | 34 +- src/pages/MyCommission/index.jsx | 4 +- src/pages/Organization/OrgAudit.jsx | 9 +- src/pages/Organization/OrgBudgets.jsx | 9 +- src/pages/Organization/OrgConnectors.jsx | 20 +- src/pages/Organization/OrgDashboard.jsx | 22 +- src/pages/Organization/OrgDepartments.jsx | 12 +- src/pages/Organization/OrgDeptManage.jsx | 20 +- src/pages/Organization/OrgEffectiveness.jsx | 11 +- src/pages/Organization/OrgKnowledge.jsx | 58 +- src/pages/Organization/OrgLogs.jsx | 20 +- src/pages/Organization/OrgMemberAccounts.jsx | 18 +- src/pages/Organization/OrgMembers.jsx | 12 +- src/pages/Organization/OrgPrivateSkills.jsx | 19 +- src/pages/Organization/OrgProjectManage.jsx | 12 +- src/pages/Organization/OrgProjects.jsx | 9 +- src/pages/Organization/OrgPromptRecords.jsx | 30 +- src/pages/Organization/OrgRecharge.jsx | 5 +- src/pages/Organization/OrgRequests.jsx | 4 +- src/pages/Organization/OrgResolver.jsx | 22 +- src/pages/Organization/OrgSettings.jsx | 13 +- src/pages/Organization/OrgSidebar.jsx | 20 +- src/pages/Organization/OrgTokens.jsx | 34 +- src/pages/Organization/OrgWorkbench.jsx | 4 +- .../components/DeptFlowCanvas.jsx | 39 +- .../components/OrgAnalyticsPanel.jsx | 4 +- .../components/OrgScopedLimitButtons.jsx | 5 +- .../components/OrgTaskRecords.jsx | 10 +- src/pages/Organization/index.jsx | 4 +- src/pages/PartnerPortal/Workbench.jsx | 21 +- src/pages/Playground/index.jsx | 9 +- src/pages/Recharge/AmountCard.jsx | 11 +- src/pages/Recharge/HistoryPanel.jsx | 4 +- src/pages/Recharge/MembershipPanel.jsx | 23 +- src/pages/Recharge/RechargePanel.jsx | 4 +- src/pages/Recharge/WalletCard.jsx | 10 +- src/pages/ServiceDashboard/GroupMonitor.jsx | 13 +- .../ServiceDashboard/GroupMonitorAdmin.jsx | 4 +- src/pages/Setting/AmountOptionsManager.jsx | 10 +- src/pages/Setting/Chat/SettingsChats.jsx | 90 ++- src/pages/Setting/Chat/settings-chats.css | 27 + .../Setting/Dashboard/SettingsAPIInfo.jsx | 26 +- .../Dashboard/SettingsAnnouncements.jsx | 29 +- src/pages/Setting/Dashboard/SettingsFAQ.jsx | 26 +- .../Setting/Dashboard/SettingsUptimeKuma.jsx | 26 +- .../Setting/Model/SettingImagePricing.jsx | 21 +- .../Setting/Model/SettingModelCategory.jsx | 41 +- src/pages/Setting/Model/SettingVideoModel.jsx | 26 +- .../Operation/SettingsExperienceCenter.jsx | 10 +- .../Setting/Operation/SettingsLanguage.jsx | 15 +- .../Setting/Payment/SettingsMembership.jsx | 19 +- .../Payment/SettingsPaymentGatewayCreem.jsx | 19 +- .../Payment/SettingsPaymentGatewayPayPal.jsx | 16 +- src/pages/Setting/Ratio/ModelCostSettings.jsx | 22 +- .../Ratio/ModelOfficialPriceSettings.jsx | 5 +- .../Ratio/ModelSettingsVisualEditor.jsx | 25 +- src/pages/Setting/Ratio/UpstreamRatioSync.jsx | 45 +- src/pages/Setting/Setting.css | 27 +- .../Setting/WeyAi/SettingsWeyAiContent.jsx | 43 +- .../WeyAi/SettingsWeyAiReleaseNotes.jsx | 21 +- src/pages/SkillMarket/view/SkillCatalog.jsx | 4 +- .../SkillMarket/view/SkillMarketHero.jsx | 5 +- src/pages/Subscription/index.jsx | 32 +- src/pages/UserCenter/Invite.jsx | 16 +- src/pages/UserCenter/Invoice.jsx | 18 +- src/pages/UserCenter/UserCenterSidebar.jsx | 14 +- src/pages/UserCenter/UserDashboard.jsx | 1 - src/pages/WebsiteSettings/QrCodeUpload.jsx | 3 +- src/pages/WebsiteSettings/model.js | 4 +- src/pages/WeyAiDownload/index.jsx | 23 +- src/styles/action-icons.css | 32 + src/styles/prototype.css | 10 +- test/unit/action-icons.test.js | 115 ++++ test/unit/dashboard-render.test.js | 159 +++++ test/unit/form-labels.test.js | 136 ++++ test/unit/frontend-module.js | 49 ++ test/unit/helpers/frontendModule.js | 2 + test/unit/settings-ui.test.js | 181 +++++ test/unit/website-save-validation.test.js | 97 +++ tests/console-layout.test.js | 33 + 195 files changed, 3546 insertions(+), 1984 deletions(-) create mode 100644 src/components/common/icons/ActionIcons.js create mode 100644 src/pages/Setting/Chat/settings-chats.css create mode 100644 src/styles/action-icons.css create mode 100644 test/unit/action-icons.test.js create mode 100644 test/unit/dashboard-render.test.js create mode 100644 test/unit/form-labels.test.js create mode 100644 test/unit/frontend-module.js create mode 100644 test/unit/settings-ui.test.js create mode 100644 test/unit/website-save-validation.test.js diff --git a/AGENTS.md b/AGENTS.md index 432457b3..2cf7d47b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,6 +4,8 @@ ## Ant Design 依赖统一(2026-11-10) +按钮组和操作按钮的通用图标优先使用 `src/components/common/icons/ActionIcons.js`(基于 `@ant-design/icons`,兼容既有 size / color / ref);旧 `components/ui/icons` 已复用该入口。无准确对应项的专业图标及品牌图标保留。按钮内图标与文字整体居中,公共对齐见 `src/styles/action-icons.css`;不改业务回调、权限或加载/禁用条件。本条覆盖旧页面规范中按钮图标沿用 Lucide 的约定,非按钮装饰不批量替换。 + 通用 UI 使用 `antd`;旧 `src/components/ui` 是 Ant Design 契约适配层,保留值回调、Form API 和分页语义。模型品牌图标使用 `src/assets/brand-icons/` 的固定版本本地 SVG:首页与 `helpers/render.jsx` 只导入 `primitives`,完整变体仍经 `LobeHubIcon` 懒加载;头像容器使用 Ant `Avatar`,主题复用现有 Theme Context。不得重装 `@lobehub/icons`、`@lobehub/ui`、Radix UI、Floating UI、leva、antd-style 或 react-layout-kit。生成资产须通过脚本维护并保留 MIT 许可证及 hash。运行 `npm run check:ui` 检查源码、完整 lock 图和资产 hash;专用图表、流程画布、编辑器与引导保留。方案、风险和验证结果见 `docs/ui/ANTD_UNIFICATION_PLAN.md`;证据仅放忽略目录 `report/ui-unification/`。 ## 三中心表格列设置统一(2026-11-07) diff --git a/CLAUDE.md b/CLAUDE.md index ff177c30..dcf79172 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,6 +4,8 @@ ## Ant Design 依赖统一(2026-11-10) +按钮组和操作按钮的通用图标优先使用 `src/components/common/icons/ActionIcons.js`(基于 `@ant-design/icons`,兼容既有 size / color / ref);旧 `components/ui/icons` 已复用该入口。无准确对应项的专业图标及品牌图标保留。按钮内图标与文字整体居中,公共对齐见 `src/styles/action-icons.css`;不改业务回调、权限或加载/禁用条件。本条覆盖旧页面规范中按钮图标沿用 Lucide 的约定,非按钮装饰不批量替换。 + 通用 UI 使用 `antd`;旧 `src/components/ui` 是 Ant Design 契约适配层,保留值回调、Form API 和分页语义。模型品牌图标使用 `src/assets/brand-icons/` 的固定版本本地 SVG:首页与 `helpers/render.jsx` 只导入 `primitives`,完整变体仍经 `LobeHubIcon` 懒加载;头像容器使用 Ant `Avatar`,主题复用现有 Theme Context。不得重装 `@lobehub/icons`、`@lobehub/ui`、Radix UI、Floating UI、leva、antd-style 或 react-layout-kit。生成资产须通过脚本维护并保留 MIT 许可证及 hash。运行 `npm run check:ui` 检查源码、完整 lock 图和资产 hash;专用图表、流程画布、编辑器与引导保留。方案、风险和验证结果见 `docs/ui/ANTD_UNIFICATION_PLAN.md`;证据仅放忽略目录 `report/ui-unification/`。 ## 三中心表格列设置统一(2026-11-07) diff --git a/docs/ui/ANTD_UNIFICATION_PLAN.md b/docs/ui/ANTD_UNIFICATION_PLAN.md index 4e6e4ef3..f7d35cba 100644 --- a/docs/ui/ANTD_UNIFICATION_PLAN.md +++ b/docs/ui/ANTD_UNIFICATION_PLAN.md @@ -121,3 +121,27 @@ | 差异检查 | `git diff --check` 通过 | 资源控制:重任务串行、单测并发为 1,Node 堆上限 2,944MB;开始前检查 CPU、物理内存及提交空间,CPU 高时延后启动,运行中每约 10 秒采样,低物理内存或提交空间时停止本任务。构建输出至系统临时目录,关闭压缩体积统计;构建进程采样工作集最高 2,475MB,可用物理内存最低 10,646MB,可用提交空间最低 15,944MB,未触发内存停止阈值。测试和浏览器记录的是包装进程工作集,不将其视为整个子进程树的内存峰值;未结束其他任务的进程。 + +## 10. 操作按钮图标统一(2026-11-10 后续) + +按本轮要求,按钮组与操作按钮优先使用 Ant Design 图标,保留没有准确对应项的旧图标。此规则覆盖旧页面规范中按钮图标沿用 Lucide 的约定;导航、说明、品牌、图表和专业功能装饰不进行整库替换,继续保留 Lucide 依赖。 + +- 新增 `components/common/icons/ActionIcons.js`,使用 `@ant-design/icons` 公共导出,兼容旧 `size` 预设、数字尺寸、颜色、样式、className、DOM ref 和事件;收藏星标仍区分空心与实心,右上箭头保留方向。旧 `components/ui/icons.jsx` 保留原导出名称并接到该入口。将已在 Ant Design 依赖图中的 `@ant-design/icons` 声明为直接依赖,本次没有新增安装包或改变锁定版本。 +- 首轮扫描覆盖 188 个文件、576 处按钮图标;459 处直接 Lucide 用法和 97 处旧兼容图标映射到 Ant Design。20 处专业/组合图形保留,例如 Sparkles、ImagePlus、Dices、Wand2、UserCheck、FileUp、Cpu 等,不用语义不符的近似图标替代。比较、实验、清除和侧栏展开分别使用 DiffOutlined、ExperimentOutlined、ClearOutlined、MenuUnfoldOutlined。完整位置清单保存在本地审计记录。 +- 补充处理静态扫描不易识别的入口:富文本加粗、斜体、下划线、列表、撤销/重做与清除格式,主题切换的太阳/月亮,模板按钮的图片图标,以及密钥复制按钮的手写剪贴板 SVG。富文本引用和图片加号保留原图标,编辑器实现和命令保持原样。 +- `styles/action-icons.css` 统一 Ant 按钮图标容器与旧原生操作按钮的对齐:图标与文字垂直居中,内容组在按钮内水平居中,单图标按钮双向居中。原生按钮默认规则放在 Tailwind components 层,保留页面布局、响应式隐藏及明确的间距;Ant 规则在层外,不新增 `!important` 或颜色值。已有局部 Lucide 尺寸规则同时支持新图标。 +- AST 对照覆盖 151 个源码文件:API 调用及按钮处理、禁用、加载、链接与提交属性保持一致;只对新旧图标 JSX 别名做归一化,不放宽请求或回调比较。测试加载器接入实际图标模块;旧图标 ref 测试更新为 Ant/保留图标契约,并修正旧禁用原因测试的翻译插值 mock,保留原因和时间断言。 + +浏览器使用单个离屏有头 Chrome Context,覆盖 1920×1000 / 393×851 与浅/深色四种组合:136 项按钮几何对齐检查通过,覆盖大小、按钮组、链接、原生/兼容按钮、纯图标、加载、禁用和保留图标;另验证 Tooltip DOM ref、点击回调、收藏切换及实际 Quill 工具栏加粗操作。10 个富文本按钮均居中,其中 8 个使用 Ant 图标。浏览器运行错误与业务写请求均为 0。此为实际组件的隔离验证,不代表真实账号全站像素或业务验收。 + +本轮不执行生产构建或生产环境测试。快照、脚本、截图、单测/静态检查日志及 CPU/内存采样仅保存在忽略目录 `report/ui-unification/button-icons/`;重任务串行、单测并发 1、Node 堆上限 2,944MB,未结束其他任务进程。 + +| 检查 | 本轮结果 | +| ------------- | ------------------------------------------------------------------ | +| 全量串行单测 | 662/662 通过,失败、跳过和取消均为 0,约 159 秒 | +| 全仓 ESLint | 0 错误、0 警告,零警告门禁通过 | +| 全仓 Prettier | 所有匹配文件通过 | +| UI 审计 | 源码、完整 lock 图和品牌 SVG 资产 hash 检查通过 | +| 浏览器 | 浅深色 × 桌面/移动端,136 项对齐检查、真实组件交互和富文本加粗通过 | +| 源码契约 | 151 个文件的 API 与操作处理属性对照通过,图标 JSX 别名单独归一化 | +| 差异检查 | `git diff --check` 通过 | diff --git a/package-lock.json b/package-lock.json index c66c9845..1ad8974f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "react-template", "version": "0.1.0", "dependencies": { + "@ant-design/icons": "^5.6.1", "@dagrejs/dagre": "^1.1.4", "@visactor/react-vchart": "~1.8.8", "@visactor/vchart": "~1.8.8", diff --git a/package.json b/package.json index 7bc751c4..a11be87c 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "private": true, "type": "module", "dependencies": { + "@ant-design/icons": "^5.6.1", "@dagrejs/dagre": "^1.1.4", "@visactor/react-vchart": "~1.8.8", "@visactor/vchart": "~1.8.8", @@ -82,6 +83,7 @@ "@playwright/test": "^1.64.1", "@vitejs/plugin-react": "^4.2.1", "autoprefixer": "^10.4.21", + "esbuild": "0.21.5", "eslint": "8.57.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-react": "^7.37.5", @@ -91,8 +93,7 @@ "postcss": "^8.5.3", "prettier": "^3.0.0", "tailwindcss": "^3", - "vite": "5.4.21", - "esbuild": "0.21.5" + "vite": "5.4.21" }, "proxy": "http://localhost:3000", "engines": { diff --git a/src/components/analytics/CollapsibleHeader.jsx b/src/components/analytics/CollapsibleHeader.jsx index 4d39c45e..a86f9bb3 100644 --- a/src/components/analytics/CollapsibleHeader.jsx +++ b/src/components/analytics/CollapsibleHeader.jsx @@ -17,15 +17,15 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { ChevronDown as ActionChevronDown } from '@/components/common/icons/ActionIcons'; import React from 'react'; -import { ChevronDown } from 'lucide-react'; import './collapsible-panel.css'; const CollapsibleHeader = ({ icon, title, isOpen, onToggle, extra }) => ( ) : null} diff --git a/src/components/auth/LoginForm.jsx b/src/components/auth/LoginForm.jsx index 11e39d18..71c1e0e7 100644 --- a/src/components/auth/LoginForm.jsx +++ b/src/components/auth/LoginForm.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { ArrowRight as ActionArrowRight } from '@/components/common/icons/ActionIcons'; import React, { useContext, useEffect, @@ -66,7 +67,7 @@ import DiscordIcon from '../common/logo/DiscordIcon'; import TwoFAVerification from './TwoFAVerification'; import { useTranslation } from 'react-i18next'; import AuthBackground from '../common/AuthBackground'; -import { ArrowRight, Shield, Smartphone, QrCode } from 'lucide-react'; +import { Shield, Smartphone, QrCode } from 'lucide-react'; import GlassCard from './GlassCard'; import AuthCardHeader from './AuthCardHeader'; import AuthLoginTabs from './AuthLoginTabs'; @@ -741,7 +742,7 @@ const LoginForm = () => { {/* 邮箱登录按钮 */} {onLogin && ( diff --git a/src/components/auth/RegisterForm.jsx b/src/components/auth/RegisterForm.jsx index a07e29b5..0532321e 100644 --- a/src/components/auth/RegisterForm.jsx +++ b/src/components/auth/RegisterForm.jsx @@ -17,6 +17,7 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { ArrowRight as ActionArrowRight } from '@/components/common/icons/ActionIcons'; import React, { useContext, useEffect, @@ -64,7 +65,7 @@ import AuthBackground from '../common/AuthBackground'; import GlassCard from './GlassCard'; import AuthCardHeader from './AuthCardHeader'; import AuthLoginTabs from './AuthLoginTabs'; -import { ArrowRight, Shield, Smartphone, QrCode } from 'lucide-react'; +import { Shield, Smartphone, QrCode } from 'lucide-react'; import AgreementModal from '../common/DocumentRenderer/AgreementModal'; import { isMiniProgramWebView, @@ -606,7 +607,7 @@ const RegisterForm = () => { diff --git a/src/components/common/DocumentRenderer/index.jsx b/src/components/common/DocumentRenderer/index.jsx index 4df83413..45a4b9ba 100644 --- a/src/components/common/DocumentRenderer/index.jsx +++ b/src/components/common/DocumentRenderer/index.jsx @@ -17,6 +17,11 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { + ChevronUp as ActionChevronUp, + ArrowLeft as ActionArrowLeft, + Printer as ActionPrinter, +} from '@/components/common/icons/ActionIcons'; import { writeClipboardText } from '../../../helpers/clipboard'; import React, { useEffect, useState, useCallback, useRef } from 'react'; import { API, showError } from '../../../helpers'; @@ -26,11 +31,8 @@ import { Shield, ScrollText, ExternalLink, - ChevronUp, - ArrowLeft, BookOpen, Scale, - Printer, } from 'lucide-react'; import { useNavigate, useLocation } from 'react-router-dom'; @@ -509,12 +511,20 @@ const DocumentRenderer = ({ ); @@ -549,9 +559,9 @@ const DocumentRenderer = ({
@@ -612,9 +622,9 @@ const DocumentRenderer = ({
); diff --git a/src/components/common/PageGuide/index.jsx b/src/components/common/PageGuide/index.jsx index 0032fa74..1c32674f 100644 --- a/src/components/common/PageGuide/index.jsx +++ b/src/components/common/PageGuide/index.jsx @@ -30,16 +30,15 @@ For commercial licensing, please contact support@quantumnous.com * 页面只需 usePageGuide({...配置}) 后把三个组件放到对应位置; * steps[].done 传布尔值即启用进度跟踪,不传则渲染为纯阅读步骤。 */ +import { + BookOpenText as ActionBookOpenText, + Compass as ActionCompass, + ChevronDown as ActionChevronDown, +} from '@/components/common/icons/ActionIcons'; import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { Button, SideSheet } from '@/components/ui'; import { useTranslation } from 'react-i18next'; -import { - BookOpenText, - CheckCircle2, - ChevronDown, - Compass, - Loader2, -} from 'lucide-react'; +import { CheckCircle2, Loader2 } from 'lucide-react'; import './page-guide.css'; const seenKey = (guideKey) => `page-guide-seen-${guideKey}`; @@ -162,7 +161,7 @@ export const PageGuideTrigger = ({ guide, className = '' }) => { {isOpen && (
diff --git a/src/components/common/icons/ActionIcons.js b/src/components/common/icons/ActionIcons.js new file mode 100644 index 00000000..151981fc --- /dev/null +++ b/src/components/common/icons/ActionIcons.js @@ -0,0 +1,606 @@ +/* +Copyright (C) 2025 QuantumNous + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see . + +For commercial licensing, please contact support@quantumnous.com +*/ + +import React, { forwardRef } from 'react'; +import { + AccountBookOutlined, + DiffOutlined, + ExperimentOutlined, + ClearOutlined, + MenuUnfoldOutlined, + BoldOutlined, + ItalicOutlined, + UnderlineOutlined, + OrderedListOutlined, + SunOutlined, + MoonOutlined, + AppstoreOutlined, + ArrowDownOutlined, + ArrowLeftOutlined, + ArrowRightOutlined, + ArrowUpOutlined, + AudioMutedOutlined, + AudioOutlined, + BankOutlined, + BarChartOutlined, + BellOutlined, + BlockOutlined, + BookOutlined, + BorderOutlined, + CaretRightOutlined, + CheckCircleOutlined, + CheckOutlined, + CheckSquareOutlined, + ClockCircleOutlined, + CloseCircleOutlined, + CloseOutlined, + CloudServerOutlined, + CloudUploadOutlined, + CodeOutlined, + CompassOutlined, + ControlOutlined, + CopyOutlined, + CreditCardOutlined, + CustomerServiceOutlined, + DeleteOutlined, + DislikeOutlined, + DownOutlined, + DownloadOutlined, + EditOutlined, + ExclamationCircleOutlined, + ExpandAltOutlined, + ExportOutlined, + EyeInvisibleOutlined, + EyeOutlined, + FastForwardOutlined, + FieldTimeOutlined, + FileDoneOutlined, + FileOutlined, + FileTextOutlined, + FilterOutlined, + FontSizeOutlined, + GiftOutlined, + GithubOutlined, + GlobalOutlined, + HistoryOutlined, + HomeOutlined, + InfoCircleOutlined, + KeyOutlined, + LayoutOutlined, + LeftOutlined, + LikeOutlined, + LineChartOutlined, + LinkOutlined, + LockOutlined, + MailOutlined, + MenuOutlined, + MessageOutlined, + MinusOutlined, + MoreOutlined, + MutedOutlined, + PaperClipOutlined, + PictureOutlined, + PlayCircleOutlined, + PlusOutlined, + PrinterOutlined, + QuestionCircleOutlined, + ReadOutlined, + RedoOutlined, + ReloadOutlined, + RightOutlined, + RobotOutlined, + RocketOutlined, + SafetyCertificateOutlined, + SafetyOutlined, + SaveOutlined, + ScheduleOutlined, + SearchOutlined, + SendOutlined, + SettingOutlined, + ShareAltOutlined, + SoundOutlined, + StarFilled, + StarOutlined, + StopOutlined, + SwapOutlined, + TeamOutlined, + ThunderboltOutlined, + UndoOutlined, + UnorderedListOutlined, + UpOutlined, + UploadOutlined, + UserAddOutlined, + UserOutlined, + VideoCameraOutlined, + WalletOutlined, + WarningOutlined, + ZoomInOutlined, + ZoomOutOutlined, +} from '@ant-design/icons'; + +// Keep existing icon props and DOM refs while rendering the Ant Design glyph. +const createActionIcon = (Icon, displayName, options = {}) => { + const Component = forwardRef(function ActionIcon( + { + size, + color, + className = '', + style, + strokeWidth, + absoluteStrokeWidth, + fill, + ...props + }, + ref, + ) { + const fontSize = + { small: 14, default: 16, large: 20, 'extra-large': 24 }[size] ?? size; + const Glyph = + fill && fill !== 'none' && options.filled ? options.filled : Icon; + return React.createElement(Glyph, { + ...props, + ref, + rotate: props.rotate ?? options.rotate, + className: ['app-action-icon', className].filter(Boolean).join(' '), + style: { fontSize, color, ...style }, + }); + }); + Component.displayName = displayName; + return Component; +}; + +export const Search = /* @__PURE__ */ createActionIcon( + SearchOutlined, + 'Search', +); +export const Plus = /* @__PURE__ */ createActionIcon(PlusOutlined, 'Plus'); +export const RefreshCw = /* @__PURE__ */ createActionIcon( + ReloadOutlined, + 'RefreshCw', +); +export const RefreshCcw = /* @__PURE__ */ createActionIcon( + ReloadOutlined, + 'RefreshCcw', +); +export const RotateCcw = /* @__PURE__ */ createActionIcon( + UndoOutlined, + 'RotateCcw', +); +export const RotateCw = /* @__PURE__ */ createActionIcon( + RedoOutlined, + 'RotateCw', +); +export const Trash2 = /* @__PURE__ */ createActionIcon( + DeleteOutlined, + 'Trash2', +); +export const X = /* @__PURE__ */ createActionIcon(CloseOutlined, 'X'); +export const Download = /* @__PURE__ */ createActionIcon( + DownloadOutlined, + 'Download', +); +export const Upload = /* @__PURE__ */ createActionIcon( + UploadOutlined, + 'Upload', +); +export const Copy = /* @__PURE__ */ createActionIcon(CopyOutlined, 'Copy'); +export const ClipboardCopy = /* @__PURE__ */ createActionIcon( + CopyOutlined, + 'ClipboardCopy', +); +export const Check = /* @__PURE__ */ createActionIcon(CheckOutlined, 'Check'); +export const ChevronDown = /* @__PURE__ */ createActionIcon( + DownOutlined, + 'ChevronDown', +); +export const ChevronUp = /* @__PURE__ */ createActionIcon( + UpOutlined, + 'ChevronUp', +); +export const ChevronLeft = /* @__PURE__ */ createActionIcon( + LeftOutlined, + 'ChevronLeft', +); +export const ChevronRight = /* @__PURE__ */ createActionIcon( + RightOutlined, + 'ChevronRight', +); +export const ArrowRight = /* @__PURE__ */ createActionIcon( + ArrowRightOutlined, + 'ArrowRight', +); +export const ArrowLeft = /* @__PURE__ */ createActionIcon( + ArrowLeftOutlined, + 'ArrowLeft', +); +export const ArrowUp = /* @__PURE__ */ createActionIcon( + ArrowUpOutlined, + 'ArrowUp', +); +export const ArrowDown = /* @__PURE__ */ createActionIcon( + ArrowDownOutlined, + 'ArrowDown', +); +export const ArrowUpRight = /* @__PURE__ */ createActionIcon( + ArrowUpOutlined, + 'ArrowUpRight', + { + rotate: 45, + }, +); +export const Eye = /* @__PURE__ */ createActionIcon(EyeOutlined, 'Eye'); +export const EyeOff = /* @__PURE__ */ createActionIcon( + EyeInvisibleOutlined, + 'EyeOff', +); +export const Save = /* @__PURE__ */ createActionIcon(SaveOutlined, 'Save'); +export const ExternalLink = /* @__PURE__ */ createActionIcon( + ExportOutlined, + 'ExternalLink', +); +export const Star = /* @__PURE__ */ createActionIcon(StarOutlined, 'Star', { + filled: StarFilled, +}); +export const Globe = /* @__PURE__ */ createActionIcon(GlobalOutlined, 'Globe'); +export const Pencil = /* @__PURE__ */ createActionIcon(EditOutlined, 'Pencil'); +export const Edit = /* @__PURE__ */ createActionIcon(EditOutlined, 'Edit'); +export const Wallet = /* @__PURE__ */ createActionIcon( + WalletOutlined, + 'Wallet', +); +export const Settings = /* @__PURE__ */ createActionIcon( + SettingOutlined, + 'Settings', +); +export const Settings2 = /* @__PURE__ */ createActionIcon( + SettingOutlined, + 'Settings2', +); +export const SlidersHorizontal = /* @__PURE__ */ createActionIcon( + ControlOutlined, + 'SlidersHorizontal', +); +export const MoreHorizontal = /* @__PURE__ */ createActionIcon( + MoreOutlined, + 'MoreHorizontal', +); +export const Ellipsis = /* @__PURE__ */ createActionIcon( + MoreOutlined, + 'Ellipsis', +); +export const Zap = /* @__PURE__ */ createActionIcon(ThunderboltOutlined, 'Zap'); +export const MessageCircle = /* @__PURE__ */ createActionIcon( + MessageOutlined, + 'MessageCircle', +); +export const Send = /* @__PURE__ */ createActionIcon(SendOutlined, 'Send'); +export const Ban = /* @__PURE__ */ createActionIcon(StopOutlined, 'Ban'); +export const ShieldCheck = /* @__PURE__ */ createActionIcon( + SafetyCertificateOutlined, + 'ShieldCheck', +); +export const Shield = /* @__PURE__ */ createActionIcon( + SafetyOutlined, + 'Shield', +); +export const Lock = /* @__PURE__ */ createActionIcon(LockOutlined, 'Lock'); +export const LockKeyhole = /* @__PURE__ */ createActionIcon( + LockOutlined, + 'LockKeyhole', +); +export const History = /* @__PURE__ */ createActionIcon( + HistoryOutlined, + 'History', +); +export const Code2 = /* @__PURE__ */ createActionIcon(CodeOutlined, 'Code2'); +export const Code = /* @__PURE__ */ createActionIcon(CodeOutlined, 'Code'); +export const KeyRound = /* @__PURE__ */ createActionIcon( + KeyOutlined, + 'KeyRound', +); +export const Filter = /* @__PURE__ */ createActionIcon( + FilterOutlined, + 'Filter', +); +export const Headphones = /* @__PURE__ */ createActionIcon( + CustomerServiceOutlined, + 'Headphones', +); +export const Mic = /* @__PURE__ */ createActionIcon(AudioOutlined, 'Mic'); +export const MicOff = /* @__PURE__ */ createActionIcon( + AudioMutedOutlined, + 'MicOff', +); +export const Square = /* @__PURE__ */ createActionIcon( + BorderOutlined, + 'Square', +); +export const CheckCircle2 = /* @__PURE__ */ createActionIcon( + CheckCircleOutlined, + 'CheckCircle2', +); +export const CheckCircle = /* @__PURE__ */ createActionIcon( + CheckCircleOutlined, + 'CheckCircle', +); +export const CircleCheck = /* @__PURE__ */ createActionIcon( + CheckCircleOutlined, + 'CircleCheck', +); +export const LayoutGrid = /* @__PURE__ */ createActionIcon( + AppstoreOutlined, + 'LayoutGrid', +); +export const Play = /* @__PURE__ */ createActionIcon( + CaretRightOutlined, + 'Play', +); +export const CirclePlay = /* @__PURE__ */ createActionIcon( + PlayCircleOutlined, + 'CirclePlay', +); +export const HelpCircle = /* @__PURE__ */ createActionIcon( + QuestionCircleOutlined, + 'HelpCircle', +); +export const CircleHelp = /* @__PURE__ */ createActionIcon( + QuestionCircleOutlined, + 'CircleHelp', +); +export const AlertCircle = /* @__PURE__ */ createActionIcon( + ExclamationCircleOutlined, + 'AlertCircle', +); +export const CircleAlert = /* @__PURE__ */ createActionIcon( + ExclamationCircleOutlined, + 'CircleAlert', +); +export const AlertTriangle = /* @__PURE__ */ createActionIcon( + WarningOutlined, + 'AlertTriangle', +); +export const TriangleAlert = /* @__PURE__ */ createActionIcon( + WarningOutlined, + 'TriangleAlert', +); +export const Layers = /* @__PURE__ */ createActionIcon(BlockOutlined, 'Layers'); +export const UserPlus = /* @__PURE__ */ createActionIcon( + UserAddOutlined, + 'UserPlus', +); +export const UserRound = /* @__PURE__ */ createActionIcon( + UserOutlined, + 'UserRound', +); +export const User = /* @__PURE__ */ createActionIcon(UserOutlined, 'User'); +export const Users = /* @__PURE__ */ createActionIcon(TeamOutlined, 'Users'); +export const Printer = /* @__PURE__ */ createActionIcon( + PrinterOutlined, + 'Printer', +); +export const Paperclip = /* @__PURE__ */ createActionIcon( + PaperClipOutlined, + 'Paperclip', +); +export const ZoomOut = /* @__PURE__ */ createActionIcon( + ZoomOutOutlined, + 'ZoomOut', +); +export const ZoomIn = /* @__PURE__ */ createActionIcon( + ZoomInOutlined, + 'ZoomIn', +); +export const FileText = /* @__PURE__ */ createActionIcon( + FileTextOutlined, + 'FileText', +); +export const File = /* @__PURE__ */ createActionIcon(FileOutlined, 'File'); +export const FastForward = /* @__PURE__ */ createActionIcon( + FastForwardOutlined, + 'FastForward', +); +export const Volume1 = /* @__PURE__ */ createActionIcon( + SoundOutlined, + 'Volume1', +); +export const Volume2 = /* @__PURE__ */ createActionIcon( + SoundOutlined, + 'Volume2', +); +export const VolumeX = /* @__PURE__ */ createActionIcon( + MutedOutlined, + 'VolumeX', +); +export const Receipt = /* @__PURE__ */ createActionIcon( + AccountBookOutlined, + 'Receipt', +); +export const ReceiptText = /* @__PURE__ */ createActionIcon( + AccountBookOutlined, + 'ReceiptText', +); +export const BarChart3 = /* @__PURE__ */ createActionIcon( + BarChartOutlined, + 'BarChart3', +); +export const ChartColumn = /* @__PURE__ */ createActionIcon( + BarChartOutlined, + 'ChartColumn', +); +export const ChartLine = /* @__PURE__ */ createActionIcon( + LineChartOutlined, + 'ChartLine', +); +export const Bell = /* @__PURE__ */ createActionIcon(BellOutlined, 'Bell'); +export const Bot = /* @__PURE__ */ createActionIcon(RobotOutlined, 'Bot'); +export const ThumbsUp = /* @__PURE__ */ createActionIcon( + LikeOutlined, + 'ThumbsUp', +); +export const ThumbsDown = /* @__PURE__ */ createActionIcon( + DislikeOutlined, + 'ThumbsDown', +); +export const Rows = /* @__PURE__ */ createActionIcon( + UnorderedListOutlined, + 'Rows', +); +export const Layout = /* @__PURE__ */ createActionIcon( + LayoutOutlined, + 'Layout', +); +export const Image = /* @__PURE__ */ createActionIcon(PictureOutlined, 'Image'); +export const Share2 = /* @__PURE__ */ createActionIcon( + ShareAltOutlined, + 'Share2', +); +export const Rocket = /* @__PURE__ */ createActionIcon( + RocketOutlined, + 'Rocket', +); +export const BookOpen = /* @__PURE__ */ createActionIcon( + ReadOutlined, + 'BookOpen', +); +export const BookOpenText = /* @__PURE__ */ createActionIcon( + ReadOutlined, + 'BookOpenText', +); +export const Menu = /* @__PURE__ */ createActionIcon(MenuOutlined, 'Menu'); +export const UploadCloud = /* @__PURE__ */ createActionIcon( + CloudUploadOutlined, + 'UploadCloud', +); +export const Building2 = /* @__PURE__ */ createActionIcon( + BankOutlined, + 'Building2', +); +export const FileCheck2 = /* @__PURE__ */ createActionIcon( + FileDoneOutlined, + 'FileCheck2', +); +export const OctagonX = /* @__PURE__ */ createActionIcon( + CloseCircleOutlined, + 'OctagonX', +); +export const Home = /* @__PURE__ */ createActionIcon(HomeOutlined, 'Home'); +export const ArrowRightLeft = /* @__PURE__ */ createActionIcon( + SwapOutlined, + 'ArrowRightLeft', +); +export const Maximize2 = /* @__PURE__ */ createActionIcon( + ExpandAltOutlined, + 'Maximize2', +); +export const CheckSquare = /* @__PURE__ */ createActionIcon( + CheckSquareOutlined, + 'CheckSquare', +); +export const ListFilter = /* @__PURE__ */ createActionIcon( + FilterOutlined, + 'ListFilter', +); +export const CalendarClock = /* @__PURE__ */ createActionIcon( + ScheduleOutlined, + 'CalendarClock', +); +export const CreditCard = /* @__PURE__ */ createActionIcon( + CreditCardOutlined, + 'CreditCard', +); +export const Link = /* @__PURE__ */ createActionIcon(LinkOutlined, 'Link'); +export const Mail = /* @__PURE__ */ createActionIcon(MailOutlined, 'Mail'); +export const Github = /* @__PURE__ */ createActionIcon( + GithubOutlined, + 'Github', +); +export const Gift = /* @__PURE__ */ createActionIcon(GiftOutlined, 'Gift'); +export const Minus = /* @__PURE__ */ createActionIcon(MinusOutlined, 'Minus'); +export const Video = /* @__PURE__ */ createActionIcon( + VideoCameraOutlined, + 'Video', +); +export const Server = /* @__PURE__ */ createActionIcon( + CloudServerOutlined, + 'Server', +); +export const Bookmark = /* @__PURE__ */ createActionIcon( + BookOutlined, + 'Bookmark', +); +export const Info = /* @__PURE__ */ createActionIcon( + InfoCircleOutlined, + 'Info', +); +export const Timer = /* @__PURE__ */ createActionIcon( + FieldTimeOutlined, + 'Timer', +); +export const Type = /* @__PURE__ */ createActionIcon(FontSizeOutlined, 'Type'); +export const Clock = /* @__PURE__ */ createActionIcon( + ClockCircleOutlined, + 'Clock', +); +export const Compass = /* @__PURE__ */ createActionIcon( + CompassOutlined, + 'Compass', +); + +// Keep composite upload/user-check and heartbeat glyphs without an exact Ant equivalent. +export { Activity, FileUp, UserCheck } from 'lucide-react'; + +export const Bold = /* @__PURE__ */ createActionIcon(BoldOutlined, 'Bold'); +export const Italic = /* @__PURE__ */ createActionIcon( + ItalicOutlined, + 'Italic', +); +export const Underline = /* @__PURE__ */ createActionIcon( + UnderlineOutlined, + 'Underline', +); +export const List = /* @__PURE__ */ createActionIcon( + UnorderedListOutlined, + 'List', +); +export const ListOrdered = /* @__PURE__ */ createActionIcon( + OrderedListOutlined, + 'ListOrdered', +); +export const Undo2 = /* @__PURE__ */ createActionIcon(UndoOutlined, 'Undo2'); +export const Redo2 = /* @__PURE__ */ createActionIcon(RedoOutlined, 'Redo2'); +export const Sun = /* @__PURE__ */ createActionIcon(SunOutlined, 'Sun'); +export const Moon = /* @__PURE__ */ createActionIcon(MoonOutlined, 'Moon'); + +export const GitCompare = /* @__PURE__ */ createActionIcon( + DiffOutlined, + 'GitCompare', +); +export const TestTube2 = /* @__PURE__ */ createActionIcon( + ExperimentOutlined, + 'TestTube2', +); +export const Eraser = /* @__PURE__ */ createActionIcon(ClearOutlined, 'Eraser'); +export const PanelLeftOpen = /* @__PURE__ */ createActionIcon( + MenuUnfoldOutlined, + 'PanelLeftOpen', +); +export const LayoutTemplate = /* @__PURE__ */ createActionIcon( + LayoutOutlined, + 'LayoutTemplate', +); diff --git a/src/components/common/modals/NewUserGiftModal.jsx b/src/components/common/modals/NewUserGiftModal.jsx index 02f8a1d9..f1f900c7 100644 --- a/src/components/common/modals/NewUserGiftModal.jsx +++ b/src/components/common/modals/NewUserGiftModal.jsx @@ -16,18 +16,14 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { + X as ActionX, + ArrowRight as ActionArrowRight, +} from '@/components/common/icons/ActionIcons'; import React from 'react'; import { Modal, Button, Typography } from '@/components/ui'; import { useTranslation } from 'react-i18next'; -import { - Gift, - ArrowRight, - Sparkles, - X, - Wallet, - KeyRound, - Star, -} from 'lucide-react'; +import { Gift, Sparkles, Wallet, KeyRound, Star } from 'lucide-react'; import { renderQuota } from '../../../helpers'; const { Text } = Typography; @@ -65,10 +61,10 @@ const NewUserGiftModal = ({ visible, onClose, quota }) => { {/* 关闭按钮 */} {/* 头部 */} @@ -158,7 +154,7 @@ const NewUserGiftModal = ({ visible, onClose, quota }) => { > {t('马上试一试')} - +

diff --git a/src/components/common/modals/UserSurveyModal.jsx b/src/components/common/modals/UserSurveyModal.jsx index 53028172..fa952f8a 100644 --- a/src/components/common/modals/UserSurveyModal.jsx +++ b/src/components/common/modals/UserSurveyModal.jsx @@ -17,6 +17,10 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { + X as ActionX, + ChevronRight as ActionChevronRight, +} from '@/components/common/icons/ActionIcons'; import React, { useState, useEffect, useContext } from 'react'; import { Modal, RadioGroup, Radio, Button, Typography } from '@/components/ui'; import { useTranslation } from 'react-i18next'; @@ -28,15 +32,7 @@ import { showError, showWarning, } from '../../../helpers'; -import { - Sparkles, - Briefcase, - Cpu, - ChevronRight, - UserCircle, - X, - LogOut, -} from 'lucide-react'; +import { Sparkles, Briefcase, Cpu, UserCircle, LogOut } from 'lucide-react'; import { UserContext } from '../../../context/User'; const { Title, Text } = Typography; @@ -148,10 +144,10 @@ const UserSurveyModal = ({ visible, onClose, onSuccess }) => { {/* 关闭按钮 */}

diff --git a/src/components/common/table/ColumnSettings.jsx b/src/components/common/table/ColumnSettings.jsx index 97e0a898..490850aa 100644 --- a/src/components/common/table/ColumnSettings.jsx +++ b/src/components/common/table/ColumnSettings.jsx @@ -17,9 +17,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { Settings as ActionSettings } from '@/components/common/icons/ActionIcons'; import React, { useState } from 'react'; import { Alert, Button, Checkbox, Modal, Tooltip, theme } from 'antd'; -import { Settings } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import './column-settings.css'; @@ -53,7 +53,7 @@ export function ColumnSettingsButton({ onClick, open = false }) { aria-label={t('列设置')} aria-haspopup='dialog' aria-expanded={open} - icon={} + icon={} onClick={onClick} /> diff --git a/src/components/common/table/FilterSearchButton.jsx b/src/components/common/table/FilterSearchButton.jsx index 516ae594..d8cec433 100644 --- a/src/components/common/table/FilterSearchButton.jsx +++ b/src/components/common/table/FilterSearchButton.jsx @@ -17,9 +17,9 @@ along with this program. If not, see . For commercial licensing, please contact support@quantumnous.com */ +import { Search as ActionSearch } from '@/components/common/icons/ActionIcons'; import React from 'react'; import { Button } from 'antd'; -import { Search } from 'lucide-react'; import { useTranslation } from 'react-i18next'; import './filter-search-button.css'; @@ -37,7 +37,7 @@ export default function FilterSearchButton({ onClick={onClick} size='middle' loading={loading} - icon={} + icon={} > {t('搜索')} diff --git a/src/components/common/table/filter-search-button.css b/src/components/common/table/filter-search-button.css index 98dcad81..3fff052a 100644 --- a/src/components/common/table/filter-search-button.css +++ b/src/components/common/table/filter-search-button.css @@ -10,7 +10,7 @@ justify-content: center; } -.console-page .filter-search-button .lucide { +.console-page .filter-search-button :is(.lucide, .app-action-icon) { display: block; width: 14px; height: 14px; diff --git a/src/components/common/ui/ChannelKeyDisplay.jsx b/src/components/common/ui/ChannelKeyDisplay.jsx index d87b2042..4b166b37 100644 --- a/src/components/common/ui/ChannelKeyDisplay.jsx +++ b/src/components/common/ui/ChannelKeyDisplay.jsx @@ -21,6 +21,7 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { Card, Button, Typography, Tag } from '@/components/ui'; import { copy, showError, showSuccess } from '../../../helpers'; +import { Copy } from '../icons/ActionIcons'; /** * 解析密钥数据,支持多种格式 @@ -175,16 +176,7 @@ const ChannelKeyDisplay = ({ size='small' type='primary' theme='outline' - icon={ - - - - - } + icon={} onClick={() => handleCopyKey(keyItem.content)} > {t('复制')} diff --git a/src/components/common/ui/RichTextEditor.jsx b/src/components/common/ui/RichTextEditor.jsx index 2adf6400..12ab9134 100644 --- a/src/components/common/ui/RichTextEditor.jsx +++ b/src/components/common/ui/RichTextEditor.jsx @@ -31,12 +31,11 @@ import { Underline, List, ListOrdered, - Quote, Undo2, Redo2, Eraser, - ImagePlus, -} from 'lucide-react'; +} from '../icons/ActionIcons'; +import { Quote, ImagePlus } from 'lucide-react'; import { articleImageSource, ARTICLE_IMAGE_TYPES, @@ -470,6 +469,7 @@ export default function RichTextEditor({ ))}