refactor(ui): 将合并引入的 Semi 组件迁移到 Ant Design 适配层
- 创作台、WeyAi 设置、OrgResolver 共 23 个文件改从 @/components/ui 引入 - Popover 改用 open/trigger='click'/onOpenChange,移除 .semi-portal 判定 - Dropdown.Title / Item active 改为 menu group / selectedKeys - Slider tooltip.formatter、Checkbox.Group、TagInput maxCount、DatePicker 取 Date 参数 - --semi-color-* 改为 --ui-color-*,遮罩色用 antd 默认,.semi-* 选择器改为 .ant-* - docs/UI_MIGRATION.md 记录组件映射、视觉差异与风险
This commit is contained in:
@@ -600,3 +600,31 @@ mock 与 live 共享完整目录的前端筛选及分页逻辑。live 沿用 `/a
|
||||
- 单列 / 全选 / 重置只改草稿,确认后一次应用,至少保留一列;取消 / X / Esc / 遮罩均放弃草稿,关闭焦点返回入口;后台刷新不重置草稿。原默认列、角色过滤、存储键保留,渠道“自动封禁”仍默认隐藏,个人与企业密钥仍为页内状态。四个 hook AST 对照确认只暴露原 setter / 默认值,所有受影响文件的 API 调用不变;新校验文案补齐 9 个语言包。
|
||||
- 验证:9 入口 × 浅深色 × 桌面 1920×916 / 窄屏 393×851,36/36 场景、324 组交互检查通过;普通用户权限、真实与模拟移动任务卡片字段、刷新保留草稿、不可配置键保留等补测 5/5;已有密钥搜索 / 重置 / 列设置用例桌面与移动 2/2。页面运行错误与非 GET API 请求均为 0。单元测试 291/291,变更文件 ESLint 0 错误 / 12 条既有警告,变更文件 Prettier 与 `git diff --check` 通过;全仓 ESLint 261 个错误 / 189 条警告及 677 个格式文件问题单列,不批量修改其他文件。
|
||||
- 限制:真实 `/api/org/tasks` 仍返回 404,企业任务完整数据交互采用浏览器 mock 并明确标记。浏览器、截图、单元测试等重任务串行,持续记录物理内存与整机 CPU,未触发 2GB 内存压力阈值;产物只保存在忽略目录 `report/column-settings/`,入口 `index.html`。按用户要求未执行生产构建或生产写操作;工作区并发修改按用户确认保留。
|
||||
|
||||
## 合并引入的 Semi 组件迁移(2026-11-10)
|
||||
|
||||
- 范围:仅限合入总仓库 weiyuan(bfdfb339)`web/` 新功能时带进来、仍直接引用 `@douyinfe/semi-ui` 或 `--semi-color-*` 的文件——创作台 `src/components/creation/**`(17 个组件 + 5 个 CSS + `CreationGuide.jsx`)、`components/settings/WeyAiSetting.jsx`、`pages/Organization/OrgResolver.jsx`、`pages/Setting/WeyAi/*`(4 个)。其他文件不改;业务逻辑、数据流、状态、API、路由不变。
|
||||
- 依赖:`package.json` / `package-lock.json` 早已无 Semi;迁移后源码无 `@douyinfe` 引用,构建产物含 Semi 的文件由 2 个降为 0。本地 `node_modules/@douyinfe` 仅为安装残留,可用 `npm prune` 清理。
|
||||
- 组件映射(在上方“组件映射”表之外的补充):
|
||||
|
||||
| 原写法 | Ant Design 写法 | 位置 |
|
||||
| -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ----------------------------------------------------------------- |
|
||||
| `import … from '@douyinfe/semi-ui'` | `import … from '@/components/ui'` | 全部 23 个文件 |
|
||||
| Popover `visible` + `trigger='custom'` + `onClickOutSide` / `onEscKeyDown` | `open` + `trigger='click'` + `onOpenChange(false)`(Esc 与嵌套浮层豁免用 antd 原生) | `CreationDock` DockPopover、`ModelPicker`、`WorkFeed/FilterBar` |
|
||||
| Popover `contentClassName` | `classNames={{ body }}`(作用于 `.ant-popover-inner`) | 同上 |
|
||||
| Dropdown `render` + `Dropdown.Title` | `menu.items` 中 `type: 'group'` | `CreationDock` 提示词历史 |
|
||||
| Dropdown.Item `active` | `menu.selectable` + `selectedKeys` | `CreationDock` 模式切换 |
|
||||
| Slider `tipFormatter` | `tooltip={{ formatter }}` | `params/ParamSlider.jsx` |
|
||||
| `CheckboxGroup direction='horizontal'` | `Checkbox.Group`(默认横排) | `SettingsWeyAiContentEditor.jsx` |
|
||||
| TagInput `max` | `maxCount` | `SettingsWeyAiContentEditor.jsx` |
|
||||
| DatePicker `onChange(date)` | `onChange(_, date)`(适配层第二参为 Date,与 Semi 首参语义一致) | `SettingsWeyAiContentEditor.jsx`、`SettingsWeyAiReleaseNotes.jsx` |
|
||||
| `Modal.confirm({ okButtonProps: { type: 'danger' } })` | `okButtonProps: { danger: true }` | `WorkFeed/WorkFeed.jsx` |
|
||||
| `--semi-color-{primary,warning,danger,success,border,white}` | `--ui-color-*`(`UiThemeProvider` TokenBridge) | 创作台 CSS、WeyAi 设置 |
|
||||
| `--semi-color-overlay-bg` | Ant Design 默认遮罩色 `rgba(0, 0, 0, 0.45)`(`colorBgMask`) | `creation-dock.css` 遮罩、`CreationGuide.jsx` |
|
||||
| `.semi-select` / `.semi-input-wrapper` | `.ant-select` / `.ant-input-affix-wrapper` | `WorkFeed/work-feed.css` |
|
||||
| 点击 `.semi-portal` 内不关闭弹层(`isInsideOtherPortal`) | 删除;由 antd 触发器嵌套浮层机制处理 | `CreationDock.jsx` |
|
||||
|
||||
- 间距:Semi Popover 内容区无内边距,antd `.ant-popover-inner` 默认 12px。DockPopover 保留自身 `.cs-pop-body` 12px 并将 inner 置 0;FilterBar 去掉 `p-3` 包装改用 antd 默认 12px,视觉间距不变。
|
||||
- 已知视觉差异(遵循 Ant Design 默认,不自行设计替代效果):Ant Design 无 warning 按钮类型,`type='warning'`(创作台“升级 / 去充值”、版本说明“撤回”)分别按适配层显示为 primary / default;Badge 计数用 antd 默认色;`Text size='small'` 显示为默认字号;遮罩色由 Semi 深灰改为 antd 默认。
|
||||
- 风险:TagInput 的 `maxLength`(单个标签长度)在 antd tags 模式下不生效,前端输入不再截断,依赖后端 `max_len` 校验,未修改业务代码;本轮未做浏览器视觉回归,创作台弹层 / 抽屉 / 下拉与 WeyAi 设置页需人工过一遍浅深色与移动端。
|
||||
- 验证:单元测试 388/388;变更文件 ESLint 0 错误;构建通过;变更 CSS Prettier 通过(`CreationDock.jsx` 在合并前已存在的格式差异未顺带修改)。
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Button, Modal, Spin } from '@douyinfe/semi-ui';
|
||||
import { Button, Modal, Spin } from '@/components/ui';
|
||||
import { AlertTriangle } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { compareParamSummary } from '../../hooks/creation/creationCompare';
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Skeleton,
|
||||
TextArea,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
AlertCircle,
|
||||
ArrowLeft,
|
||||
@@ -161,10 +161,6 @@ const getStorage = () => {
|
||||
}
|
||||
};
|
||||
|
||||
// 弹层内点击 Select 下拉等其他 portal 时不关闭弹层
|
||||
const isInsideOtherPortal = (e) =>
|
||||
Boolean(e?.target?.closest?.('.semi-portal, .semi-select-option-list'));
|
||||
|
||||
/** 估价文案:"预计 ¥x · 约 N 秒 · 失败自动退还";估价失败 → "价格以实际扣费为准"。 */
|
||||
export const quoteText = (
|
||||
t,
|
||||
@@ -275,15 +271,14 @@ const DockPopover = ({
|
||||
}
|
||||
return (
|
||||
<Popover
|
||||
visible={open}
|
||||
trigger='custom'
|
||||
open={open}
|
||||
trigger='click'
|
||||
position='topLeft'
|
||||
showArrow={false}
|
||||
onClickOutSide={(e) => {
|
||||
if (!isInsideOtherPortal(e)) onClose();
|
||||
onOpenChange={(next) => {
|
||||
if (!next) onClose();
|
||||
}}
|
||||
onEscKeyDown={onClose}
|
||||
contentClassName={`cs-popover ${className}`}
|
||||
classNames={{ body: `cs-popover ${className}` }}
|
||||
content={
|
||||
open ? (
|
||||
<div className='cs-pop-body' role='dialog' aria-label={title}>
|
||||
@@ -1122,28 +1117,25 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<Dropdown
|
||||
trigger='click'
|
||||
position='topLeft'
|
||||
clickToHide
|
||||
render={
|
||||
<Dropdown.Menu>
|
||||
{modeOptions.map((o) => (
|
||||
<Dropdown.Item
|
||||
key={o.mode}
|
||||
active={mode === o.mode}
|
||||
disabled={o.disabled}
|
||||
onClick={() => {
|
||||
if (!o.disabled) setMode(o.mode);
|
||||
}}
|
||||
>
|
||||
<span className='cs-mode-item'>
|
||||
<span>{t(modeLabels[o.mode] || o.mode)}</span>
|
||||
{o.disabled && o.reason ? (
|
||||
<span className='cs-mode-reason'>{t(o.reason)}</span>
|
||||
) : null}
|
||||
</span>
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
menu={{
|
||||
selectable: true,
|
||||
selectedKeys: [mode],
|
||||
items: modeOptions.map((o) => ({
|
||||
key: o.mode,
|
||||
disabled: o.disabled,
|
||||
onClick: () => {
|
||||
if (!o.disabled) setMode(o.mode);
|
||||
},
|
||||
label: (
|
||||
<span className='cs-mode-item'>
|
||||
<span>{t(modeLabels[o.mode] || o.mode)}</span>
|
||||
{o.disabled && o.reason ? (
|
||||
<span className='cs-mode-reason'>{t(o.reason)}</span>
|
||||
) : null}
|
||||
</span>
|
||||
),
|
||||
})),
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
@@ -1463,24 +1455,27 @@ const CreationDock = ({ form, compare = null }) => {
|
||||
<Dropdown
|
||||
trigger='click'
|
||||
position='topRight'
|
||||
render={
|
||||
<Dropdown.Menu>
|
||||
<Dropdown.Title>{t('最近使用的提示词')}</Dropdown.Title>
|
||||
{promptHistory.map((item) => (
|
||||
<Dropdown.Item
|
||||
key={item}
|
||||
onClick={() => {
|
||||
menu={{
|
||||
items: [
|
||||
{
|
||||
type: 'group',
|
||||
key: 'prompt-history',
|
||||
label: t('最近使用的提示词'),
|
||||
children: promptHistory.map((item) => ({
|
||||
key: item,
|
||||
label: (
|
||||
<span className='cs-history-item' title={item}>
|
||||
{item}
|
||||
</span>
|
||||
),
|
||||
onClick: () => {
|
||||
setPrompt(item);
|
||||
requestAnimationFrame(focusPrompt);
|
||||
}}
|
||||
>
|
||||
<span className='cs-history-item' title={item}>
|
||||
{item}
|
||||
</span>
|
||||
</Dropdown.Item>
|
||||
))}
|
||||
</Dropdown.Menu>
|
||||
}
|
||||
},
|
||||
})),
|
||||
},
|
||||
],
|
||||
}}
|
||||
>
|
||||
<button
|
||||
type='button'
|
||||
|
||||
@@ -157,11 +157,11 @@ const CreationGuide = ({ kind, ready }) => {
|
||||
styles={{
|
||||
options: {
|
||||
zIndex: 10000,
|
||||
primaryColor: 'var(--semi-color-primary)',
|
||||
primaryColor: 'var(--ui-color-primary)',
|
||||
backgroundColor: 'var(--surface-card)',
|
||||
arrowColor: 'var(--surface-card)',
|
||||
textColor: 'var(--text-primary)',
|
||||
overlayColor: 'var(--semi-color-overlay-bg)',
|
||||
overlayColor: 'rgba(0, 0, 0, 0.45)',
|
||||
},
|
||||
tooltip: { borderRadius: 14, padding: 16 },
|
||||
tooltipContainer: { textAlign: 'left' },
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
||||
import { Popover, SideSheet } from '@douyinfe/semi-ui';
|
||||
import { Popover, SideSheet } from '@/components/ui';
|
||||
import { ChevronDown, Lock } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
@@ -167,14 +167,15 @@ const ModelPicker = ({
|
||||
|
||||
return (
|
||||
<Popover
|
||||
visible={open}
|
||||
trigger='custom'
|
||||
open={open}
|
||||
trigger='click'
|
||||
position='topLeft'
|
||||
showArrow={false}
|
||||
onClickOutSide={() => setOpen(false)}
|
||||
onEscKeyDown={close}
|
||||
onOpenChange={(next) => {
|
||||
if (!next) setOpen(false);
|
||||
}}
|
||||
content={open ? panel : null}
|
||||
contentClassName='mp-popover'
|
||||
classNames={{ body: 'mp-popover' }}
|
||||
>
|
||||
{trigger}
|
||||
</Popover>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useEffect, useId, useMemo, useRef, useState } from 'react';
|
||||
import { Button, Skeleton, Switch } from '@douyinfe/semi-ui';
|
||||
import { Button, Skeleton, Switch } from '@/components/ui';
|
||||
import { Check, Clock, Columns2, Lock, Search, Square } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -23,16 +23,16 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
--mp-ink: var(--text-primary);
|
||||
--mp-muted: var(--text-secondary);
|
||||
--mp-line: var(--border-subtle);
|
||||
--mp-accent: var(--semi-color-primary);
|
||||
--mp-tint: color-mix(in srgb, var(--semi-color-primary) 10%, transparent);
|
||||
--mp-accent: var(--ui-color-primary);
|
||||
--mp-tint: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||||
--mp-card: var(--surface-card);
|
||||
--mp-card-hover: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 6%,
|
||||
var(--ui-color-primary) 6%,
|
||||
var(--surface-card)
|
||||
);
|
||||
--mp-ring: color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
--mp-warning: var(--semi-color-warning);
|
||||
--mp-ring: color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
--mp-warning: var(--ui-color-warning);
|
||||
--mp-dur: var(--motion-fast, 150ms);
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.mp-trigger:hover:not(:disabled) {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
background: var(--mp-card-hover);
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.mp-card.is-active {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
background: var(--mp-card-hover);
|
||||
box-shadow: 0 0 0 2px var(--mp-tint);
|
||||
}
|
||||
@@ -265,7 +265,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.mp-badge--locked {
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 14%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 14%, transparent);
|
||||
color: var(--mp-warning);
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
gap: 8px;
|
||||
padding: 10px 12px;
|
||||
border-top: 1px solid var(--mp-line);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 8%, var(--mp-card));
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 8%, var(--mp-card));
|
||||
color: var(--mp-ink);
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
/* ---------- 对比生成(WP C-2,仅图像) ---------- */
|
||||
.mp-trigger.is-compare {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
background: var(--mp-tint);
|
||||
}
|
||||
|
||||
@@ -343,7 +343,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid var(--mp-line);
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 4%, var(--mp-card));
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 4%, var(--mp-card));
|
||||
}
|
||||
|
||||
.mp-compare-icon {
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useContext, useMemo, useState } from 'react';
|
||||
import { Button } from '@douyinfe/semi-ui';
|
||||
import { Button } from '@/components/ui';
|
||||
import { ChevronDown, Code2, Copy, KeyRound } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
Popover,
|
||||
Select,
|
||||
SideSheet,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Filter, GitCompare, Search, Star } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '../../../hooks/common/useIsMobile';
|
||||
@@ -267,12 +267,13 @@ const FilterBar = ({ kind, api, selecting, onToggleSelecting }) => {
|
||||
</>
|
||||
) : (
|
||||
<Popover
|
||||
visible={open}
|
||||
trigger='custom'
|
||||
open={open}
|
||||
trigger='click'
|
||||
position='bottomRight'
|
||||
onClickOutSide={() => setOpen(false)}
|
||||
onEscKeyDown={() => setOpen(false)}
|
||||
content={<div className='p-3'>{panel}</div>}
|
||||
onOpenChange={(next) => {
|
||||
if (!next) setOpen(false);
|
||||
}}
|
||||
content={panel}
|
||||
>
|
||||
{trigger}
|
||||
</Popover>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { memo, useEffect, useRef, useState } from 'react';
|
||||
import { Button, Dropdown } from '@douyinfe/semi-ui';
|
||||
import { Button, Dropdown } from '@/components/ui';
|
||||
import {
|
||||
AlertCircle,
|
||||
Check,
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useEffect, useRef, useState } from 'react';
|
||||
import { Button, SideSheet, Spin } from '@douyinfe/semi-ui';
|
||||
import { Button, SideSheet, Spin } from '@/components/ui';
|
||||
import { Copy, Star } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
@@ -24,7 +24,7 @@ import React, {
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { Button, Modal, Spin } from '@douyinfe/semi-ui';
|
||||
import { Button, Modal, Spin } from '@/components/ui';
|
||||
import {
|
||||
Clapperboard,
|
||||
Columns2,
|
||||
@@ -531,7 +531,7 @@ const WorkFeed = ({
|
||||
Modal.confirm({
|
||||
title: t('删除作品'),
|
||||
content: t('删除后不可恢复,确定删除这个作品吗?'),
|
||||
okButtonProps: { type: 'danger' },
|
||||
okButtonProps: { danger: true },
|
||||
okText: t('删除'),
|
||||
cancelText: t('取消'),
|
||||
onOk: async () => {
|
||||
|
||||
@@ -27,8 +27,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
--wf-overlay: color-mix(in srgb, var(--surface-card) 82%, transparent);
|
||||
--wf-scrim: color-mix(in srgb, var(--text-primary) 55%, transparent);
|
||||
--wf-on-scrim: var(--surface-card);
|
||||
--wf-success: var(--semi-color-success);
|
||||
--wf-warning: var(--semi-color-warning);
|
||||
--wf-success: var(--ui-color-success);
|
||||
--wf-warning: var(--ui-color-warning);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -85,7 +85,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.wf-card:hover {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 30%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 30%, transparent);
|
||||
box-shadow: 0 6px 20px color-mix(in srgb, var(--text-primary) 8%, transparent);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
@@ -212,7 +212,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.wf-icon-btn:hover {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
color: var(--studio-accent);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
background: linear-gradient(
|
||||
110deg,
|
||||
var(--wf-media-bg) 30%,
|
||||
color-mix(in srgb, var(--semi-color-primary) 10%, transparent) 50%,
|
||||
color-mix(in srgb, var(--ui-color-primary) 10%, transparent) 50%,
|
||||
var(--wf-media-bg) 70%
|
||||
);
|
||||
background-size: 200% 100%;
|
||||
@@ -311,7 +311,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
height: 4px;
|
||||
overflow: hidden;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 15%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 15%, transparent);
|
||||
}
|
||||
|
||||
.wf-progress > span {
|
||||
@@ -416,12 +416,11 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 25%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||||
border-radius: var(--wf-radius);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 6%,
|
||||
var(--ui-color-primary) 6%,
|
||||
var(--surface-card)
|
||||
);
|
||||
font-size: 13px;
|
||||
@@ -442,7 +441,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wf-filters .semi-select {
|
||||
.wf-filters .ant-select {
|
||||
min-width: 112px;
|
||||
max-width: 180px;
|
||||
}
|
||||
@@ -461,8 +460,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.wf-filter-panel .semi-select,
|
||||
.wf-filter-panel .semi-input-wrapper {
|
||||
.wf-filter-panel .ant-select,
|
||||
.wf-filter-panel .ant-input-affix-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -534,7 +533,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.wf-thumb.is-active {
|
||||
border-color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.wf-detail-section-title {
|
||||
@@ -587,10 +586,9 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
.wf-detail-alert {
|
||||
padding: 10px 12px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-danger) 30%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-danger) 30%, transparent);
|
||||
border-radius: 10px;
|
||||
background: color-mix(in srgb, var(--semi-color-danger) 6%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-danger) 6%, transparent);
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -599,7 +597,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
.wf-detail button:focus-visible,
|
||||
.wf-filters button:focus-visible {
|
||||
outline: 2px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -644,7 +642,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
.wf-wall-eyebrow {
|
||||
margin: 0 0 4px;
|
||||
color: var(--studio-accent, var(--semi-color-primary));
|
||||
color: var(--studio-accent, var(--ui-color-primary));
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.08em;
|
||||
@@ -690,10 +688,10 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.wf-tpl:hover {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 4%,
|
||||
var(--ui-color-primary) 4%,
|
||||
var(--surface-card)
|
||||
);
|
||||
transform: translateY(-1px);
|
||||
@@ -714,8 +712,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 10%, transparent);
|
||||
color: var(--semi-color-primary);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.wf-tpl-title {
|
||||
@@ -748,7 +746,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
.wf-tpl:focus-visible {
|
||||
outline: 2px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -819,14 +817,14 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.wf-api-toggle:hover {
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 5%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 5%, transparent);
|
||||
}
|
||||
|
||||
.wf-api-toggle:focus-visible,
|
||||
.wf-api-tab:focus-visible,
|
||||
.wf-api-code:focus-visible {
|
||||
outline: 2px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -838,8 +836,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
.wf-api-badge {
|
||||
padding: 1px 8px;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--semi-color-success) 12%, transparent);
|
||||
color: var(--semi-color-success);
|
||||
background: color-mix(in srgb, var(--ui-color-success) 12%, transparent);
|
||||
color: var(--ui-color-success);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -930,10 +928,9 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
padding: 10px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 25%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||||
border-radius: 14px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 4%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 4%, transparent);
|
||||
}
|
||||
|
||||
.wf-batch-head {
|
||||
@@ -955,7 +952,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
/* ---------- 慢任务提示(WP C-4) ---------- */
|
||||
.wf-slow {
|
||||
max-width: 92%;
|
||||
color: var(--wf-warning, var(--semi-color-warning));
|
||||
color: var(--wf-warning, var(--ui-color-warning));
|
||||
font-size: 11px;
|
||||
line-height: 1.4;
|
||||
text-align: center;
|
||||
|
||||
@@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import { Modal } from '@douyinfe/semi-ui';
|
||||
import { Modal } from '@/components/ui';
|
||||
import { formatQuoteAmount } from '../../hooks/creation/useCreationQuote';
|
||||
|
||||
/**
|
||||
|
||||
@@ -28,7 +28,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
|
||||
.cs-mode-chip {
|
||||
font-weight: 600;
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 35%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 35%, transparent);
|
||||
color: var(--studio-accent);
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
}
|
||||
|
||||
.cs-slot.is-missing {
|
||||
border-color: var(--semi-color-warning);
|
||||
border-color: var(--ui-color-warning);
|
||||
box-shadow: 0 0 0 2px
|
||||
color-mix(in srgb, var(--semi-color-warning) 25%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-warning) 25%, transparent);
|
||||
}
|
||||
|
||||
.cs-slot-move {
|
||||
@@ -84,12 +84,11 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 8px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 25%, transparent);
|
||||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||||
border-radius: 12px;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 5%,
|
||||
var(--ui-color-primary) 5%,
|
||||
var(--surface-card)
|
||||
);
|
||||
font-size: 12px;
|
||||
@@ -103,7 +102,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: var(--semi-color-warning);
|
||||
color: var(--ui-color-warning);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -126,7 +125,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
border: 1px dashed
|
||||
color-mix(in srgb, var(--semi-color-primary) 40%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 40%, transparent);
|
||||
border-radius: 8px;
|
||||
background: var(--studio-tint);
|
||||
color: var(--studio-accent);
|
||||
@@ -151,6 +150,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
/* ---------- 弹层 ---------- */
|
||||
.cs-popover {
|
||||
max-width: min(420px, calc(100vw - 32px));
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.cs-pop-body {
|
||||
@@ -202,8 +202,8 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
}
|
||||
|
||||
.cs-template:hover {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 5%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 5%, transparent);
|
||||
}
|
||||
|
||||
.cs-template-icon {
|
||||
@@ -214,8 +214,8 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 10%, transparent);
|
||||
color: var(--semi-color-primary);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.cs-template-main {
|
||||
@@ -242,7 +242,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
.cs-pop-body button:focus-visible,
|
||||
.cs-template:focus-visible {
|
||||
outline: 2px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
position: absolute;
|
||||
z-index: 20;
|
||||
inset: 0;
|
||||
background: var(--semi-color-overlay-bg);
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
opacity: 0.35;
|
||||
}
|
||||
|
||||
@@ -415,7 +415,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--studio-line);
|
||||
border-radius: 12px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 4%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 4%, transparent);
|
||||
color: var(--studio-ink);
|
||||
font-size: 12px;
|
||||
}
|
||||
@@ -426,21 +426,21 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
}
|
||||
|
||||
.cs-alert.is-warn {
|
||||
border-color: color-mix(in srgb, var(--semi-color-warning) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 6%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-warning) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 6%, transparent);
|
||||
}
|
||||
|
||||
.cs-alert.is-warn > svg {
|
||||
color: var(--semi-color-warning);
|
||||
color: var(--ui-color-warning);
|
||||
}
|
||||
|
||||
.cs-alert.is-error {
|
||||
border-color: color-mix(in srgb, var(--semi-color-danger) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--semi-color-danger) 6%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-danger) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-danger) 6%, transparent);
|
||||
}
|
||||
|
||||
.cs-alert.is-error > svg {
|
||||
color: var(--semi-color-danger);
|
||||
color: var(--ui-color-danger);
|
||||
}
|
||||
|
||||
.cs-alert-text {
|
||||
@@ -468,9 +468,9 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
|
||||
/* 内容审核指明的触发图片 */
|
||||
.cs-slot.is-flagged {
|
||||
border-color: var(--semi-color-danger);
|
||||
border-color: var(--ui-color-danger);
|
||||
box-shadow: 0 0 0 2px
|
||||
color-mix(in srgb, var(--semi-color-danger) 25%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-danger) 25%, transparent);
|
||||
}
|
||||
|
||||
/* 底部抽屉内容让出 iOS / 微信 H5 底部安全区 */
|
||||
@@ -497,7 +497,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 999px;
|
||||
background: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* ---------- 对比生成提交前摘要(WP C-2):Modal 在 portal 中,直接用语义 token ---------- */
|
||||
@@ -557,7 +557,7 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
|
||||
.cs-summary-note {
|
||||
grid-column: 1 / -1;
|
||||
color: var(--semi-color-warning);
|
||||
color: var(--ui-color-warning);
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
@@ -575,8 +575,8 @@ body.cs-dock-expanded .exp-mobile-bottom-nav {
|
||||
gap: 6px;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 12%, transparent);
|
||||
color: var(--semi-color-warning);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 12%, transparent);
|
||||
color: var(--ui-color-warning);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
--studio-ink: var(--text-primary);
|
||||
--studio-muted: var(--text-secondary);
|
||||
--studio-line: var(--border-subtle);
|
||||
--studio-accent: var(--semi-color-primary);
|
||||
--studio-tint: color-mix(in srgb, var(--semi-color-primary) 10%, transparent);
|
||||
--studio-accent: var(--ui-color-primary);
|
||||
--studio-tint: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||||
--studio-card: color-mix(in srgb, var(--surface-card) 92%, transparent);
|
||||
--studio-ring: color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
--studio-danger: var(--semi-color-danger);
|
||||
--studio-ring: color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
--studio-danger: var(--ui-color-danger);
|
||||
--studio-dur: var(--motion-fast, 150ms);
|
||||
|
||||
/* 创作台展开态(absolute)与遮罩以外壳为定位参照 */
|
||||
@@ -161,7 +161,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
}
|
||||
|
||||
.cs-chip:hover:not(:disabled) {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 45%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||||
}
|
||||
|
||||
.cs-chip.is-active {
|
||||
@@ -316,8 +316,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 999px;
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 14%, transparent);
|
||||
color: var(--semi-color-primary);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 14%, transparent);
|
||||
color: var(--ui-color-primary);
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
@@ -338,8 +338,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
height: 16px;
|
||||
padding: 0 4px;
|
||||
border-radius: 999px;
|
||||
background: var(--semi-color-danger);
|
||||
color: var(--semi-color-white, var(--surface-card));
|
||||
background: var(--ui-color-danger);
|
||||
color: var(--ui-color-white);
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
font-variant-numeric: tabular-nums;
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useRef, useState } from 'react';
|
||||
import { Spin, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Spin, Tooltip } from '@/components/ui';
|
||||
import { ImagePlus, RotateCcw, X } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import './creation-params.css';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useRef } from 'react';
|
||||
import { Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Tooltip } from '@/components/ui';
|
||||
import { optionKey, optionValue } from './constraints';
|
||||
import './creation-params.css';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
import { Select, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Select, Tooltip } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { optionKey, optionValue } from './constraints';
|
||||
import { optionLabel, paramLabel } from './labels';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Slider, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Slider, Tooltip } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { paramLabel } from './labels';
|
||||
import './creation-params.css';
|
||||
@@ -43,7 +43,7 @@ const ParamSlider = ({ param, value, onChange, disabledReason }) => {
|
||||
value={v}
|
||||
disabled={Boolean(disabledReason)}
|
||||
onChange={(n) => onChange && onChange(n)}
|
||||
tipFormatter={(n) => `${n}${unit}`}
|
||||
tooltip={{ formatter: (n) => `${n}${unit}` }}
|
||||
aria-label={paramLabel(t, param)}
|
||||
/>
|
||||
<span className='cp-slider-value tabular-nums'>{`${v}${unit}`}</span>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Switch, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Switch, Tooltip } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { paramLabel } from './labels';
|
||||
import './creation-params.css';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { TextArea, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { TextArea, Tooltip } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { paramLabel } from './labels';
|
||||
import './creation-params.css';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useRef } from 'react';
|
||||
import { InputNumber, Switch, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { InputNumber, Switch, Tooltip } from '@/components/ui';
|
||||
import { Dices } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { paramLabel } from './labels';
|
||||
|
||||
@@ -14,31 +14,31 @@
|
||||
--cp-muted: var(--text-secondary);
|
||||
--cp-line: var(--border-subtle);
|
||||
--cp-surface: var(--surface-card);
|
||||
--cp-accent: var(--semi-color-primary);
|
||||
--cp-accent: var(--ui-color-primary);
|
||||
--cp-accent-tint: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 10%,
|
||||
var(--ui-color-primary) 10%,
|
||||
transparent
|
||||
);
|
||||
--cp-accent-line: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 45%,
|
||||
var(--ui-color-primary) 45%,
|
||||
transparent
|
||||
);
|
||||
--cp-fill: color-mix(in srgb, var(--text-primary) 4%, var(--surface-card));
|
||||
--cp-fill-hover: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 6%,
|
||||
var(--ui-color-primary) 6%,
|
||||
var(--surface-card)
|
||||
);
|
||||
--cp-danger: var(--semi-color-danger);
|
||||
--cp-danger: var(--ui-color-danger);
|
||||
--cp-danger-tint: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-danger) 10%,
|
||||
var(--ui-color-danger) 10%,
|
||||
var(--surface-card)
|
||||
);
|
||||
--cp-warning: var(--semi-color-warning);
|
||||
--cp-ring: color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
--cp-warning: var(--ui-color-warning);
|
||||
--cp-ring: color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||||
--cp-overlay: color-mix(in srgb, var(--surface-card) 78%, transparent);
|
||||
--cp-dur: var(--motion-fast, 150ms);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
// 「内容管理」「版本说明」root 和被下放了「WeyAi」页签的管理员都能用。
|
||||
|
||||
import React, { useEffect, useMemo } from 'react';
|
||||
import { Empty, TabPane, Tabs } from '@douyinfe/semi-ui';
|
||||
import { Empty, TabPane, Tabs } from '@/components/ui';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { isAdmin, isRoot } from '../../helpers';
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
HelpCircle,
|
||||
Home,
|
||||
} from 'lucide-react';
|
||||
import { Button } from '@douyinfe/semi-ui';
|
||||
import { Button } from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { UserContext } from '../../context/User';
|
||||
import Loading from '../../components/common/ui/Loading';
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
Tag,
|
||||
TagInput,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import SettingsWeyAiContentEditor from './SettingsWeyAiContentEditor';
|
||||
|
||||
@@ -25,7 +25,7 @@ import React, { useEffect, useState } from 'react';
|
||||
import {
|
||||
Banner,
|
||||
Button,
|
||||
CheckboxGroup,
|
||||
Checkbox,
|
||||
DatePicker,
|
||||
Input,
|
||||
InputNumber,
|
||||
@@ -40,7 +40,7 @@ import {
|
||||
TextArea,
|
||||
Typography,
|
||||
Upload,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import { formatBytes, uploadContentFile } from './contentUpload';
|
||||
@@ -116,7 +116,7 @@ const FieldControl = ({ field, value, onChange, t }) => {
|
||||
value={value || []}
|
||||
onChange={(list) => onChange(list.length ? list : undefined)}
|
||||
maxLength={field.max_len || undefined}
|
||||
max={field.max_items || undefined}
|
||||
maxCount={field.max_items || undefined}
|
||||
placeholder={t('回车添加')}
|
||||
/>
|
||||
);
|
||||
@@ -366,7 +366,7 @@ const SettingsWeyAiContentEditor = ({
|
||||
key={role.key}
|
||||
className='mb-4 p-3'
|
||||
style={{
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: 8,
|
||||
}}
|
||||
>
|
||||
@@ -448,8 +448,7 @@ const SettingsWeyAiContentEditor = ({
|
||||
{t('适用端')}
|
||||
<Text type='danger'> *</Text>
|
||||
</Text>
|
||||
<CheckboxGroup
|
||||
direction='horizontal'
|
||||
<Checkbox.Group
|
||||
value={form.platforms}
|
||||
onChange={(v) => set('platforms', v)}
|
||||
options={slot.platforms.map((p) => ({ value: p, label: p }))}
|
||||
@@ -481,7 +480,7 @@ const SettingsWeyAiContentEditor = ({
|
||||
<DatePicker
|
||||
type='dateTime'
|
||||
value={toDate(form.start_at)}
|
||||
onChange={(d) => set('start_at', toSec(d))}
|
||||
onChange={(_, d) => set('start_at', toSec(d))}
|
||||
placeholder={t('不限')}
|
||||
/>
|
||||
</div>
|
||||
@@ -490,7 +489,7 @@ const SettingsWeyAiContentEditor = ({
|
||||
<DatePicker
|
||||
type='dateTime'
|
||||
value={toDate(form.end_at)}
|
||||
onChange={(d) => set('end_at', toSec(d))}
|
||||
onChange={(_, d) => set('end_at', toSec(d))}
|
||||
placeholder={t('不限')}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
Spin,
|
||||
Switch,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import {
|
||||
Tag,
|
||||
TextArea,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../../helpers';
|
||||
import MarkdownRenderer from '../../../components/common/markdown/MarkdownRenderer';
|
||||
@@ -299,7 +299,7 @@ const SettingsWeyAiReleaseNotes = () => {
|
||||
? new Date(draft.released_at * 1000)
|
||||
: undefined
|
||||
}
|
||||
onChange={(date) =>
|
||||
onChange={(_, date) =>
|
||||
setDraft({
|
||||
...draft,
|
||||
// Local noon: the same calendar day in every time zone within ±12 h.
|
||||
@@ -340,7 +340,7 @@ const SettingsWeyAiReleaseNotes = () => {
|
||||
className='mt-2 p-3 rounded'
|
||||
style={{
|
||||
minHeight: 200,
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
}}
|
||||
>
|
||||
{draft.content.trim() ? (
|
||||
|
||||
Reference in New Issue
Block a user