feat: 参考原型图 ui优化提交 个人端-用户中心 相关的页面
This commit is contained in:
@@ -21,7 +21,7 @@ import React, { useContext, useEffect, useState } from 'react';
|
||||
import { API, getSystemName, showError } from '../../helpers';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { marked } from 'marked';
|
||||
import { Empty } from '@douyinfe/semi-ui';
|
||||
import { Empty } from '@/components/ui';
|
||||
import {
|
||||
IllustrationConstruction,
|
||||
IllustrationConstructionDark,
|
||||
@@ -73,7 +73,7 @@ const About = () => {
|
||||
href={officialWebsite}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='!text-semi-color-primary'
|
||||
className='!text-ui-color-primary'
|
||||
>
|
||||
{officialWebsite}
|
||||
</a>
|
||||
@@ -85,7 +85,7 @@ const About = () => {
|
||||
href={officialWebsite}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
className='!text-semi-color-primary'
|
||||
className='!text-ui-color-primary'
|
||||
>
|
||||
{systemName}
|
||||
</a>
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
TextArea,
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Receipt, Search, Eye, Check, X, RotateCw, Ban } from 'lucide-react';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
import {
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Card, Input, Tag, Typography } from '@douyinfe/semi-ui';
|
||||
import { Card, Input, Tag, Typography } from '@/components/ui';
|
||||
import { CalendarDays, Globe } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -61,7 +61,7 @@ export default function AdminMenuPreview({ type }) {
|
||||
<div className='overflow-x-auto'>
|
||||
<table className='w-full min-w-[560px] text-left text-sm'>
|
||||
<thead>
|
||||
<tr className='border-b border-[var(--semi-color-border)]'>
|
||||
<tr className='border-b border-[var(--ui-color-border)]'>
|
||||
{['联系人', '企业名称', '演示需求', '状态'].map((label) => (
|
||||
<th key={label} className='px-3 py-3 font-medium'>
|
||||
{t(label)}
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Toast,
|
||||
DatePicker,
|
||||
InputNumber,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
TimePicker,
|
||||
Collapse,
|
||||
Toast,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ import {
|
||||
Select,
|
||||
Switch,
|
||||
Radio,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, isAdmin, isRoot } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
|
||||
@@ -26,7 +26,7 @@ import React, {
|
||||
useMemo,
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { initVChartSemiTheme } from '@visactor/vchart-semi-theme';
|
||||
import { initVChartTheme } from '@/components/ui/chartTheme';
|
||||
import {
|
||||
Button,
|
||||
Spin,
|
||||
@@ -35,8 +35,8 @@ import {
|
||||
Collapsible,
|
||||
Tabs,
|
||||
TabPane,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconRefresh } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconRefresh } from '@/components/ui/icons';
|
||||
import {
|
||||
BarChart2,
|
||||
Users,
|
||||
@@ -142,7 +142,7 @@ const Analytics = () => {
|
||||
|
||||
// 初始化 VChart Semi 主题(深色模式适配)
|
||||
useEffect(() => {
|
||||
initVChartSemiTheme({
|
||||
initVChartTheme({
|
||||
isWatchingThemeSwitch: true,
|
||||
});
|
||||
}, []);
|
||||
|
||||
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import React from 'react';
|
||||
import { useTokenKeys } from '../../hooks/chat/useTokenKeys';
|
||||
import { Spin } from '@douyinfe/semi-ui';
|
||||
import { Spin } from '@/components/ui';
|
||||
import { useParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -71,7 +71,7 @@ const ChatPage = () => {
|
||||
<Spin size='large' spinning={true} tip={null} />
|
||||
<span
|
||||
className='whitespace-nowrap mt-2 text-center'
|
||||
style={{ color: 'var(--semi-color-primary)' }}
|
||||
style={{ color: 'var(--ui-color-primary)' }}
|
||||
>
|
||||
{t('正在跳转...')}
|
||||
</span>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Avatar, Radio, RadioGroup, Typography } from '@douyinfe/semi-ui';
|
||||
import { Avatar, Radio, RadioGroup, Typography } from '@/components/ui';
|
||||
import { Building2, User } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { optionKey } from './authorizeParams';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
--ho-muted: var(--text-secondary);
|
||||
--ho-line: var(--border-subtle);
|
||||
--ho-card: var(--surface-card);
|
||||
/* 主色只取品牌 token:--semi-color-primary 要等 /api/status 回来由
|
||||
/* 主色只取品牌 token:--ui-color-primary 要等 /api/status 回来由
|
||||
helpers/theme.js 注入,首次访问(OAuth 从 WeyAi 拉起的新会话正是这种)
|
||||
在那之前是 Semi 默认蓝,与 --brand-primary-rgb 派生的环/光晕会是两种蓝。
|
||||
两个变量同批注入、同源,注入前后都一致 */
|
||||
|
||||
@@ -33,7 +33,7 @@ import React, {
|
||||
} from 'react';
|
||||
import { useLocation, useNavigate, useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Banner, Button, Typography } from '@douyinfe/semi-ui';
|
||||
import { Banner, Button, Typography } from '@/components/ui';
|
||||
import { Monitor } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { clearUserData, getLogo } from '../../helpers';
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
.cloud-brain-shell {
|
||||
--brain-ink: var(--text-primary);
|
||||
--brain-muted: var(--text-secondary);
|
||||
--brain-sage: var(--semi-color-primary);
|
||||
--brain-sage: var(--ui-color-primary);
|
||||
--brain-sage-soft: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 10%,
|
||||
var(--ui-color-primary) 10%,
|
||||
transparent
|
||||
);
|
||||
--brain-coral: var(--semi-color-warning);
|
||||
--brain-coral: var(--ui-color-warning);
|
||||
--brain-paper: var(--surface-card);
|
||||
position: relative;
|
||||
height: 100%;
|
||||
@@ -68,10 +68,10 @@
|
||||
height: 19px;
|
||||
padding: 0 7px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-warning) 40%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-warning) 40%, transparent);
|
||||
border-radius: 999px;
|
||||
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:
|
||||
800 10px/1 ui-monospace,
|
||||
SFMono-Regular,
|
||||
@@ -101,7 +101,7 @@
|
||||
padding: 7px 16px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 10px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-hero-side {
|
||||
display: flex;
|
||||
@@ -159,15 +159,15 @@
|
||||
color: #fff;
|
||||
background: var(--brain-sage);
|
||||
box-shadow: 0 2px 8px
|
||||
color-mix(in srgb, var(--semi-color-primary) 25%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||||
}
|
||||
.brain-live-dot {
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--semi-color-warning);
|
||||
background: var(--ui-color-warning);
|
||||
box-shadow: 0 0 0 4px
|
||||
color-mix(in srgb, var(--semi-color-warning) 18%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-warning) 18%, transparent);
|
||||
}
|
||||
.brain-loading {
|
||||
min-height: 280px;
|
||||
@@ -198,15 +198,15 @@
|
||||
width: 7px;
|
||||
height: 7px;
|
||||
border-radius: 50%;
|
||||
background: var(--semi-color-warning);
|
||||
background: var(--ui-color-warning);
|
||||
content: '';
|
||||
}
|
||||
.brain-stream-state--connected::before {
|
||||
background: var(--semi-color-success);
|
||||
background: var(--ui-color-success);
|
||||
}
|
||||
.brain-stream-state--reconnecting::before {
|
||||
animation: brain-pulse 1.2s ease-in-out infinite;
|
||||
background: var(--semi-color-danger);
|
||||
background: var(--ui-color-danger);
|
||||
}
|
||||
|
||||
/* 治理面板铺满内容区(云控制台惯例),专家清单用自适应多列消化宽屏空间 */
|
||||
@@ -262,13 +262,9 @@
|
||||
align-items: center;
|
||||
padding: 16px;
|
||||
margin-bottom: 14px;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
border-radius: 12px;
|
||||
background: color-mix(in srgb, var(--brain-sage) 6%, var(--semi-color-bg-1));
|
||||
}
|
||||
|
||||
.brain-admin-scope .semi-select {
|
||||
min-width: 200px;
|
||||
background: color-mix(in srgb, var(--brain-sage) 6%, var(--ui-color-bg-1));
|
||||
}
|
||||
|
||||
.brain-admin-scope > div:first-child {
|
||||
@@ -285,7 +281,7 @@
|
||||
}
|
||||
|
||||
.brain-admin-scope > div:first-child strong {
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
/* 残留分发规则:主体已删除/停用的规则在范围选择器里不可见,这里单列出来供清理 */
|
||||
@@ -294,9 +290,9 @@
|
||||
gap: 8px;
|
||||
margin-top: 14px;
|
||||
padding: 14px 16px;
|
||||
border: 1px solid var(--semi-color-warning-light-active);
|
||||
border: 1px solid var(--ui-color-warning-light-active);
|
||||
border-radius: 12px;
|
||||
background: var(--semi-color-warning-light-default);
|
||||
background: var(--ui-color-warning-light-default);
|
||||
}
|
||||
|
||||
.brain-admin-residual-head {
|
||||
@@ -305,11 +301,11 @@
|
||||
}
|
||||
|
||||
.brain-admin-residual-head strong {
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.brain-admin-residual-head span {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -320,17 +316,17 @@
|
||||
align-items: center;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
}
|
||||
|
||||
.brain-admin-residual-scope {
|
||||
font-weight: 600;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.brain-admin-residual-expert {
|
||||
flex: 1 1 200px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
@@ -342,18 +338,18 @@
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--brain-sage) 7%,
|
||||
var(--semi-color-fill-0)
|
||||
var(--ui-color-fill-0)
|
||||
);
|
||||
}
|
||||
|
||||
.brain-project-field label {
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.brain-project-field small {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
line-height: 1.5;
|
||||
}
|
||||
.brain-admin-grid article {
|
||||
@@ -364,11 +360,11 @@
|
||||
padding: 16px 18px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
transition: border-color 0.2s ease;
|
||||
}
|
||||
.brain-admin-grid article: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);
|
||||
}
|
||||
.brain-admin-grid article > div:first-child {
|
||||
min-width: 0;
|
||||
@@ -390,14 +386,14 @@
|
||||
gap: 8px;
|
||||
}
|
||||
.brain-admin-toggle span {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.brain-admin-toggle.is-on span {
|
||||
/* 向正文色混合:亮色下压深、暗色下提亮,12px 小字对比才够 */
|
||||
color: color-mix(in srgb, var(--semi-color-success) 72%, var(--text-primary));
|
||||
color: color-mix(in srgb, var(--ui-color-success) 72%, var(--text-primary));
|
||||
}
|
||||
|
||||
.brain-confirm-card {
|
||||
@@ -406,12 +402,12 @@
|
||||
margin: 18px 0;
|
||||
padding: 20px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-danger) 40%, transparent);
|
||||
border-left: 4px solid var(--semi-color-danger);
|
||||
color-mix(in srgb, var(--ui-color-danger) 40%, transparent);
|
||||
border-left: 4px solid var(--ui-color-danger);
|
||||
border-radius: 12px;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-danger) 5%,
|
||||
var(--ui-color-danger) 5%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
@@ -419,7 +415,7 @@
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
color: var(--semi-color-danger);
|
||||
color: var(--ui-color-danger);
|
||||
}
|
||||
.brain-confirm-heading > div {
|
||||
display: grid;
|
||||
@@ -444,7 +440,7 @@
|
||||
}
|
||||
.brain-confirm-card details {
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-danger) 16%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-danger) 16%, transparent);
|
||||
border-radius: 10px;
|
||||
background: var(--surface-card);
|
||||
}
|
||||
@@ -459,7 +455,7 @@
|
||||
padding: 13px;
|
||||
overflow: auto;
|
||||
border-top: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-danger) 12%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-danger) 12%, transparent);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -490,7 +486,7 @@
|
||||
gap: 11px;
|
||||
padding: 10px 12px;
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-tool-timeline article div {
|
||||
display: grid;
|
||||
@@ -503,20 +499,20 @@
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--semi-color-warning);
|
||||
background: var(--ui-color-warning);
|
||||
box-shadow: 0 0 0 4px
|
||||
color-mix(in srgb, var(--semi-color-warning) 14%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-warning) 14%, transparent);
|
||||
}
|
||||
.brain-tool-state--succeeded {
|
||||
background: var(--semi-color-success);
|
||||
background: var(--ui-color-success);
|
||||
box-shadow: 0 0 0 4px
|
||||
color-mix(in srgb, var(--semi-color-success) 14%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-success) 14%, transparent);
|
||||
}
|
||||
.brain-tool-state--failed,
|
||||
.brain-tool-state--ambiguous {
|
||||
background: var(--semi-color-danger);
|
||||
background: var(--ui-color-danger);
|
||||
box-shadow: 0 0 0 4px
|
||||
color-mix(in srgb, var(--semi-color-danger) 14%, transparent);
|
||||
color-mix(in srgb, var(--ui-color-danger) 14%, transparent);
|
||||
}
|
||||
|
||||
.brain-expert-layout,
|
||||
@@ -571,7 +567,7 @@
|
||||
.brain-expert-card:hover,
|
||||
.brain-expert-card.is-selected {
|
||||
transform: translateY(-2px);
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 40%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 40%, transparent);
|
||||
box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
|
||||
}
|
||||
.brain-card-topline {
|
||||
@@ -587,12 +583,12 @@
|
||||
border-radius: 10px;
|
||||
}
|
||||
.brain-expert-icon.is-sage {
|
||||
color: var(--semi-color-primary);
|
||||
background: color-mix(in srgb, var(--semi-color-primary) 12%, transparent);
|
||||
color: var(--ui-color-primary);
|
||||
background: color-mix(in srgb, var(--ui-color-primary) 12%, transparent);
|
||||
}
|
||||
.brain-expert-icon.is-coral {
|
||||
color: var(--semi-color-warning);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 14%, transparent);
|
||||
color: var(--ui-color-warning);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 14%, transparent);
|
||||
}
|
||||
.brain-expert-card h2 {
|
||||
margin: 16px 0 8px;
|
||||
@@ -610,7 +606,7 @@
|
||||
padding: 11px 13px;
|
||||
border-left: 3px solid var(--brain-coral);
|
||||
border-radius: 0 8px 8px 0;
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 8%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 8%, transparent);
|
||||
color: var(--text-secondary);
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
@@ -634,10 +630,10 @@
|
||||
gap: 5px;
|
||||
padding: 5px 8px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--brain-sage) 24%, var(--semi-color-border));
|
||||
color-mix(in srgb, var(--brain-sage) 24%, var(--ui-color-border));
|
||||
border-radius: 999px;
|
||||
color: var(--semi-color-text-1);
|
||||
background: color-mix(in srgb, var(--brain-sage) 6%, var(--semi-color-bg-1));
|
||||
color: var(--ui-color-text-1);
|
||||
background: color-mix(in srgb, var(--brain-sage) 6%, var(--ui-color-bg-1));
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -655,7 +651,7 @@
|
||||
}
|
||||
|
||||
.brain-detail-skills > span {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
}
|
||||
@@ -672,7 +668,7 @@
|
||||
padding: 5px 8px;
|
||||
border-radius: 6px;
|
||||
background: var(--brain-sage-soft);
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
font-size: 11px;
|
||||
}
|
||||
/* 卡片高度随技能标签行数变化,绝对定位会压在标签行上(用户反馈:
|
||||
@@ -811,7 +807,7 @@
|
||||
}
|
||||
|
||||
.brain-attachments > small {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
@@ -819,10 +815,10 @@
|
||||
align-items: center;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-success-light-default) 55%,
|
||||
var(--ui-color-success-light-default) 55%,
|
||||
transparent
|
||||
);
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
border-radius: 10px;
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
@@ -837,7 +833,7 @@
|
||||
}
|
||||
|
||||
.brain-attachment-chip em {
|
||||
color: var(--semi-color-success);
|
||||
color: var(--ui-color-success);
|
||||
font-size: 12px;
|
||||
font-style: normal;
|
||||
}
|
||||
@@ -846,7 +842,7 @@
|
||||
align-items: center;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
cursor: pointer;
|
||||
display: inline-flex;
|
||||
/* 内含 size=14 图标,padding:2px 时命中区仅 18x18;这是移除误传附件的唯一入口,
|
||||
@@ -856,10 +852,6 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.brain-composer .semi-input-textarea-wrapper {
|
||||
border-radius: 10px;
|
||||
background: var(--semi-color-fill-0);
|
||||
}
|
||||
.brain-privacy-note {
|
||||
display: flex;
|
||||
gap: 7px;
|
||||
@@ -945,7 +937,7 @@
|
||||
border: 1px solid transparent;
|
||||
border-radius: 10px;
|
||||
color: inherit;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
text-align: left;
|
||||
cursor: pointer;
|
||||
transition: 0.2s ease;
|
||||
@@ -953,15 +945,15 @@
|
||||
.brain-run-item:hover {
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 6%,
|
||||
var(--ui-color-primary) 6%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
.brain-run-item.is-selected {
|
||||
border-color: color-mix(in srgb, var(--semi-color-primary) 30%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-primary) 30%, transparent);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 8%,
|
||||
var(--ui-color-primary) 8%,
|
||||
var(--surface-card)
|
||||
);
|
||||
box-shadow: inset 3px 0 var(--brain-sage);
|
||||
@@ -988,7 +980,7 @@
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.brain-run-item time {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 10px;
|
||||
}
|
||||
.brain-status {
|
||||
@@ -1002,28 +994,28 @@
|
||||
font-weight: 700;
|
||||
}
|
||||
.brain-status--amber {
|
||||
color: var(--semi-color-warning);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 14%, transparent);
|
||||
color: var(--ui-color-warning);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 14%, transparent);
|
||||
}
|
||||
.brain-status--blue {
|
||||
color: var(--semi-color-info, var(--semi-color-primary));
|
||||
color: var(--ui-color-info, var(--ui-color-primary));
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-info, var(--semi-color-primary)) 12%,
|
||||
var(--ui-color-info, var(--ui-color-primary)) 12%,
|
||||
transparent
|
||||
);
|
||||
}
|
||||
.brain-status--green {
|
||||
color: var(--semi-color-success);
|
||||
background: color-mix(in srgb, var(--semi-color-success) 14%, transparent);
|
||||
color: var(--ui-color-success);
|
||||
background: color-mix(in srgb, var(--ui-color-success) 14%, transparent);
|
||||
}
|
||||
.brain-status--red {
|
||||
color: var(--semi-color-danger);
|
||||
background: color-mix(in srgb, var(--semi-color-danger) 12%, transparent);
|
||||
color: var(--ui-color-danger);
|
||||
background: color-mix(in srgb, var(--ui-color-danger) 12%, transparent);
|
||||
}
|
||||
.brain-status--grey {
|
||||
color: var(--semi-color-text-2);
|
||||
background: var(--semi-color-fill-1);
|
||||
color: var(--ui-color-text-2);
|
||||
background: var(--ui-color-fill-1);
|
||||
}
|
||||
.brain-spin {
|
||||
animation: brain-spin 1.4s linear infinite;
|
||||
@@ -1073,7 +1065,7 @@
|
||||
padding: 16px 18px;
|
||||
}
|
||||
.brain-source-card {
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
|
||||
.brain-revision-card {
|
||||
@@ -1081,11 +1073,11 @@
|
||||
gap: 16px;
|
||||
padding: 20px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--brain-coral) 32%, var(--semi-color-border));
|
||||
color-mix(in srgb, var(--brain-coral) 32%, var(--ui-color-border));
|
||||
border-radius: 12px;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-warning) 5%,
|
||||
var(--ui-color-warning) 5%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
@@ -1104,14 +1096,14 @@
|
||||
}
|
||||
|
||||
.brain-revision-card > div:first-child > strong {
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.brain-revision-card > div:first-child > p {
|
||||
margin: 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
line-height: 1.65;
|
||||
}
|
||||
|
||||
@@ -1142,7 +1134,7 @@
|
||||
overflow: hidden;
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-warning) 8%,
|
||||
var(--ui-color-warning) 8%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
@@ -1152,8 +1144,8 @@
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 10px;
|
||||
color: var(--semi-color-warning);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 16%, transparent);
|
||||
color: var(--ui-color-warning);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 16%, transparent);
|
||||
}
|
||||
.brain-progress-card strong {
|
||||
font-size: 13px;
|
||||
@@ -1175,10 +1167,10 @@
|
||||
.brain-error-card {
|
||||
display: flex;
|
||||
gap: 11px;
|
||||
color: var(--semi-color-danger);
|
||||
color: var(--ui-color-danger);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-danger) 8%,
|
||||
var(--ui-color-danger) 8%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
@@ -1187,17 +1179,17 @@
|
||||
font-size: 12px;
|
||||
}
|
||||
.brain-error-reason {
|
||||
color: var(--semi-color-text-1);
|
||||
color: var(--ui-color-text-1);
|
||||
word-break: break-word;
|
||||
}
|
||||
.brain-error-detail {
|
||||
margin-top: 8px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 11px;
|
||||
}
|
||||
.brain-error-detail summary {
|
||||
cursor: pointer;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
.brain-error-copy {
|
||||
margin-top: 10px;
|
||||
@@ -1208,8 +1200,8 @@
|
||||
overflow: auto;
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
color: var(--semi-color-text-1);
|
||||
background: var(--ui-color-fill-0);
|
||||
color: var(--ui-color-text-1);
|
||||
font-size: 11px;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
@@ -1227,7 +1219,7 @@
|
||||
align-items: center;
|
||||
padding: 12px 18px;
|
||||
color: var(--brain-sage);
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
font-size: 11px;
|
||||
font-weight: 750;
|
||||
text-transform: uppercase;
|
||||
@@ -1252,7 +1244,7 @@
|
||||
.brain-markdown code {
|
||||
border-radius: 5px;
|
||||
padding: 2px 5px;
|
||||
background: var(--semi-color-fill-1);
|
||||
background: var(--ui-color-fill-1);
|
||||
}
|
||||
.brain-artifact-file {
|
||||
display: flex;
|
||||
@@ -1321,7 +1313,7 @@
|
||||
padding: 12px 15px;
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: 12px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-admin-metrics span {
|
||||
color: var(--brain-muted);
|
||||
@@ -1346,7 +1338,7 @@
|
||||
gap: 10px;
|
||||
padding: 12px 16px;
|
||||
color: var(--brain-sage);
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-citations-heading div {
|
||||
display: flex;
|
||||
@@ -1402,7 +1394,7 @@
|
||||
padding: 10px 12px;
|
||||
border-left: 2px solid transparent;
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.brain-step > div {
|
||||
display: grid;
|
||||
@@ -1429,8 +1421,8 @@
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background: var(--semi-color-fill-1);
|
||||
color: var(--semi-color-text-2);
|
||||
background: var(--ui-color-fill-1);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 11px;
|
||||
font-weight: 650;
|
||||
}
|
||||
@@ -1443,18 +1435,18 @@
|
||||
color: var(--brain-sage);
|
||||
}
|
||||
.brain-step--failed {
|
||||
border-left-color: var(--semi-color-danger);
|
||||
border-left-color: var(--ui-color-danger);
|
||||
background: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-danger) 7%,
|
||||
var(--ui-color-danger) 7%,
|
||||
var(--surface-card)
|
||||
);
|
||||
}
|
||||
.brain-step--failed code {
|
||||
color: var(--semi-color-danger);
|
||||
color: var(--ui-color-danger);
|
||||
}
|
||||
.brain-step--pending code {
|
||||
color: var(--semi-color-warning);
|
||||
color: var(--ui-color-warning);
|
||||
}
|
||||
|
||||
.brain-progress-step {
|
||||
@@ -1490,7 +1482,7 @@
|
||||
}
|
||||
.brain-timeline-summary {
|
||||
display: block;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 11px;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -1582,9 +1574,6 @@
|
||||
.brain-admin-metrics {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.brain-admin-scope .semi-select {
|
||||
width: 100%;
|
||||
}
|
||||
.cloud-brain-shell {
|
||||
padding: 20px 14px 84px;
|
||||
}
|
||||
@@ -1636,10 +1625,8 @@
|
||||
overflow-x: auto;
|
||||
}
|
||||
}
|
||||
/* 键盘可达性:页面自绘按钮统一 focus 环。Semi 按钮有自己的焦点样式,
|
||||
排除以免双环叠加;全强度主色保证浅色主题下对比达标 */
|
||||
.cloud-brain-shell button:not([class*='semi-']):focus-visible {
|
||||
outline: 2px solid var(--semi-color-primary);
|
||||
.cloud-brain-shell button:not([class*='ant-']):focus-visible {
|
||||
outline: 2px solid var(--ui-color-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@@ -1668,10 +1655,6 @@
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brain-time-confirm-form .semi-textarea-wrapper {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
/* 个人技能勾选器(方案 §2.3)。仅个人云脑出现:企业侧技能由后端按分发规则与
|
||||
锁定策略解析,不经前端勾选。 */
|
||||
.brain-skill-picker {
|
||||
@@ -1680,8 +1663,8 @@
|
||||
gap: 8px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 12px;
|
||||
background: var(--semi-color-fill-0);
|
||||
border: 1px solid var(--semi-color-border);
|
||||
background: var(--ui-color-fill-0);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.brain-skill-picker-head {
|
||||
@@ -1694,12 +1677,12 @@
|
||||
.brain-skill-picker-head span {
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.brain-skill-picker-head small {
|
||||
font-size: 12px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
.brain-skill-picker-list {
|
||||
@@ -1714,9 +1697,9 @@
|
||||
gap: 4px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
background: var(--semi-color-bg-1);
|
||||
color: var(--semi-color-text-1);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
background: var(--ui-color-bg-1);
|
||||
color: var(--ui-color-text-1);
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
transition:
|
||||
@@ -1726,14 +1709,14 @@
|
||||
}
|
||||
|
||||
.brain-skill-chip:hover:not(:disabled) {
|
||||
border-color: var(--semi-color-primary);
|
||||
color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.brain-skill-chip.is-checked {
|
||||
border-color: var(--semi-color-primary);
|
||||
background: var(--semi-color-primary-light-default);
|
||||
color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
background: var(--ui-color-primary-light-default);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.brain-skill-chip:disabled {
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Switch,
|
||||
Tag,
|
||||
TextArea,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
Tag,
|
||||
TextArea,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
|
||||
@@ -473,7 +473,7 @@ function Settlement({ t }) {
|
||||
<div
|
||||
key={k}
|
||||
className='rounded-lg px-4 py-3'
|
||||
style={{ background: 'var(--semi-color-fill-0)' }}
|
||||
style={{ background: 'var(--ui-color-fill-0)' }}
|
||||
>
|
||||
<Text type='tertiary' size='small'>
|
||||
{k}
|
||||
@@ -643,7 +643,7 @@ function Settlement({ t }) {
|
||||
<div
|
||||
key={k}
|
||||
className='rounded-lg px-4 py-3'
|
||||
style={{ background: 'var(--semi-color-fill-0)' }}
|
||||
style={{ background: 'var(--ui-color-fill-0)' }}
|
||||
>
|
||||
<Text type='tertiary' size='small'>
|
||||
{k}
|
||||
@@ -1960,7 +1960,7 @@ function SectionTitle({ children }) {
|
||||
style={{
|
||||
width: 3,
|
||||
height: 14,
|
||||
background: 'var(--semi-color-primary)',
|
||||
background: 'var(--ui-color-primary)',
|
||||
}}
|
||||
/>
|
||||
<Text strong size='small'>
|
||||
@@ -1978,7 +1978,7 @@ function NumField({ label, value, onChange, suffix }) {
|
||||
className='flex items-center justify-between gap-3'
|
||||
style={{
|
||||
padding: '7px 0',
|
||||
borderBottom: '1px solid var(--semi-color-fill-0)',
|
||||
borderBottom: '1px solid var(--ui-color-fill-0)',
|
||||
}}
|
||||
>
|
||||
<Text type='secondary' size='small'>
|
||||
@@ -2012,7 +2012,7 @@ function TierEditor({ title, tiers, onChange, t }) {
|
||||
style={{
|
||||
width: 3,
|
||||
height: 14,
|
||||
background: 'var(--semi-color-primary)',
|
||||
background: 'var(--ui-color-primary)',
|
||||
}}
|
||||
/>
|
||||
<Text strong size='small'>
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Select,
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import CardPro from '../../components/common/ui/CardPro';
|
||||
import CardTable from '../../components/common/ui/CardTable';
|
||||
|
||||
+83
-83
@@ -4,14 +4,14 @@
|
||||
.docs-container {
|
||||
display: flex;
|
||||
min-height: calc(100vh - 64px);
|
||||
background: var(--semi-color-bg-0);
|
||||
background: var(--ui-color-bg-0);
|
||||
}
|
||||
|
||||
/* 侧边栏 */
|
||||
.docs-sidebar {
|
||||
width: 260px;
|
||||
background: var(--semi-color-bg-2);
|
||||
border-right: 1px solid var(--semi-color-border);
|
||||
background: var(--ui-color-bg-2);
|
||||
border-right: 1px solid var(--ui-color-border);
|
||||
flex-shrink: 0;
|
||||
overflow-y: auto;
|
||||
position: sticky;
|
||||
@@ -32,7 +32,7 @@
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
padding: 0.875rem 1.5rem;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
@@ -46,7 +46,7 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 3px;
|
||||
background: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary);
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s ease;
|
||||
}
|
||||
@@ -58,13 +58,13 @@
|
||||
}
|
||||
|
||||
.docs-nav-item:hover {
|
||||
background: var(--semi-color-fill-0);
|
||||
color: var(--semi-color-primary);
|
||||
background: var(--ui-color-fill-0);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-nav-item.active {
|
||||
background: var(--semi-color-primary-light-default);
|
||||
color: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary-light-default);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-nav-item.active::before {
|
||||
@@ -73,7 +73,7 @@
|
||||
|
||||
.docs-nav-divider {
|
||||
height: 1px;
|
||||
background: var(--semi-color-border);
|
||||
background: var(--ui-color-border);
|
||||
margin: 1rem 1.5rem;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@
|
||||
/* 标题 */
|
||||
.docs-content h2 {
|
||||
font-size: 1.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
margin: 2rem 0 1.5rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
|
||||
.docs-content h2 i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* 特性网格 */
|
||||
@@ -150,19 +150,19 @@
|
||||
}
|
||||
|
||||
.docs-feature-card {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
||||
transition: all 0.3s ease;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.docs-feature-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
|
||||
border-color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-feature-icon {
|
||||
@@ -204,11 +204,11 @@
|
||||
.docs-feature-card h3 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.docs-feature-card p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
margin-bottom: 1rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
@@ -220,11 +220,11 @@
|
||||
}
|
||||
|
||||
.docs-tag {
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
padding: 0.25rem 0.75rem;
|
||||
border-radius: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
@@ -232,7 +232,7 @@
|
||||
|
||||
.docs-tag i {
|
||||
font-size: 0.7rem;
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* 场景网格 */
|
||||
@@ -244,12 +244,12 @@
|
||||
}
|
||||
|
||||
.docs-scenario-card {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.75rem;
|
||||
text-align: center;
|
||||
transition: all 0.3s ease;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-scenario-card:hover {
|
||||
@@ -259,19 +259,19 @@
|
||||
|
||||
.docs-scenario-card i {
|
||||
font-size: 2rem;
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.docs-scenario-card h4 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.docs-scenario-card p {
|
||||
font-size: 0.875rem;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
/* 信息网格 */
|
||||
@@ -283,40 +283,40 @@
|
||||
}
|
||||
|
||||
.docs-info-box {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.75rem;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
align-items: start;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-info-box > i {
|
||||
font-size: 1.5rem;
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.docs-info-box h4 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.docs-info-box p {
|
||||
font-size: 0.9rem;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
/* 快速开始 */
|
||||
.docs-quick-start {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 2rem;
|
||||
border-radius: 1rem;
|
||||
text-align: center;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-quick-start h2 {
|
||||
@@ -324,7 +324,7 @@
|
||||
}
|
||||
|
||||
.docs-quick-start > p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
gap: 1.5rem;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1.5rem;
|
||||
border-bottom: 1px solid var(--semi-color-border);
|
||||
border-bottom: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-header-icon {
|
||||
@@ -454,26 +454,26 @@
|
||||
|
||||
.docs-page-header h1 {
|
||||
font-size: 2rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-page-header p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
/* 描述框 */
|
||||
.docs-description-box {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 0.75rem;
|
||||
border-left: 4px solid var(--semi-color-primary);
|
||||
border-left: 4px solid var(--ui-color-primary);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
.docs-description-box p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
line-height: 1.8;
|
||||
}
|
||||
|
||||
@@ -486,12 +486,12 @@
|
||||
}
|
||||
|
||||
.docs-feature-item {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.25rem;
|
||||
border-radius: 0.75rem;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -520,12 +520,12 @@
|
||||
.docs-feature-item h4 {
|
||||
font-size: 1rem;
|
||||
margin-bottom: 0.25rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.docs-feature-item p {
|
||||
font-size: 0.875rem;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
/* 代码块 */
|
||||
@@ -553,7 +553,7 @@
|
||||
}
|
||||
|
||||
.docs-copy-btn {
|
||||
background: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary);
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 0.375rem 0.75rem;
|
||||
@@ -598,8 +598,8 @@
|
||||
flex: 1;
|
||||
min-width: 140px;
|
||||
padding: 0.875rem 1.25rem;
|
||||
background: var(--semi-color-bg-1);
|
||||
border: 2px solid var(--semi-color-border);
|
||||
background: var(--ui-color-bg-1);
|
||||
border: 2px solid var(--ui-color-border);
|
||||
border-radius: 0.5rem;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
@@ -608,7 +608,7 @@
|
||||
gap: 0.5rem;
|
||||
font-size: 0.95rem;
|
||||
font-weight: 500;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
@@ -619,8 +619,8 @@
|
||||
|
||||
.docs-tool-btn:hover,
|
||||
.docs-os-btn:hover {
|
||||
border-color: var(--semi-color-primary);
|
||||
color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-tool-btn.active,
|
||||
@@ -636,23 +636,23 @@
|
||||
|
||||
/* 部署卡片 */
|
||||
.docs-deployment-card {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
border-radius: 1rem;
|
||||
padding: 1.5rem;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-deployment-card > h3 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 1.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-deployment-card > h3 i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* 步骤 */
|
||||
@@ -666,9 +666,9 @@
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
padding: 1.25rem;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
border-radius: 0.75rem;
|
||||
border-left: 4px solid var(--semi-color-primary);
|
||||
border-left: 4px solid var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-step-number {
|
||||
@@ -696,18 +696,18 @@
|
||||
.docs-step-content h4 {
|
||||
font-size: 1.1rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-step-content h4 i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-step-content > p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
@@ -719,10 +719,10 @@
|
||||
}
|
||||
|
||||
.docs-practice-item {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-practice-icon {
|
||||
@@ -745,11 +745,11 @@
|
||||
.docs-practice-item h3 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.5rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.docs-practice-item > p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
margin-bottom: 1rem;
|
||||
line-height: 1.6;
|
||||
}
|
||||
@@ -781,36 +781,36 @@
|
||||
|
||||
.docs-example-box p {
|
||||
padding: 0.75rem 1rem;
|
||||
background: var(--semi-color-fill-0);
|
||||
color: var(--semi-color-text-2);
|
||||
background: var(--ui-color-fill-0);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.docs-tip-box {
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
padding: 1rem;
|
||||
border-radius: 0.5rem;
|
||||
border-left: 4px solid var(--semi-color-primary);
|
||||
border-left: 4px solid var(--ui-color-primary);
|
||||
display: flex;
|
||||
gap: 0.75rem;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.docs-tip-box i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.docs-tip-box p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
/* 对比表格 */
|
||||
.docs-comparison-table-wrapper {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
border-radius: 1rem;
|
||||
padding: 1.5rem;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
overflow-x: auto;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
@@ -824,17 +824,17 @@
|
||||
.docs-comparison-table td {
|
||||
padding: 1rem;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid var(--semi-color-border);
|
||||
border-bottom: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-comparison-table th {
|
||||
background: var(--semi-color-fill-0);
|
||||
color: var(--semi-color-text-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
color: var(--ui-color-text-0);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.docs-comparison-table td {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
.docs-comparison-table td i {
|
||||
@@ -842,7 +842,7 @@
|
||||
}
|
||||
|
||||
.docs-comparison-table tbody tr:hover {
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
|
||||
.docs-tool-badge {
|
||||
@@ -898,27 +898,27 @@
|
||||
}
|
||||
|
||||
.docs-comparison-card {
|
||||
background: var(--semi-color-bg-1);
|
||||
background: var(--ui-color-bg-1);
|
||||
padding: 1.5rem;
|
||||
border-radius: 1rem;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-comparison-card h4 {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 0.75rem;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-comparison-card h4 i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.docs-comparison-card > p {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
@@ -930,14 +930,14 @@
|
||||
|
||||
.docs-comparison-card li {
|
||||
padding: 0.5rem 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.docs-comparison-card li i {
|
||||
color: var(--semi-color-primary);
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* 响应式 */
|
||||
@@ -962,7 +962,7 @@
|
||||
position: relative;
|
||||
top: 0;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid var(--semi-color-border);
|
||||
border-bottom: 1px solid var(--ui-color-border);
|
||||
}
|
||||
|
||||
.docs-nav {
|
||||
|
||||
@@ -18,8 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
||||
import { IconImage, IconVideo, IconBolt } from '@douyinfe/semi-icons';
|
||||
import { Tabs, TabPane } from '@/components/ui';
|
||||
import { IconImage, IconVideo, IconBolt } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
import ImageGenerationTab from './AICreation/ImageGenerationTab';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Modal, Typography, Tag } from '@douyinfe/semi-ui';
|
||||
import { Modal, Typography, Tag } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const { Text } = Typography;
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
Space,
|
||||
Typography,
|
||||
Tag,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Download, Copy, ImagePlus, Sparkles } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { showSuccess, showError } from '../../../../helpers';
|
||||
@@ -172,7 +172,7 @@ const ImageDetailModal = ({
|
||||
footer={
|
||||
// wrap 必须开:三个中文按钮(用作参考图/在此基础上微调/下载图片)合计 ~370px,
|
||||
// 而 modalWidth 是 viewportWidth-48,390px 屏上扣掉 content 的 padding 只剩 ~294px。
|
||||
// Space 默认 wrap:false + .semi-modal-content{overflow:hidden},
|
||||
// Space 默认 wrap:false + .ant-modal-content{overflow:hidden},
|
||||
// 溢出部分向左溢出并被裁掉 —— 「用作参考图」整个点不到。
|
||||
<Space wrap style={{ justifyContent: 'flex-end', width: '100%' }}>
|
||||
{onUseAsReference && task.imageUrl && (
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
Tag,
|
||||
Toast,
|
||||
Dropdown,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Upload as UploadIcon,
|
||||
ChevronDown,
|
||||
@@ -701,10 +701,10 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
className='!rounded-2xl !shadow-lg !shadow-brand/20 hover:!shadow-xl hover:!shadow-brand/25 !transition-all'
|
||||
style={{
|
||||
background: !isFormValid()
|
||||
? 'var(--semi-color-fill-1)'
|
||||
? 'var(--ui-color-fill-1)'
|
||||
: 'linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-primary) 52%, var(--brand-gradient-to) 100%)',
|
||||
border: 'none',
|
||||
color: !isFormValid() ? 'var(--semi-color-text-3)' : 'white',
|
||||
color: !isFormValid() ? 'var(--ui-color-text-3)' : 'white',
|
||||
height: '48px',
|
||||
fontSize: '15px',
|
||||
fontWeight: '700',
|
||||
@@ -818,7 +818,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
</Tag>
|
||||
)}
|
||||
</div>
|
||||
<div className='[&_.semi-select]:!rounded-2xl [&_.semi-select]:!border-white/[0.55] [&_.semi-select]:!bg-white/[0.55] [&_.semi-select]:!shadow-sm dark:[&_.semi-select]:!border-white/10 dark:[&_.semi-select]:!bg-white/[0.06] [&_.semi-select:hover]:!border-brand/30'>
|
||||
<div className='[&_.ant-select]:!rounded-2xl [&_.ant-select]:!border-white/[0.55] [&_.ant-select]:!bg-white/[0.55] [&_.ant-select]:!shadow-sm dark:[&_.ant-select]:!border-white/10 dark:[&_.ant-select]:!bg-white/[0.06] [&_.ant-select:hover]:!border-brand/30'>
|
||||
<ModelSelector
|
||||
key={mode}
|
||||
category={currentCategory}
|
||||
@@ -916,7 +916,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
rows={3}
|
||||
maxCount={2000}
|
||||
showClear
|
||||
className='[&_.semi-input-textarea]:!rounded-2xl [&_.semi-input-textarea]:!border-white/[0.55] [&_.semi-input-textarea]:!bg-white/[0.55] [&_.semi-input-textarea]:!shadow-inner dark:[&_.semi-input-textarea]:!border-white/10 dark:[&_.semi-input-textarea]:!bg-white/[0.06] [&_.semi-input-textarea:hover]:!border-brand/30 [&_.semi-input-textarea:focus]:!border-brand'
|
||||
className='[&_.ant-input-textarea]:!rounded-2xl [&_.ant-input-textarea]:!border-white/[0.55] [&_.ant-input-textarea]:!bg-white/[0.55] [&_.ant-input-textarea]:!shadow-inner dark:[&_.ant-input-textarea]:!border-white/10 dark:[&_.ant-input-textarea]:!bg-white/[0.06] [&_.ant-input-textarea:hover]:!border-brand/30 [&_.ant-input-textarea:focus]:!border-brand'
|
||||
/>
|
||||
|
||||
<div className='flex flex-wrap items-center gap-1.5 mt-2'>
|
||||
@@ -1005,7 +1005,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
beforeUpload={() => false}
|
||||
draggable
|
||||
showUploadList={false}
|
||||
className='[&_.semi-upload-drag]:!rounded-2xl [&_.semi-upload-drag]:!border-dashed [&_.semi-upload-drag]:!border-2 [&_.semi-upload-drag]:!border-white/[0.55] [&_.semi-upload-drag]:!bg-white/40 dark:[&_.semi-upload-drag]:!border-white/10 dark:[&_.semi-upload-drag]:!bg-white/[0.05] [&_.semi-upload-drag:hover]:!border-brand/40'
|
||||
className='[&_.ant-upload-drag]:!rounded-2xl [&_.ant-upload-drag]:!border-dashed [&_.ant-upload-drag]:!border-2 [&_.ant-upload-drag]:!border-white/[0.55] [&_.ant-upload-drag]:!bg-white/40 dark:[&_.ant-upload-drag]:!border-white/10 dark:[&_.ant-upload-drag]:!bg-white/[0.05] [&_.ant-upload-drag:hover]:!border-brand/40'
|
||||
dragMainText={
|
||||
<div className='text-center py-3'>
|
||||
<UploadIcon
|
||||
@@ -1114,7 +1114,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
step={64}
|
||||
suffix='px'
|
||||
size='small'
|
||||
className='w-full [&_.semi-input-number]:!rounded-lg'
|
||||
className='w-full [&_.ant-input-number]:!rounded-lg'
|
||||
/>
|
||||
</Col>
|
||||
<Col span={12}>
|
||||
@@ -1126,7 +1126,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
step={64}
|
||||
suffix='px'
|
||||
size='small'
|
||||
className='w-full [&_.semi-input-number]:!rounded-lg'
|
||||
className='w-full [&_.ant-input-number]:!rounded-lg'
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -1206,7 +1206,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
max={capability.maxN}
|
||||
step={1}
|
||||
size='small'
|
||||
className='w-full [&_.semi-input-number]:!rounded-lg'
|
||||
className='w-full [&_.ant-input-number]:!rounded-lg'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -1222,7 +1222,7 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
placeholder={t('描述不希望出现的内容(可选)')}
|
||||
rows={2}
|
||||
maxCount={500}
|
||||
className='[&_.semi-input-textarea]:!rounded-lg'
|
||||
className='[&_.ant-input-textarea]:!rounded-lg'
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
@@ -1301,10 +1301,10 @@ const ImageGenerationForm = ({ onSubmit, loading, prefillSignal }) => {
|
||||
className='!rounded-2xl !shadow-lg !shadow-brand/20 hover:!shadow-xl hover:!shadow-brand/25 !transition-all'
|
||||
style={{
|
||||
background: !isFormValid()
|
||||
? 'var(--semi-color-fill-1)'
|
||||
? 'var(--ui-color-fill-1)'
|
||||
: 'linear-gradient(135deg, var(--brand-gradient-from) 0%, var(--brand-primary) 52%, var(--brand-gradient-to) 100%)',
|
||||
border: 'none',
|
||||
color: !isFormValid() ? 'var(--semi-color-text-3)' : 'white',
|
||||
color: !isFormValid() ? 'var(--ui-color-text-3)' : 'white',
|
||||
height: '48px',
|
||||
fontSize: '15px',
|
||||
fontWeight: '700',
|
||||
|
||||
@@ -209,8 +209,8 @@ ImageTaskList/
|
||||
|
||||
### 依赖库
|
||||
|
||||
- **@douyinfe/semi-ui**:UI 组件库
|
||||
- **@douyinfe/semi-icons**:图标库
|
||||
- **antd**:UI 组件库
|
||||
- **lucide-react**:图标库
|
||||
- **react-i18next**:国际化
|
||||
- **React Hooks**:状态管理
|
||||
|
||||
@@ -227,12 +227,12 @@ useCallback; // 事件处理函数优化
|
||||
### CSS 变量
|
||||
|
||||
```css
|
||||
--semi-color-primary // 主色
|
||||
--semi-color-success // 成功色
|
||||
--semi-color-warning // 警告色
|
||||
--semi-color-danger // 危险色
|
||||
--semi-color-bg-2 // 背景色
|
||||
--semi-color-border // 边框色
|
||||
--ui-color-primary // 主色
|
||||
--ui-color-success // 成功色
|
||||
--ui-color-warning // 警告色
|
||||
--ui-color-danger // 危险色
|
||||
--ui-color-bg-2 // 背景色
|
||||
--ui-color-border // 边框色
|
||||
```
|
||||
|
||||
### 自定义类
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
}
|
||||
|
||||
.search-input-enhanced:focus-within {
|
||||
box-shadow: 0 0 0 2px rgba(var(--semi-color-primary-rgb), 0.2);
|
||||
box-shadow: 0 0 0 2px rgba(var(--ui-color-primary-rgb), 0.2);
|
||||
}
|
||||
|
||||
/* 标签组样式 */
|
||||
@@ -132,64 +132,10 @@
|
||||
}
|
||||
|
||||
/* Badge 样式覆盖 - 修复默认蓝色圆形背景 */
|
||||
.image-task-list .semi-badge-primary.semi-badge-solid .semi-badge-count,
|
||||
.image-task-list
|
||||
.semi-badge-primary.semi-badge-solid.semi-badge-block
|
||||
.semi-badge-count {
|
||||
background: transparent !important;
|
||||
background-image: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* 历史标题区域的 Badge 特定样式 */
|
||||
.image-task-list .semi-badge.semi-badge-primary .semi-badge-count {
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
var(--brand-gradient-from),
|
||||
var(--brand-gradient-to)
|
||||
) !important;
|
||||
border: none !important;
|
||||
box-shadow: 0 2px 8px
|
||||
color-mix(in srgb, var(--brand-primary) 30%, transparent) !important;
|
||||
}
|
||||
|
||||
/* 图片生成页局部控件留白:避免搜索/筛选内容贴住玻璃卡片边框 */
|
||||
.image-task-list .image-task-search.semi-input-wrapper {
|
||||
padding-left: 10px !important;
|
||||
padding-right: 8px !important;
|
||||
border: 1px solid rgb(255 255 255 / 0.5) !important;
|
||||
background: rgb(255 255 255 / 0.48) !important;
|
||||
backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
.dark .image-task-list .image-task-search.semi-input-wrapper {
|
||||
border-color: rgb(255 255 255 / 0.1) !important;
|
||||
background: rgb(255 255 255 / 0.06) !important;
|
||||
}
|
||||
|
||||
.image-task-list .image-task-search .semi-input-prefix {
|
||||
margin-right: 6px !important;
|
||||
}
|
||||
|
||||
.image-task-list .image-task-search .semi-input {
|
||||
padding-left: 2px !important;
|
||||
}
|
||||
|
||||
.image-task-list .image-task-filter-select.semi-select {
|
||||
padding-left: 8px !important;
|
||||
border: 1px solid rgb(255 255 255 / 0.5) !important;
|
||||
background: rgb(255 255 255 / 0.48) !important;
|
||||
backdrop-filter: blur(14px);
|
||||
}
|
||||
|
||||
.dark .image-task-list .image-task-filter-select.semi-select {
|
||||
border-color: rgb(255 255 255 / 0.1) !important;
|
||||
background: rgb(255 255 255 / 0.06) !important;
|
||||
}
|
||||
|
||||
.image-task-list .image-task-filter-select .semi-select-selection {
|
||||
padding-left: 2px !important;
|
||||
}
|
||||
|
||||
.image-task-list .image-task-group-header {
|
||||
margin-left: -4px;
|
||||
@@ -205,16 +151,5 @@
|
||||
}
|
||||
|
||||
/* ===== 触屏命中区兜底 ===== */
|
||||
/* 卡片操作按钮统一 height:24px(Semi size='small'),在触屏上低于 32px 的下限,
|
||||
且十几个按钮彼此相邻、又叠在图片上,误触率很高。
|
||||
这里不改视觉高度(改了会撑破密集网格),只用伪元素把可点区域向外扩到 32px。 */
|
||||
@media (hover: none) {
|
||||
.image-task-card .semi-button {
|
||||
position: relative;
|
||||
}
|
||||
.image-task-card .semi-button::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: -5px -3px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Progress,
|
||||
Popover,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
RefreshCw,
|
||||
Trash2,
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
Tag,
|
||||
Tooltip,
|
||||
Upload,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Check,
|
||||
ExternalLink,
|
||||
@@ -210,7 +210,7 @@ const PortraitAssetPicker = ({
|
||||
<Empty title={t('真人人像素材未启用')} />
|
||||
) : (
|
||||
<div className='flex flex-col gap-5'>
|
||||
<div className='flex flex-col gap-3 border-b border-solid border-semi-color-border pb-5'>
|
||||
<div className='flex flex-col gap-3 border-b border-solid border-ui-color-border pb-5'>
|
||||
<div className='flex gap-2'>
|
||||
<Input
|
||||
value={name}
|
||||
@@ -256,7 +256,7 @@ const PortraitAssetPicker = ({
|
||||
>
|
||||
{item.status}
|
||||
</Tag>
|
||||
<span className='text-xs text-semi-color-text-2'>
|
||||
<span className='text-xs text-ui-color-text-2'>
|
||||
{item.id.slice(-6)}
|
||||
</span>
|
||||
</span>
|
||||
@@ -288,7 +288,7 @@ const PortraitAssetPicker = ({
|
||||
|
||||
{portrait.session &&
|
||||
['pending', 'confirming'].includes(portrait.session.status) && (
|
||||
<div className='flex flex-col items-center gap-3 border-y border-solid border-semi-color-border py-5'>
|
||||
<div className='flex flex-col items-center gap-3 border-y border-solid border-ui-color-border py-5'>
|
||||
<QRCodeSVG value={portrait.session.h5_url} size={184} />
|
||||
<Progress
|
||||
percent={Math.round((secondsLeft / 120) * 100)}
|
||||
@@ -331,13 +331,13 @@ const PortraitAssetPicker = ({
|
||||
</Upload>
|
||||
)}
|
||||
|
||||
<div className='flex flex-col divide-y divide-semi-color-border'>
|
||||
<div className='flex flex-col divide-y divide-ui-color-border'>
|
||||
{assets.map((asset) => (
|
||||
<div
|
||||
key={asset.id}
|
||||
className='flex min-h-[64px] items-center gap-3 py-3'
|
||||
>
|
||||
<div className='h-12 w-12 shrink-0 overflow-hidden rounded-[6px] bg-semi-color-fill-0'>
|
||||
<div className='h-12 w-12 shrink-0 overflow-hidden rounded-[6px] bg-ui-color-fill-0'>
|
||||
{asset.preview_url && (
|
||||
<img
|
||||
src={asset.preview_url}
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
Tag,
|
||||
Typography,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
@@ -373,10 +373,10 @@ const VideoInputPanel = ({
|
||||
style={{
|
||||
marginTop: '12px',
|
||||
padding: '12px',
|
||||
backgroundColor: 'var(--semi-color-fill-0)',
|
||||
backgroundColor: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '8px',
|
||||
fontSize: '13px',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
}}
|
||||
>
|
||||
<div
|
||||
@@ -411,7 +411,7 @@ const VideoInputPanel = ({
|
||||
<CreditCard size={14} />
|
||||
{t('单价')}
|
||||
</Text>
|
||||
<Text strong style={{ color: 'var(--semi-color-danger)' }}>
|
||||
<Text strong style={{ color: 'var(--ui-color-danger)' }}>
|
||||
{convertUSDToCurrency(Number(modelInfo.price || 0), 6)}
|
||||
</Text>
|
||||
</div>
|
||||
@@ -462,9 +462,9 @@ const VideoInputPanel = ({
|
||||
style={{
|
||||
marginTop: '12px',
|
||||
padding: '12px',
|
||||
backgroundColor: 'var(--semi-color-fill-0)',
|
||||
backgroundColor: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '8px',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
}}
|
||||
>
|
||||
<Text type='tertiary' size='small'>
|
||||
@@ -590,9 +590,9 @@ const VideoInputPanel = ({
|
||||
justifyContent: 'center',
|
||||
gap: '12px',
|
||||
padding: '12px',
|
||||
backgroundColor: 'var(--semi-color-fill-0)',
|
||||
backgroundColor: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '8px',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
}}
|
||||
>
|
||||
<img
|
||||
@@ -668,7 +668,7 @@ const VideoInputPanel = ({
|
||||
dragSubText={t('支持 JPG、PNG 格式')}
|
||||
showUploadList={false}
|
||||
style={{
|
||||
border: '1px dashed var(--semi-color-border)',
|
||||
border: '1px dashed var(--ui-color-border)',
|
||||
borderRadius: '8px',
|
||||
padding: '24px',
|
||||
}}
|
||||
|
||||
@@ -18,8 +18,8 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
import { Card, Typography, Space, Tag } from '@douyinfe/semi-ui';
|
||||
import { IconCreditCard, IconTickCircle } from '@douyinfe/semi-icons';
|
||||
import { Card, Typography, Space, Tag } from '@/components/ui';
|
||||
import { IconCreditCard, IconTickCircle } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import ModelSelector from '../../../../../components/common/ModelSelector';
|
||||
import { MODEL_CATEGORY } from '../../../../../constants';
|
||||
@@ -137,7 +137,7 @@ const VideoModelPanel = ({
|
||||
<Text type='tertiary'>{t('单价')}</Text>
|
||||
<Text
|
||||
strong
|
||||
style={{ fontSize: '18px', color: 'var(--semi-color-primary)' }}
|
||||
style={{ fontSize: '18px', color: 'var(--ui-color-primary)' }}
|
||||
>
|
||||
{convertUSDToCurrency(Number(modelInfo?.price || 0), 6)}
|
||||
</Text>
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
Typography,
|
||||
Spin,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Play,
|
||||
Square,
|
||||
@@ -238,8 +238,8 @@ const VideoPreviewPanel = ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
gap: '12px',
|
||||
backgroundColor: 'var(--semi-color-bg-1)',
|
||||
borderBottom: '1px solid var(--semi-color-border)',
|
||||
backgroundColor: 'var(--ui-color-bg-1)',
|
||||
borderBottom: '1px solid var(--ui-color-border)',
|
||||
flexShrink: 0,
|
||||
}}
|
||||
>
|
||||
@@ -430,7 +430,7 @@ const VideoPreviewPanel = ({
|
||||
style={{
|
||||
marginTop: windowWidth > 768 ? '24px' : '16px',
|
||||
padding: windowWidth > 768 ? '16px' : '12px',
|
||||
backgroundColor: 'var(--semi-color-fill-0)',
|
||||
backgroundColor: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '8px',
|
||||
textAlign: 'left',
|
||||
}}
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
Switch,
|
||||
Space,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useIsMobile } from '../../../../../hooks/common/useIsMobile';
|
||||
import ModelSelector from '../../../../../components/common/ModelSelector';
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Modal,
|
||||
Badge,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
ChevronUp,
|
||||
ChevronDown,
|
||||
@@ -328,8 +328,8 @@ const VideoTaskQueue = ({
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: '40px',
|
||||
backgroundColor: 'var(--semi-color-bg-1)',
|
||||
borderTop: '1px solid var(--semi-color-border)',
|
||||
backgroundColor: 'var(--ui-color-bg-1)',
|
||||
borderTop: '1px solid var(--ui-color-border)',
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
@@ -358,8 +358,8 @@ const VideoTaskQueue = ({
|
||||
left: 0,
|
||||
right: 0,
|
||||
height: `${queueHeight}px`,
|
||||
backgroundColor: 'var(--semi-color-bg-0)',
|
||||
borderTop: '1px solid var(--semi-color-border)',
|
||||
backgroundColor: 'var(--ui-color-bg-0)',
|
||||
borderTop: '1px solid var(--ui-color-border)',
|
||||
transition: 'bottom 0.3s',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
@@ -370,7 +370,7 @@ const VideoTaskQueue = ({
|
||||
<div
|
||||
style={{
|
||||
padding: !isCompact ? '12px 16px' : '8px 12px',
|
||||
borderBottom: '1px solid var(--semi-color-border)',
|
||||
borderBottom: '1px solid var(--ui-color-border)',
|
||||
display: 'flex',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
|
||||
@@ -205,14 +205,14 @@ const VideoGenerationTab = () => {
|
||||
? '500px'
|
||||
: 'auto',
|
||||
flexShrink: layoutConfig.direction === 'row' ? 0 : 1,
|
||||
backgroundColor: 'var(--semi-color-bg-1)',
|
||||
backgroundColor: 'var(--ui-color-bg-1)',
|
||||
borderRight:
|
||||
layoutConfig.direction === 'row'
|
||||
? '1px solid var(--semi-color-border)'
|
||||
? '1px solid var(--ui-color-border)'
|
||||
: 'none',
|
||||
borderBottom:
|
||||
layoutConfig.direction === 'column'
|
||||
? '1px solid var(--semi-color-border)'
|
||||
? '1px solid var(--ui-color-border)'
|
||||
: 'none',
|
||||
display: 'flex',
|
||||
flexDirection: 'column',
|
||||
@@ -252,7 +252,7 @@ const VideoGenerationTab = () => {
|
||||
className='app-scrollbar'
|
||||
style={{
|
||||
height: '100%',
|
||||
backgroundColor: 'var(--semi-color-bg-0)',
|
||||
backgroundColor: 'var(--ui-color-bg-0)',
|
||||
padding: windowWidth > 768 ? '16px' : '12px',
|
||||
overflow: 'auto',
|
||||
}}
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Card, Empty } from '@douyinfe/semi-ui';
|
||||
import { Card, Empty } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { IllustrationConstruction } from '../../../../components/common/illustrations';
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useContext } from 'react';
|
||||
import React from 'react';
|
||||
import { Navigate, useLocation, useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { BrainCircuit, Image, Video } from 'lucide-react';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { useMarquee } from '../../hooks/common/useMarquee';
|
||||
import PageBackground from '../../components/common/PageBackground';
|
||||
import TextModel from './components/TextModel';
|
||||
import ImageGeneration from './components/ImageGeneration';
|
||||
@@ -120,11 +120,10 @@ const MobileBottomNav = ({ currentPath, navigate, isAvailable }) => {
|
||||
const ExperienceCenter = () => {
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
const [statusState] = useContext(StatusContext);
|
||||
const { ready, orgOnly, isAvailable, defaultPath } = useExperienceModules();
|
||||
|
||||
// 跑马灯公告是否存在(用于动态计算顶部间距)
|
||||
const hasMarquee = !!statusState?.status?.marquee_content?.trim();
|
||||
const { visible: hasMarquee } = useMarquee();
|
||||
|
||||
// 默认落地:进第一个对当前用户可用的子页;一个都没有时,org_only 用户回企业
|
||||
// 空间,其余用户去默认登录落地页。兜底目标都不在体验中心内,不会重定向循环。
|
||||
@@ -165,7 +164,7 @@ const ExperienceCenter = () => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`flex flex-col md:flex-row h-screen bg-[var(--surface-bg-base)] transition-colors duration-300 overflow-hidden ${hasMarquee ? 'pt-[96px] sm:pt-[104px]' : 'pt-14 sm:pt-16'}`}
|
||||
className={`flex flex-col md:flex-row h-screen bg-[var(--surface-bg-base)] overflow-hidden ${hasMarquee ? 'pt-[91px] md:pt-[107px]' : 'pt-14 md:pt-[72px]'}`}
|
||||
>
|
||||
{/* Sidebar - 桌面端 */}
|
||||
<div className='hidden md:block'>
|
||||
|
||||
@@ -34,9 +34,9 @@ import {
|
||||
Table,
|
||||
Empty,
|
||||
Toast,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconRefresh } from '@douyinfe/semi-icons';
|
||||
import { initVChartSemiTheme } from '@visactor/vchart-semi-theme';
|
||||
} from '@/components/ui';
|
||||
import { IconRefresh } from '@/components/ui/icons';
|
||||
import { initVChartTheme } from '@/components/ui/chartTheme';
|
||||
import { VChart } from '@visactor/react-vchart';
|
||||
import {
|
||||
Upload,
|
||||
@@ -125,7 +125,7 @@ export const ExperienceCenterAuditPanel = () => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
useEffect(() => {
|
||||
initVChartSemiTheme({ isWatchingThemeSwitch: true });
|
||||
initVChartTheme({ isWatchingThemeSwitch: true });
|
||||
}, []);
|
||||
|
||||
const RANGE_OPTIONS = useMemo(() => RANGE_OPTIONS_BUILDER(t), [t]);
|
||||
@@ -487,8 +487,8 @@ export const ExperienceCenterAuditPanel = () => {
|
||||
</span>
|
||||
}
|
||||
headerExtraContent={
|
||||
// Semi 的 .semi-card-header-wrapper 是 row-reverse 且不换行,
|
||||
// .semi-card 又是 overflow:hidden:160px 的 Select 加导出按钮共约 410px,
|
||||
// Semi 的 .ant-card-header-wrapper 是 row-reverse 且不换行,
|
||||
// .ant-card 又是 overflow:hidden:160px 的 Select 加导出按钮共约 410px,
|
||||
// 塞进 358px 的卡片头时「导出本页 CSV」被裁掉且点不到
|
||||
<div className='flex flex-wrap items-center justify-end gap-2'>
|
||||
<Select
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
--ep-ink: var(--text-primary);
|
||||
--ep-muted: var(--text-secondary);
|
||||
--ep-line: var(--border-subtle);
|
||||
--ep-accent: var(--semi-color-primary);
|
||||
--ep-tint: color-mix(in srgb, var(--semi-color-primary) 10%, transparent);
|
||||
--ep-accent: var(--ui-color-primary);
|
||||
--ep-tint: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||||
--ep-card: var(--surface-card);
|
||||
--ep-fill: var(--semi-color-fill-0);
|
||||
--ep-fill: var(--ui-color-fill-0);
|
||||
/* 阴影是中性投影而非配色:与 org-knowledge.css 的抬升体系逐字对齐,
|
||||
不随品牌色变化(这也是本文件里仅有的两处裸色值)。 */
|
||||
--ep-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
|
||||
@@ -60,15 +60,6 @@
|
||||
}
|
||||
|
||||
/* 键盘可达性:统一 focus 环 */
|
||||
.expert-platform-page button:focus-visible,
|
||||
.expert-platform-page a:focus-visible,
|
||||
.expert-platform-page input:focus-visible,
|
||||
.expert-platform-page textarea:focus-visible,
|
||||
.expert-platform-page .semi-tabs-tab:focus-visible {
|
||||
outline: 2px solid
|
||||
color-mix(in srgb, var(--semi-color-primary) 55%, transparent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ===== Hero ===== */
|
||||
|
||||
@@ -189,20 +180,19 @@
|
||||
/* 每张指标卡一个维度色(低饱和度点缀,亮暗两色都成立):
|
||||
模板=品牌色、已发布=成功、待审核=次要、模型能力=信息、待对账=警告。 */
|
||||
.expert-metric:nth-child(1) {
|
||||
--metric-accent: var(--semi-color-primary);
|
||||
--metric-accent: var(--ui-color-primary);
|
||||
}
|
||||
.expert-metric:nth-child(2) {
|
||||
--metric-accent: var(--semi-color-success);
|
||||
--metric-accent: var(--ui-color-success);
|
||||
}
|
||||
.expert-metric:nth-child(3) {
|
||||
/* 走 Semi 调色板的 violet-5 三元组(随亮/暗色级联),与相邻的 info 蓝拉开色相 */
|
||||
--metric-accent: rgb(var(--semi-violet-5, 106 58 199));
|
||||
--metric-accent: rgb(var(--ui-violet-5, 106 58 199));
|
||||
}
|
||||
.expert-metric:nth-child(4) {
|
||||
--metric-accent: var(--semi-color-info, var(--semi-color-primary));
|
||||
--metric-accent: var(--ui-color-info, var(--ui-color-primary));
|
||||
}
|
||||
.expert-metric:nth-child(5) {
|
||||
--metric-accent: var(--semi-color-warning);
|
||||
--metric-accent: var(--ui-color-warning);
|
||||
}
|
||||
|
||||
.expert-metric::before {
|
||||
@@ -281,28 +271,11 @@
|
||||
.expert-hero-actions {
|
||||
width: 100%;
|
||||
}
|
||||
.expert-hero-actions .semi-button {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* ===== 页签 ===== */
|
||||
|
||||
/* 页签栏是分区线:下沿到卡片区必须留出完整一档间距(28px),
|
||||
只靠 Semi 默认的 0 内边距会让卡片顶到分割线上。 */
|
||||
.expert-tabs .semi-tabs-bar {
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid var(--ep-line);
|
||||
}
|
||||
|
||||
.expert-tabs .semi-tabs-content {
|
||||
padding: 28px 0 0;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.expert-tabs .semi-tabs-content {
|
||||
padding-top: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.expert-tab-label {
|
||||
@@ -324,18 +297,13 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.expert-tabs .semi-tabs-tab-active .expert-tab-label em {
|
||||
background: var(--ep-tint);
|
||||
color: var(--ep-accent);
|
||||
}
|
||||
|
||||
/* 有待办的页签用警示色徽标,避免运营漏看死信/对账 */
|
||||
.expert-tab-label em.is-alert {
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 16%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 16%, transparent);
|
||||
color: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-warning) 80%,
|
||||
var(--semi-color-text-0)
|
||||
var(--ui-color-warning) 80%,
|
||||
var(--ui-color-text-0)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -570,20 +538,20 @@
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: var(--semi-color-text-2);
|
||||
background: var(--ui-color-text-2);
|
||||
}
|
||||
|
||||
.expert-dot.is-published {
|
||||
background: var(--semi-color-success);
|
||||
background: var(--ui-color-success);
|
||||
}
|
||||
|
||||
.expert-dot.is-draft,
|
||||
.expert-dot.is-pending_review {
|
||||
background: var(--semi-color-warning);
|
||||
background: var(--ui-color-warning);
|
||||
}
|
||||
|
||||
.expert-dot.is-revoked {
|
||||
background: var(--semi-color-danger);
|
||||
background: var(--ui-color-danger);
|
||||
}
|
||||
|
||||
/* ===== 死信 / 对账行 ===== */
|
||||
@@ -595,9 +563,9 @@
|
||||
gap: 10px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid
|
||||
color-mix(in srgb, var(--semi-color-danger) 22%, var(--ep-line));
|
||||
color-mix(in srgb, var(--ui-color-danger) 22%, var(--ep-line));
|
||||
border-radius: 10px;
|
||||
background: color-mix(in srgb, var(--semi-color-danger) 5%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-danger) 5%, transparent);
|
||||
}
|
||||
|
||||
.expert-dead-copy {
|
||||
@@ -653,10 +621,6 @@
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.expert-empty .semi-button {
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
.expert-skeleton {
|
||||
min-height: 190px;
|
||||
pointer-events: none;
|
||||
@@ -695,22 +659,16 @@
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
font-size: 13px;
|
||||
color: var(--semi-color-text-1);
|
||||
color: var(--ui-color-text-1);
|
||||
}
|
||||
|
||||
.expert-editor-grid label.wide {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
/* Semi 的 Select/InputNumber 默认自适应内容宽,在两列表单里要拉通 */
|
||||
.expert-editor-grid .semi-select,
|
||||
.expert-editor-grid .semi-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.expert-editor-hint {
|
||||
margin: 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
@@ -720,9 +678,9 @@
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 14px;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
border-radius: 12px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
|
||||
.expert-step-head {
|
||||
@@ -733,7 +691,7 @@
|
||||
}
|
||||
|
||||
.expert-step-head strong {
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
@@ -747,29 +705,29 @@
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
border: 1px solid var(--semi-color-border);
|
||||
background: var(--semi-color-fill-0);
|
||||
color: var(--semi-color-text-1);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
background: var(--ui-color-fill-0);
|
||||
color: var(--ui-color-text-1);
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.expert-model-badge.is-ok {
|
||||
border-color: color-mix(in srgb, var(--semi-color-success) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--semi-color-success) 10%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-success) 35%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-success) 10%, transparent);
|
||||
color: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-success) 75%,
|
||||
var(--semi-color-text-0)
|
||||
var(--ui-color-success) 75%,
|
||||
var(--ui-color-text-0)
|
||||
);
|
||||
}
|
||||
|
||||
.expert-model-badge.is-missing {
|
||||
border-color: color-mix(in srgb, var(--semi-color-warning) 45%, transparent);
|
||||
background: color-mix(in srgb, var(--semi-color-warning) 12%, transparent);
|
||||
border-color: color-mix(in srgb, var(--ui-color-warning) 45%, transparent);
|
||||
background: color-mix(in srgb, var(--ui-color-warning) 12%, transparent);
|
||||
color: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-warning) 78%,
|
||||
var(--semi-color-text-0)
|
||||
var(--ui-color-warning) 78%,
|
||||
var(--ui-color-text-0)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -786,11 +744,6 @@
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.expert-editor-toolbar > .semi-select {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.expert-editor-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
@@ -816,7 +769,7 @@
|
||||
}
|
||||
.expert-diagnose-scope {
|
||||
margin: 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
}
|
||||
.expert-diagnose-checks {
|
||||
@@ -832,21 +785,21 @@
|
||||
gap: 10px;
|
||||
align-items: baseline;
|
||||
padding: 8px 12px;
|
||||
border-left: 2px solid var(--semi-color-success);
|
||||
border-left: 2px solid var(--ui-color-success);
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.expert-diagnose-checks li.is-blocked {
|
||||
border-left-color: var(--semi-color-danger);
|
||||
border-left-color: var(--ui-color-danger);
|
||||
}
|
||||
.expert-diagnose-checks span {
|
||||
color: var(--semi-color-text-1);
|
||||
color: var(--ui-color-text-1);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.expert-diagnose-checks small,
|
||||
.expert-diagnose-model small {
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
word-break: break-word;
|
||||
}
|
||||
@@ -862,15 +815,15 @@
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 8px 12px;
|
||||
border-left: 2px solid var(--semi-color-success);
|
||||
border-left: 2px solid var(--ui-color-success);
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
.expert-diagnose-model + .expert-diagnose-model {
|
||||
margin-top: 6px;
|
||||
}
|
||||
.expert-diagnose-model.is-blocked {
|
||||
border-left-color: var(--semi-color-danger);
|
||||
border-left-color: var(--ui-color-danger);
|
||||
}
|
||||
.expert-diagnose-model strong {
|
||||
display: flex;
|
||||
@@ -881,14 +834,14 @@
|
||||
.expert-diagnose-model em {
|
||||
padding: 1px 6px;
|
||||
border-radius: 999px;
|
||||
background: var(--semi-color-primary-light-default);
|
||||
color: var(--semi-color-primary);
|
||||
background: var(--ui-color-primary-light-default);
|
||||
color: var(--ui-color-primary);
|
||||
font-size: 11px;
|
||||
font-style: normal;
|
||||
}
|
||||
.expert-diagnose-empty {
|
||||
margin: 6px 0 0;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
font-size: 12px;
|
||||
}
|
||||
.expert-diagnose-footer {
|
||||
|
||||
@@ -40,7 +40,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Activity,
|
||||
BadgeCheck,
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Empty } from '@douyinfe/semi-ui';
|
||||
import { Empty } from '@/components/ui';
|
||||
import {
|
||||
IllustrationNoAccess,
|
||||
IllustrationNoAccessDark,
|
||||
|
||||
@@ -24,7 +24,7 @@ import React, {
|
||||
useRef,
|
||||
useCallback,
|
||||
} from 'react';
|
||||
import { Button } from '@douyinfe/semi-ui';
|
||||
import { Button } from '@/components/ui';
|
||||
import { API, showError } from '../../helpers';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { useActualTheme } from '../../context/Theme';
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
Tooltip,
|
||||
Table,
|
||||
Progress,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Image,
|
||||
Download,
|
||||
@@ -755,8 +755,8 @@ const ImageGeneration = () => {
|
||||
size='small'
|
||||
stroke={
|
||||
percent === 100
|
||||
? 'var(--semi-color-success)'
|
||||
: 'var(--semi-color-primary)'
|
||||
? 'var(--ui-color-success)'
|
||||
: 'var(--ui-color-primary)'
|
||||
}
|
||||
/>
|
||||
);
|
||||
|
||||
+490
-686
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,339 @@
|
||||
/*
|
||||
* 密钥管理(/key-management,UserCenter keyManagementMode 嵌入)样式。
|
||||
* 浅色数值来自 密钥管理页面.zip(2026-11-04)实测:列表启用/禁用、模型列表抽屉、创建/编辑抽屉、列设置与密钥列图标图,
|
||||
* 截图为 1920 宽视口去除 216px 侧栏后的内容区(1704px),DPR 1。
|
||||
* 深色主题无设计图:由既有主题变量推导(边框 --border-subtle、卡片 --surface-card、填充 --ui-color-fill-0、
|
||||
* 次文字 --text-secondary),装饰阴影为 none。JSX 中不写颜色,规则只引用变量。
|
||||
* 设计图未定义的部件(弹窗确认、日期面板、下拉、空态、加载、提示)使用 Ant Design 默认样式。
|
||||
*/
|
||||
.km-page {
|
||||
--km-page-bg: #f8fafc;
|
||||
--km-text: rgba(0, 0, 0, 0.88);
|
||||
--km-search-border: #f0f0f0;
|
||||
--km-card-border: #e6e9ef;
|
||||
--km-card-shadow: 0 4px 24px rgba(15, 23, 42, 0.02);
|
||||
--km-head-bg: #f8f9fc;
|
||||
--km-head-text: #687589;
|
||||
--km-row-split: #f0f0f0;
|
||||
--km-code-bg: #f4f6f9;
|
||||
--km-code-border: #e4e9ee;
|
||||
--km-primary: var(--ui-color-primary);
|
||||
background: var(--km-page-bg);
|
||||
}
|
||||
html.dark .km-page {
|
||||
--km-page-bg: var(--surface-bg-base);
|
||||
--km-text: var(--uc-heading);
|
||||
--km-search-border: var(--border-subtle);
|
||||
--km-card-border: var(--border-subtle);
|
||||
--km-card-shadow: none;
|
||||
--km-head-bg: var(--ui-color-fill-0);
|
||||
--km-head-text: var(--text-secondary);
|
||||
--km-row-split: var(--border-subtle);
|
||||
--km-code-bg: var(--surface-bg-base);
|
||||
--km-code-border: var(--border-subtle);
|
||||
}
|
||||
|
||||
/* 页头与上边距沿用用户中心统一规格(.uc-page:30/36px,面包屑 24px),不再单独覆盖。 */
|
||||
|
||||
/* 独立路由(非用户中心嵌入)沿用顶栏偏移 */
|
||||
.km-page-standalone .km-content.uc-page {
|
||||
padding-top: 100px;
|
||||
}
|
||||
|
||||
.km-notice.ant-alert {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.km-panels {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
/* 卡片:查询卡为 Ant Design 默认描边;列表卡描边 #e6e9ef + 极浅投影(设计图可见),圆角 10px,内边距 24px */
|
||||
.km-page .km-card.ant-card {
|
||||
border-radius: 10px;
|
||||
color: var(--km-text);
|
||||
}
|
||||
.km-page .km-card > .ant-card-body {
|
||||
padding: 24px;
|
||||
}
|
||||
.km-page .km-search-card.ant-card {
|
||||
border-color: var(--km-search-border);
|
||||
}
|
||||
.km-page .km-search-card > .ant-card-body {
|
||||
padding-block: 22px;
|
||||
}
|
||||
.km-page .km-list-card.ant-card {
|
||||
border-color: var(--km-card-border);
|
||||
box-shadow: var(--km-card-shadow);
|
||||
}
|
||||
|
||||
/* 查询:卡片上下内边距 22px;标签 14px/22px,下距 8px;输入 620px;输入与按钮 16px,按钮间 8px */
|
||||
.km-search-label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
color: var(--km-text);
|
||||
font-size: 14px;
|
||||
line-height: 22px;
|
||||
}
|
||||
.km-search-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.km-search-row .km-search-input {
|
||||
width: 620px;
|
||||
max-width: 100%;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
/* 列表卡头:标题 15px/600,与表格 18px(同使用记录表格卡) */
|
||||
.km-list-head {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px 16px;
|
||||
min-height: 34px;
|
||||
margin: -6px 0 18px;
|
||||
}
|
||||
.km-list-head h2 {
|
||||
margin: 0;
|
||||
color: var(--km-text);
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 24px;
|
||||
}
|
||||
.km-list-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.km-list-actions .km-contact-link.ant-btn {
|
||||
height: 24px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.km-column-settings .ant-checkbox-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
/* 表格:表头 46px、底色 #f8f9fc、常规字重;行分隔 #f0f0f0(middle 尺寸 12px 8px) */
|
||||
.km-table .ant-table-thead > tr > th {
|
||||
height: 46px;
|
||||
padding-block: 0;
|
||||
border-bottom-color: var(--km-row-split);
|
||||
background: var(--km-head-bg);
|
||||
color: var(--km-head-text);
|
||||
font-weight: 400;
|
||||
}
|
||||
.km-table .ant-table-tbody > tr > td {
|
||||
border-bottom-color: var(--km-row-split);
|
||||
color: var(--km-text);
|
||||
}
|
||||
.km-table .ant-tag {
|
||||
margin-inline-end: 0;
|
||||
}
|
||||
.km-name {
|
||||
font-weight: 700;
|
||||
}
|
||||
.km-key-cell {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
}
|
||||
.km-key-code {
|
||||
display: inline-block;
|
||||
max-width: 230px;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid var(--km-code-border);
|
||||
border-radius: 6px;
|
||||
background: var(--km-code-bg);
|
||||
color: var(--km-text);
|
||||
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
font-size: 12px;
|
||||
line-height: 21px;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
.km-key-cell .km-copy-btn.ant-btn {
|
||||
color: var(--km-primary);
|
||||
}
|
||||
.km-status-cell {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
.km-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.km-pagination {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
/* 模型列表抽屉:宽 440px,正文 20px;信息卡与分类卡描边 #e4e9ef、圆角 8px,分类头 #f6f8fa 44px;
|
||||
模型名为无边框等宽标签 #fafafa;遮罩为设计图可见的 4px 模糊(原 SideSheet 同值)。 */
|
||||
.km-models-drawer {
|
||||
--km-panel-border: #e4e9ef;
|
||||
--km-panel-head-bg: #f6f8fa;
|
||||
--km-chip-bg: #fafafa;
|
||||
--km-text: rgba(0, 0, 0, 0.88);
|
||||
--km-muted: var(--text-secondary);
|
||||
}
|
||||
html.dark .km-models-drawer {
|
||||
--km-panel-border: var(--border-subtle);
|
||||
--km-panel-head-bg: var(--ui-color-fill-0);
|
||||
--km-chip-bg: var(--ui-color-fill-0);
|
||||
--km-text: var(--uc-heading);
|
||||
}
|
||||
.km-models-drawer .ant-drawer-mask {
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.km-models-drawer .ant-drawer-content-wrapper {
|
||||
max-width: 100vw;
|
||||
}
|
||||
.km-models-drawer .ant-drawer-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
padding: 20px;
|
||||
}
|
||||
.km-models-info,
|
||||
.km-models-group {
|
||||
flex-shrink: 0;
|
||||
border: 1px solid var(--km-panel-border);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.km-models-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px;
|
||||
}
|
||||
.km-models-info dt {
|
||||
color: var(--km-muted);
|
||||
font-size: 12px;
|
||||
line-height: 18px;
|
||||
}
|
||||
.km-models-info dd {
|
||||
margin: 4px 0 0;
|
||||
color: var(--km-text);
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
line-height: 22px;
|
||||
}
|
||||
.km-models-info dd + dt {
|
||||
margin-top: 16px;
|
||||
}
|
||||
.km-models-group {
|
||||
overflow: hidden;
|
||||
}
|
||||
.km-models-group-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 45px;
|
||||
padding: 0 14px;
|
||||
border-bottom: 1px solid var(--km-panel-border);
|
||||
background: var(--km-panel-head-bg);
|
||||
color: var(--km-text);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.km-models-group-head span {
|
||||
color: var(--km-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.km-models-group-body {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 9.5px 8px;
|
||||
padding: 14px;
|
||||
}
|
||||
.km-models-group-body .km-model-chip.ant-tag {
|
||||
margin: 0;
|
||||
padding: 3px 7px;
|
||||
border-radius: 4px;
|
||||
background: var(--km-chip-bg);
|
||||
color: var(--km-text);
|
||||
font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.km-models-group-body .km-model-chip.ant-tag:hover,
|
||||
.km-models-group-body .km-model-chip.ant-tag:focus-visible {
|
||||
color: var(--ui-color-primary);
|
||||
}
|
||||
.km-models-state {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 48px 0;
|
||||
}
|
||||
|
||||
/* 创建/编辑抽屉:宽 560px,Ant Design 默认表单/折叠面板;过期时间按钮间距 6px,页脚按钮间距 10px。
|
||||
设计图正文带经典滚动条(字段宽 497px),预留稳定滚动条槽位,展开/收起高级设置时布局不跳动。 */
|
||||
.km-edit-drawer {
|
||||
--km-preset-border: #d9dfe6;
|
||||
}
|
||||
html.dark .km-edit-drawer {
|
||||
--km-preset-border: var(--ui-color-border);
|
||||
}
|
||||
.km-edit-drawer .ant-drawer-body {
|
||||
scrollbar-gutter: stable;
|
||||
}
|
||||
.km-edit-drawer .km-expire-presets .ant-btn-color-default:not(:hover),
|
||||
.km-edit-drawer .km-expire-presets .km-preset-custom:not(:hover) {
|
||||
border-color: var(--km-preset-border);
|
||||
}
|
||||
/* 设计图:过期快捷按钮(含选中态)无 Ant 默认的 0 2px 0 底部阴影。 */
|
||||
.km-edit-drawer .km-expire-presets .ant-btn {
|
||||
box-shadow: none;
|
||||
}
|
||||
.km-edit-drawer .km-expire-presets {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
/* 设计图 5 张抽屉实测:相邻按钮边框间空白 5px(二次回归修正,原记 6px)。 */
|
||||
gap: 5px;
|
||||
}
|
||||
.km-edit-drawer .km-expire-picker {
|
||||
width: 100%;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.km-edit-drawer .km-section-title {
|
||||
margin: 0 0 18px;
|
||||
color: inherit;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
line-height: 22px;
|
||||
}
|
||||
.km-edit-drawer .km-hidden-field {
|
||||
display: none;
|
||||
}
|
||||
.km-edit-drawer .km-drawer-footer {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.km-page-standalone .km-content.uc-page {
|
||||
padding-top: 80px;
|
||||
}
|
||||
.km-search-row .km-search-input {
|
||||
width: 100%;
|
||||
margin-right: 0;
|
||||
}
|
||||
.km-list-head {
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
|
||||
import React from 'react';
|
||||
import WeeLogo from '../components/common/logo/WeeLogo';
|
||||
import { Card, Typography } from '@douyinfe/semi-ui';
|
||||
import { Card, Typography } from '@/components/ui';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Card, Row, Col, Table, Spin } from '@douyinfe/semi-ui';
|
||||
import { Card, Row, Col, Table, Spin } from '@/components/ui';
|
||||
import {
|
||||
TrendingUp,
|
||||
DollarSign,
|
||||
@@ -129,7 +129,7 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
background:
|
||||
'linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, rgba(24, 144, 255, 0.01) 100%)',
|
||||
border: '1px solid var(--semi-color-border)',
|
||||
border: '1px solid var(--ui-color-border)',
|
||||
borderRadius: '12px',
|
||||
height: '100%',
|
||||
}}
|
||||
@@ -153,7 +153,7 @@ const AdminMonitor = () => {
|
||||
<div
|
||||
style={{
|
||||
fontSize: '13px',
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
marginBottom: '4px',
|
||||
}}
|
||||
>
|
||||
@@ -163,7 +163,7 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
fontSize: '28px',
|
||||
fontWeight: 700,
|
||||
color: 'var(--semi-color-text-0)',
|
||||
color: 'var(--ui-color-text-0)',
|
||||
lineHeight: 1,
|
||||
}}
|
||||
>
|
||||
@@ -192,7 +192,7 @@ const AdminMonitor = () => {
|
||||
justifyContent: 'space-between',
|
||||
marginBottom: '4px',
|
||||
fontSize: '12px',
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
}}
|
||||
>
|
||||
<span>{item.hour}</span>
|
||||
@@ -203,7 +203,7 @@ const AdminMonitor = () => {
|
||||
<div
|
||||
style={{
|
||||
height: '24px',
|
||||
background: 'var(--semi-color-fill-0)',
|
||||
background: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '6px',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
@@ -370,7 +370,7 @@ const AdminMonitor = () => {
|
||||
cy='50'
|
||||
r='40'
|
||||
fill='none'
|
||||
stroke='var(--semi-color-fill-0)'
|
||||
stroke='var(--ui-color-fill-0)'
|
||||
strokeWidth='0.5'
|
||||
/>
|
||||
{segments.map((segment, index) => (
|
||||
@@ -381,7 +381,7 @@ const AdminMonitor = () => {
|
||||
opacity='0.85'
|
||||
/>
|
||||
))}
|
||||
<circle cx='50' cy='50' r='20' fill='var(--semi-color-bg-1)' />
|
||||
<circle cx='50' cy='50' r='20' fill='var(--ui-color-bg-1)' />
|
||||
</svg>
|
||||
<div style={{ marginTop: '16px' }}>
|
||||
{segments.map((segment, index) => (
|
||||
@@ -421,10 +421,10 @@ const AdminMonitor = () => {
|
||||
const renderGaugeChart = (percentage) => {
|
||||
const color =
|
||||
percentage >= 90
|
||||
? 'var(--semi-color-danger)'
|
||||
? 'var(--ui-color-danger)'
|
||||
: percentage >= 75
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-success)';
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-success)';
|
||||
|
||||
return (
|
||||
<div style={{ textAlign: 'center', padding: '20px 0' }}>
|
||||
@@ -432,7 +432,7 @@ const AdminMonitor = () => {
|
||||
<path
|
||||
d='M 10 50 A 40 40 0 0 1 90 50'
|
||||
fill='none'
|
||||
stroke='var(--semi-color-fill-0)'
|
||||
stroke='var(--ui-color-fill-0)'
|
||||
strokeWidth='8'
|
||||
strokeLinecap='round'
|
||||
/>
|
||||
@@ -451,7 +451,7 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
fontSize: '18px',
|
||||
fontWeight: 700,
|
||||
fill: 'var(--semi-color-text-0)',
|
||||
fill: 'var(--ui-color-text-0)',
|
||||
}}
|
||||
>
|
||||
{percentage}%
|
||||
@@ -461,7 +461,7 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
marginTop: '8px',
|
||||
fontSize: '12px',
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
}}
|
||||
>
|
||||
{percentage >= 90 && t('配额即将用尽')}
|
||||
@@ -487,11 +487,11 @@ const AdminMonitor = () => {
|
||||
fontSize: '13px',
|
||||
}}
|
||||
>
|
||||
<span style={{ color: 'var(--semi-color-text-1)' }}>
|
||||
<span style={{ color: 'var(--ui-color-text-1)' }}>
|
||||
{item.type}
|
||||
</span>
|
||||
<span
|
||||
style={{ fontWeight: 600, color: 'var(--semi-color-text-0)' }}
|
||||
style={{ fontWeight: 600, color: 'var(--ui-color-text-0)' }}
|
||||
>
|
||||
{item.count}
|
||||
</span>
|
||||
@@ -499,7 +499,7 @@ const AdminMonitor = () => {
|
||||
<div
|
||||
style={{
|
||||
height: '20px',
|
||||
background: 'var(--semi-color-fill-0)',
|
||||
background: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '10px',
|
||||
overflow: 'hidden',
|
||||
}}
|
||||
@@ -544,8 +544,8 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
color:
|
||||
text > 500
|
||||
? 'var(--semi-color-danger)'
|
||||
: 'var(--semi-color-success)',
|
||||
? 'var(--ui-color-danger)'
|
||||
: 'var(--ui-color-success)',
|
||||
}}
|
||||
>
|
||||
{text}
|
||||
@@ -578,10 +578,10 @@ const AdminMonitor = () => {
|
||||
style={{
|
||||
color:
|
||||
rate >= 99
|
||||
? 'var(--semi-color-success)'
|
||||
? 'var(--ui-color-success)'
|
||||
: rate >= 95
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-danger)',
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-danger)',
|
||||
}}
|
||||
>
|
||||
{text}%
|
||||
@@ -603,16 +603,16 @@ const AdminMonitor = () => {
|
||||
<div className='admin-monitor'>
|
||||
<style>
|
||||
{`
|
||||
.admin-monitor .semi-card {
|
||||
.admin-monitor .ant-card {
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.admin-monitor .semi-card:hover {
|
||||
.admin-monitor .ant-card:hover {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.chart-card {
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
borderRadius: 12px;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Card, Row, Col, Badge, Empty, Spin } from '@douyinfe/semi-ui';
|
||||
import { Card, Row, Col, Badge, Empty, Spin } from '@/components/ui';
|
||||
import { Activity, Zap } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
@@ -96,19 +96,19 @@ const ChannelMonitor = () => {
|
||||
const getStatusConfig = (status) => {
|
||||
const configs = {
|
||||
available: {
|
||||
color: 'var(--semi-color-success)',
|
||||
color: 'var(--ui-color-success)',
|
||||
bgColor: 'rgba(82, 196, 26, 0.1)',
|
||||
text: t('可用'),
|
||||
dotColor: 'success',
|
||||
},
|
||||
busy: {
|
||||
color: 'var(--semi-color-warning)',
|
||||
color: 'var(--ui-color-warning)',
|
||||
bgColor: 'rgba(250, 173, 20, 0.1)',
|
||||
text: t('繁忙'),
|
||||
dotColor: 'warning',
|
||||
},
|
||||
unavailable: {
|
||||
color: 'var(--semi-color-danger)',
|
||||
color: 'var(--ui-color-danger)',
|
||||
bgColor: 'rgba(255, 77, 79, 0.1)',
|
||||
text: t('不可用'),
|
||||
dotColor: 'danger',
|
||||
@@ -126,25 +126,25 @@ const ChannelMonitor = () => {
|
||||
const getSpeedConfig = (speed) => {
|
||||
const configs = {
|
||||
fast: {
|
||||
color: 'var(--semi-color-success)',
|
||||
color: 'var(--ui-color-success)',
|
||||
width: '85%',
|
||||
text: t('快'),
|
||||
gradient:
|
||||
'linear-gradient(90deg, var(--semi-color-success) 0%, #95de64 100%)',
|
||||
'linear-gradient(90deg, var(--ui-color-success) 0%, #95de64 100%)',
|
||||
},
|
||||
medium: {
|
||||
color: 'var(--semi-color-warning)',
|
||||
color: 'var(--ui-color-warning)',
|
||||
width: '60%',
|
||||
text: t('中等'),
|
||||
gradient:
|
||||
'linear-gradient(90deg, var(--semi-color-warning) 0%, #ffd666 100%)',
|
||||
'linear-gradient(90deg, var(--ui-color-warning) 0%, #ffd666 100%)',
|
||||
},
|
||||
slow: {
|
||||
color: 'var(--semi-color-danger)',
|
||||
color: 'var(--ui-color-danger)',
|
||||
width: '35%',
|
||||
text: t('慢'),
|
||||
gradient:
|
||||
'linear-gradient(90deg, var(--semi-color-danger) 0%, #ff7875 100%)',
|
||||
'linear-gradient(90deg, var(--ui-color-danger) 0%, #ff7875 100%)',
|
||||
},
|
||||
};
|
||||
return configs[speed] || configs.medium;
|
||||
@@ -168,10 +168,10 @@ const ChannelMonitor = () => {
|
||||
const avgStability = data.reduce((a, b) => a + b, 0) / data.length;
|
||||
const lineColor =
|
||||
avgStability >= 95
|
||||
? 'var(--semi-color-success)'
|
||||
? 'var(--ui-color-success)'
|
||||
: avgStability >= 85
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-danger)';
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-danger)';
|
||||
|
||||
return (
|
||||
<svg
|
||||
@@ -232,7 +232,7 @@ const ChannelMonitor = () => {
|
||||
{`
|
||||
.channel-card {
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
border: 1px solid var(--semi-color-border);
|
||||
border: 1px solid var(--ui-color-border);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -240,7 +240,7 @@ const ChannelMonitor = () => {
|
||||
.channel-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
|
||||
border-color: var(--semi-color-primary);
|
||||
border-color: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.channel-card::before {
|
||||
@@ -250,7 +250,7 @@ const ChannelMonitor = () => {
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 3px;
|
||||
background: linear-gradient(90deg, var(--semi-color-primary) 0%, var(--semi-color-primary-light-default) 100%);
|
||||
background: linear-gradient(90deg, var(--ui-color-primary) 0%, var(--ui-color-primary-light-default) 100%);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ const ChannelMonitor = () => {
|
||||
.speed-bar-container {
|
||||
position: relative;
|
||||
height: 24px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
@@ -303,18 +303,18 @@ const ChannelMonitor = () => {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 8px;
|
||||
background: var(--semi-color-fill-0);
|
||||
background: var(--ui-color-fill-0);
|
||||
}
|
||||
|
||||
.metric-value {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
color: var(--semi-color-text-0);
|
||||
color: var(--ui-color-text-0);
|
||||
}
|
||||
|
||||
.metric-label {
|
||||
font-size: 12px;
|
||||
color: var(--semi-color-text-2);
|
||||
color: var(--ui-color-text-2);
|
||||
}
|
||||
`}
|
||||
</style>
|
||||
@@ -346,7 +346,7 @@ const ChannelMonitor = () => {
|
||||
margin: 0,
|
||||
fontSize: '16px',
|
||||
fontWeight: 600,
|
||||
color: 'var(--semi-color-text-0)',
|
||||
color: 'var(--ui-color-text-0)',
|
||||
}}
|
||||
>
|
||||
{channel.name}
|
||||
@@ -387,7 +387,7 @@ const ChannelMonitor = () => {
|
||||
style={{
|
||||
fontSize: '13px',
|
||||
fontWeight: 500,
|
||||
color: 'var(--semi-color-text-1)',
|
||||
color: 'var(--ui-color-text-1)',
|
||||
}}
|
||||
>
|
||||
<Zap
|
||||
@@ -399,7 +399,7 @@ const ChannelMonitor = () => {
|
||||
<span
|
||||
style={{
|
||||
fontSize: '12px',
|
||||
color: 'var(--semi-color-text-2)',
|
||||
color: 'var(--ui-color-text-2)',
|
||||
}}
|
||||
>
|
||||
{Math.round(channel.speedMs)}ms
|
||||
@@ -432,7 +432,7 @@ const ChannelMonitor = () => {
|
||||
style={{
|
||||
fontSize: '13px',
|
||||
fontWeight: 500,
|
||||
color: 'var(--semi-color-text-1)',
|
||||
color: 'var(--ui-color-text-1)',
|
||||
}}
|
||||
>
|
||||
<Activity
|
||||
@@ -447,10 +447,10 @@ const ChannelMonitor = () => {
|
||||
fontWeight: 600,
|
||||
color:
|
||||
channel.uptime >= 99
|
||||
? 'var(--semi-color-success)'
|
||||
? 'var(--ui-color-success)'
|
||||
: channel.uptime >= 95
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-danger)',
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-danger)',
|
||||
}}
|
||||
>
|
||||
{channel.uptime.toFixed(2)}%
|
||||
@@ -458,7 +458,7 @@ const ChannelMonitor = () => {
|
||||
</div>
|
||||
<div
|
||||
style={{
|
||||
background: 'var(--semi-color-fill-0)',
|
||||
background: 'var(--ui-color-fill-0)',
|
||||
borderRadius: '8px',
|
||||
padding: '8px',
|
||||
}}
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { Tabs, Card } from '@douyinfe/semi-ui';
|
||||
import { Tabs, Card } from '@/components/ui';
|
||||
import { Activity, Shield } from 'lucide-react';
|
||||
import ChannelMonitor from './ChannelMonitor';
|
||||
import AdminMonitor from './AdminMonitor';
|
||||
|
||||
@@ -25,8 +25,8 @@ import {
|
||||
Progress,
|
||||
Empty,
|
||||
Button,
|
||||
} from '@douyinfe/semi-ui';
|
||||
import { IconRefresh, IconAlertCircle } from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui';
|
||||
import { IconRefresh, IconAlertCircle } from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
const { Row, Col } = Grid;
|
||||
@@ -87,10 +87,10 @@ const ChannelMonitorView = ({ channelStatus, onRefresh }) => {
|
||||
fill='none'
|
||||
stroke={
|
||||
uptime > 0.9
|
||||
? 'var(--semi-color-success)'
|
||||
? 'var(--ui-color-success)'
|
||||
: uptime > 0.7
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-danger)'
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-danger)'
|
||||
}
|
||||
strokeWidth='2'
|
||||
/>
|
||||
|
||||
@@ -24,12 +24,12 @@ import {
|
||||
Typography,
|
||||
Spin,
|
||||
Toast,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
IconActivity,
|
||||
IconLineChart,
|
||||
IconPulse,
|
||||
} from '@douyinfe/semi-icons';
|
||||
} from '@/components/ui/icons';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import ChannelMonitorView from './components/ChannelMonitorView';
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
Table,
|
||||
Tag,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, showError, showSuccess } from '../../helpers';
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Empty } from '@douyinfe/semi-ui';
|
||||
import { Empty } from '@/components/ui';
|
||||
import {
|
||||
IllustrationNotFound,
|
||||
IllustrationNotFoundDark,
|
||||
|
||||
+130
-82
@@ -19,6 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
import React, { useContext, useEffect, useRef, useState } from 'react';
|
||||
import { useNavigate, useParams, useSearchParams } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Form as AntForm } from 'antd';
|
||||
import {
|
||||
Button,
|
||||
Form,
|
||||
@@ -30,7 +31,7 @@ import {
|
||||
Spin,
|
||||
Checkbox,
|
||||
Modal,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, getLogo, getSystemName } from '../../helpers';
|
||||
import {
|
||||
@@ -67,7 +68,10 @@ const OrgLogin = () => {
|
||||
const directLoginEnabled = !!statusState?.status?.org_direct_login;
|
||||
// 免企业标识直登(方案 §12):'direct'=账号直登(默认),'identifier'=企业标识登录(原流程/回退)
|
||||
const [loginMode, setLoginMode] = useState('direct');
|
||||
const [directForm, setDirectForm] = useState({ login_name: '', password: '' });
|
||||
const [directForm, setDirectForm] = useState({
|
||||
login_name: '',
|
||||
password: '',
|
||||
});
|
||||
const [multiMatch, setMultiMatch] = useState(null); // { orgs:[{index,org_id,name,logo}], ticket, password }
|
||||
// 带入 Step2 初值的登录名,避免重复输入:来自 ?login= 预填(注册成功直达)或直登回退时已输的登录名
|
||||
const [pendingLoginName, setPendingLoginName] = useState(loginParam);
|
||||
@@ -290,7 +294,10 @@ const OrgLogin = () => {
|
||||
if (loading) return;
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await API.post('/api/org/login/direct', { login_name, password });
|
||||
const res = await API.post('/api/org/login/direct', {
|
||||
login_name,
|
||||
password,
|
||||
});
|
||||
if (res.data.success) {
|
||||
const data = res.data.data;
|
||||
if (data.need_org_hint) {
|
||||
@@ -300,7 +307,11 @@ const OrgLogin = () => {
|
||||
return;
|
||||
}
|
||||
if (data.multi) {
|
||||
setMultiMatch({ orgs: data.orgs || [], ticket: data.ticket, password });
|
||||
setMultiMatch({
|
||||
orgs: data.orgs || [],
|
||||
ticket: data.ticket,
|
||||
password,
|
||||
});
|
||||
return;
|
||||
}
|
||||
await applyLoginSuccess(data, login_name, password);
|
||||
@@ -416,7 +427,7 @@ const OrgLogin = () => {
|
||||
|
||||
return (
|
||||
<div
|
||||
className='relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
|
||||
className='auth-login-page relative overflow-hidden flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8'
|
||||
// 抵扣 PageLayout 跑马灯占位高度,保证占位+容器恰为一屏,避免幽灵滚动
|
||||
style={{ minHeight: 'calc(100vh - var(--content-top-offset, 0px))' }}
|
||||
>
|
||||
@@ -438,7 +449,7 @@ const OrgLogin = () => {
|
||||
)}
|
||||
<GlassCard>
|
||||
<AuthCardHeader
|
||||
wrapperClassName='mb-6'
|
||||
wrapperClassName='mb-3'
|
||||
logo={logo}
|
||||
logoNode={
|
||||
orgInfo?.logo ? (
|
||||
@@ -471,33 +482,53 @@ const OrgLogin = () => {
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div key={step} className='org-step-enter auth-glass-form'>
|
||||
<div key={step} className='org-step-enter auth-login-form'>
|
||||
{step === 1 && (
|
||||
<div className='flex flex-col gap-4'>
|
||||
<AntForm
|
||||
layout='vertical'
|
||||
component='div'
|
||||
className='auth-login-fields'
|
||||
>
|
||||
{effectiveMode === 'direct' ? (
|
||||
<>
|
||||
{/* 账号直登:输登录名 + 密码,系统自动定位企业(方案 §12) */}
|
||||
<Input
|
||||
value={directForm.login_name}
|
||||
onChange={(v) =>
|
||||
setDirectForm({ ...directForm, login_name: v })
|
||||
}
|
||||
placeholder={t('登录名')}
|
||||
size='large'
|
||||
autoFocus
|
||||
/>
|
||||
<Input
|
||||
value={directForm.password}
|
||||
onChange={(v) =>
|
||||
setDirectForm({ ...directForm, password: v })
|
||||
}
|
||||
mode='password'
|
||||
placeholder={t('密码')}
|
||||
size='large'
|
||||
onKeyDown={handleCapsLock}
|
||||
onKeyUp={handleCapsLock}
|
||||
onEnterPress={doDirectLogin}
|
||||
/>
|
||||
<AntForm.Item
|
||||
label={t('登录名')}
|
||||
htmlFor='org-direct-login-name'
|
||||
required
|
||||
>
|
||||
<Input
|
||||
id='org-direct-login-name'
|
||||
aria-required='true'
|
||||
value={directForm.login_name}
|
||||
onChange={(v) =>
|
||||
setDirectForm({ ...directForm, login_name: v })
|
||||
}
|
||||
placeholder={t('请输入登录名')}
|
||||
size='default'
|
||||
autoFocus
|
||||
/>
|
||||
</AntForm.Item>
|
||||
<AntForm.Item
|
||||
label={t('密码')}
|
||||
htmlFor='org-direct-password'
|
||||
required
|
||||
>
|
||||
<Input
|
||||
id='org-direct-password'
|
||||
aria-required='true'
|
||||
value={directForm.password}
|
||||
onChange={(v) =>
|
||||
setDirectForm({ ...directForm, password: v })
|
||||
}
|
||||
mode='password'
|
||||
placeholder={t('请输入密码')}
|
||||
size='default'
|
||||
onKeyDown={handleCapsLock}
|
||||
onKeyUp={handleCapsLock}
|
||||
onEnterPress={doDirectLogin}
|
||||
/>
|
||||
</AntForm.Item>
|
||||
{capsOn && (
|
||||
<div className='text-xs text-amber-500 -mt-1'>
|
||||
{t('大写锁定已开启')}
|
||||
@@ -505,7 +536,7 @@ const OrgLogin = () => {
|
||||
)}
|
||||
<Button
|
||||
theme='solid'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
loading={loading}
|
||||
disabled={
|
||||
@@ -517,7 +548,7 @@ const OrgLogin = () => {
|
||||
</Button>
|
||||
<Button
|
||||
theme='borderless'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
className='!text-gray-500'
|
||||
onClick={() => setLoginMode('identifier')}
|
||||
@@ -527,43 +558,51 @@ const OrgLogin = () => {
|
||||
</>
|
||||
) : (
|
||||
<>
|
||||
<AutoComplete
|
||||
value={identifier}
|
||||
data={suggestOptions}
|
||||
onChange={(v) =>
|
||||
setIdentifier(typeof v === 'string' ? v : '')
|
||||
}
|
||||
onSearch={handleSuggestSearch}
|
||||
onSelect={(code) => {
|
||||
setIdentifier(code);
|
||||
lookupOrg(code); // 选中候选:用 code 精确直达 Step2
|
||||
}}
|
||||
onEnterPress={lookupOrg} // 未选候选时按当前输入精确解析
|
||||
placeholder={t('输入企业名称、企业代码或登录短链')}
|
||||
emptyContent={null}
|
||||
renderItem={(item) => (
|
||||
<div className='flex items-center gap-2 py-0.5'>
|
||||
{item.logo ? (
|
||||
<Avatar
|
||||
src={item.logo}
|
||||
shape='square'
|
||||
className='h-6 w-6 rounded'
|
||||
/>
|
||||
) : (
|
||||
<div className='h-6 w-6 rounded bg-gray-100 dark:bg-white/10' />
|
||||
)}
|
||||
<span className='truncate'>
|
||||
{highlightMatch(item.name, identifier)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
style={{ width: '100%' }}
|
||||
size='large'
|
||||
autoFocus
|
||||
/>
|
||||
<AntForm.Item
|
||||
label={t('企业名称/代码')}
|
||||
htmlFor='org-login-identifier'
|
||||
required
|
||||
>
|
||||
<AutoComplete
|
||||
id='org-login-identifier'
|
||||
aria-required='true'
|
||||
value={identifier}
|
||||
data={suggestOptions}
|
||||
onChange={(v) =>
|
||||
setIdentifier(typeof v === 'string' ? v : '')
|
||||
}
|
||||
onSearch={handleSuggestSearch}
|
||||
onSelect={(code) => {
|
||||
setIdentifier(code);
|
||||
lookupOrg(code); // 选中候选:用 code 精确直达 Step2
|
||||
}}
|
||||
onEnterPress={lookupOrg} // 未选候选时按当前输入精确解析
|
||||
placeholder={t('输入企业名称、企业代码或登录短链')}
|
||||
emptyContent={null}
|
||||
renderItem={(item) => (
|
||||
<div className='flex items-center gap-2 py-0.5'>
|
||||
{item.logo ? (
|
||||
<Avatar
|
||||
src={item.logo}
|
||||
shape='square'
|
||||
className='h-6 w-6 rounded'
|
||||
/>
|
||||
) : (
|
||||
<div className='h-6 w-6 rounded bg-gray-100 dark:bg-white/10' />
|
||||
)}
|
||||
<span className='truncate'>
|
||||
{highlightMatch(item.name, identifier)}
|
||||
</span>
|
||||
</div>
|
||||
)}
|
||||
style={{ width: '100%' }}
|
||||
size='default'
|
||||
autoFocus
|
||||
/>
|
||||
</AntForm.Item>
|
||||
<Button
|
||||
theme='solid'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
loading={loading}
|
||||
disabled={!identifier.trim()}
|
||||
@@ -574,7 +613,7 @@ const OrgLogin = () => {
|
||||
{directLoginEnabled && (
|
||||
<Button
|
||||
theme='borderless'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
className='!text-gray-500'
|
||||
onClick={() => setLoginMode('direct')}
|
||||
@@ -594,7 +633,7 @@ const OrgLogin = () => {
|
||||
</div>
|
||||
<Button
|
||||
theme='borderless'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
className='!text-brand'
|
||||
onClick={() => navigate('/org/register')}
|
||||
@@ -603,7 +642,7 @@ const OrgLogin = () => {
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</AntForm>
|
||||
)}
|
||||
|
||||
{step === 2 && (
|
||||
@@ -613,17 +652,21 @@ const OrgLogin = () => {
|
||||
>
|
||||
<Form.Input
|
||||
field='login_name'
|
||||
className='auth-login-required-field'
|
||||
label={t('企业内登录名')}
|
||||
size='large'
|
||||
placeholder={t('请输入登录名')}
|
||||
size='default'
|
||||
autoFocus={!prefilledLoginName}
|
||||
autoComplete='username'
|
||||
rules={[{ required: true, message: t('请输入登录名') }]}
|
||||
/>
|
||||
<Form.Input
|
||||
field='password'
|
||||
className='auth-login-required-field'
|
||||
label={t('密码')}
|
||||
placeholder={t('请输入密码')}
|
||||
mode='password'
|
||||
size='large'
|
||||
size='default'
|
||||
autoFocus={Boolean(prefilledLoginName)}
|
||||
autoComplete='current-password'
|
||||
onKeyDown={handleCapsLock}
|
||||
@@ -637,20 +680,19 @@ const OrgLogin = () => {
|
||||
)}
|
||||
<div className='flex items-center justify-between'>
|
||||
<Checkbox
|
||||
className='auth-login-remember'
|
||||
checked={rememberLoginName}
|
||||
onChange={(e) => setRememberLoginName(e.target.checked)}
|
||||
>
|
||||
<span className='text-xs text-gray-500 dark:text-gray-400'>
|
||||
{t('记住登录名')}
|
||||
</span>
|
||||
<span className='text-xs'>{t('记住登录名')}</span>
|
||||
</Checkbox>
|
||||
<span className='text-xs text-gray-400 dark:text-gray-500'>
|
||||
<span className='auth-login-admin-help text-xs'>
|
||||
{t('忘记密码?请联系企业管理员重置')}
|
||||
</span>
|
||||
</div>
|
||||
<Button
|
||||
theme='solid'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
htmlType='submit'
|
||||
loading={loading}
|
||||
@@ -659,8 +701,8 @@ const OrgLogin = () => {
|
||||
{t('登录')}
|
||||
</Button>
|
||||
<Button
|
||||
theme='borderless'
|
||||
size='large'
|
||||
theme='solid'
|
||||
size='default'
|
||||
block
|
||||
disabled={loading}
|
||||
style={{ marginTop: 8 }}
|
||||
@@ -687,8 +729,9 @@ const OrgLogin = () => {
|
||||
<Form.Input
|
||||
field='new_password'
|
||||
label={t('新密码(8-20 位)')}
|
||||
placeholder={t('请输入新密码')}
|
||||
mode='password'
|
||||
size='large'
|
||||
size='default'
|
||||
autoFocus
|
||||
autoComplete='new-password'
|
||||
onKeyDown={handleCapsLock}
|
||||
@@ -703,8 +746,9 @@ const OrgLogin = () => {
|
||||
<Form.Input
|
||||
field='confirm_password'
|
||||
label={t('确认新密码')}
|
||||
placeholder={t('请再次输入新密码')}
|
||||
mode='password'
|
||||
size='large'
|
||||
size='default'
|
||||
autoComplete='new-password'
|
||||
onKeyDown={handleCapsLock}
|
||||
onKeyUp={handleCapsLock}
|
||||
@@ -722,7 +766,7 @@ const OrgLogin = () => {
|
||||
)}
|
||||
<Button
|
||||
theme='solid'
|
||||
size='large'
|
||||
size='default'
|
||||
block
|
||||
htmlType='submit'
|
||||
loading={loading}
|
||||
@@ -758,7 +802,11 @@ const OrgLogin = () => {
|
||||
className='flex items-center gap-3 w-full p-3 rounded-xl border border-gray-200/80 dark:border-white/10 hover:bg-gray-50 dark:hover:bg-white/[0.06] transition-all text-left disabled:opacity-50'
|
||||
>
|
||||
{o.logo ? (
|
||||
<Avatar src={o.logo} shape='square' className='h-8 w-8 rounded-lg' />
|
||||
<Avatar
|
||||
src={o.logo}
|
||||
shape='square'
|
||||
className='h-8 w-8 rounded-lg'
|
||||
/>
|
||||
) : (
|
||||
<div className='h-8 w-8 rounded-lg bg-gray-100 dark:bg-white/10' />
|
||||
)}
|
||||
|
||||
@@ -20,7 +20,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
import React, { useContext, useRef, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Form, Button, Toast, Banner } from '@douyinfe/semi-ui';
|
||||
import { Form, Button, Toast, Banner } from '@/components/ui';
|
||||
import Turnstile from 'react-turnstile';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, getLogo, getSystemName } from '../../helpers';
|
||||
@@ -212,11 +212,11 @@ const OrgRegister = () => {
|
||||
) : (
|
||||
<>
|
||||
<style>{`
|
||||
.org-register-form .semi-form-field {
|
||||
.org-register-form .ant-form-item {
|
||||
margin-bottom: 14px !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
.org-register-form .semi-form-field-label {
|
||||
.org-register-form .ant-form-item-label {
|
||||
margin-bottom: 6px !important;
|
||||
}
|
||||
`}</style>
|
||||
|
||||
@@ -30,10 +30,11 @@ import {
|
||||
Tag,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import './org-experts.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
@@ -155,6 +156,7 @@ const OrgAgentAudit = ({ orgId, canAuditContent, canManagePolicy }) => {
|
||||
<main className='org-expert-page'>
|
||||
<header className='org-audit-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={3}>{t('Agent 任务审计')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
Tooltip,
|
||||
Tabs,
|
||||
TabPane,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { useOrgAuditLogs } from '../../hooks/org/useOrgData';
|
||||
import OrgPageHeader from './components/OrgPageHeader';
|
||||
@@ -403,7 +403,7 @@ const OrgAudit = ({ orgId }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('审计日志')}
|
||||
subtitle={t('查看企业操作记录')}
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
Progress,
|
||||
Banner,
|
||||
Popconfirm,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus, Pencil, Trash2 } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
@@ -316,7 +316,7 @@ const OrgBudgets = ({ orgId }) => {
|
||||
<Progress
|
||||
percent={pct}
|
||||
size='small'
|
||||
stroke={pct >= 90 ? 'var(--semi-color-danger)' : undefined}
|
||||
stroke={pct >= 90 ? 'var(--ui-color-danger)' : undefined}
|
||||
/>
|
||||
<span className='text-xs text-gray-500'>
|
||||
{renderQuota(r.used_in_cycle, 2)}
|
||||
@@ -389,7 +389,7 @@ const OrgBudgets = ({ orgId }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('预算中心')}
|
||||
subtitle={t('部门 / 项目 / 成员的额度上限')}
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
Tag,
|
||||
TextArea,
|
||||
Toast,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Cable, KeyRound, Plus, RefreshCw, ShieldCheck } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers/api';
|
||||
@@ -41,6 +41,7 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-connectors.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const headersFor = (orgId) => ({ 'X-Org-Id': String(orgId) });
|
||||
const blankConnector = {
|
||||
@@ -352,6 +353,7 @@ const OrgConnectors = ({ orgId }) => {
|
||||
<main className='org-connector-page'>
|
||||
<header className='org-connector-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<h1>{t('业务系统连接器')}</h1>
|
||||
<p>{t('凭据、授权范围、写操作确认和调用审计在同一控制面闭环。')}</p>
|
||||
</div>
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
AlertTriangle,
|
||||
RefreshCw,
|
||||
} from 'lucide-react';
|
||||
import { Input, Button, Toast } from '@douyinfe/semi-ui';
|
||||
import { Input, Button, Toast } from '@/components/ui';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
import { UserContext } from '../../context/User';
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
Input,
|
||||
Spin,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useOrgDashboard, useOrgQuota } from '../../hooks/org/useOrgData';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
import { API, showError } from '../../helpers';
|
||||
@@ -82,10 +82,10 @@ const safeQuotaNumber = (value) => Math.max(0, Number(value || 0));
|
||||
// 统一走这一套:>80% 危险、>60% 警告、其余正常。
|
||||
const usageStrokeColor = (percent) =>
|
||||
percent > 80
|
||||
? 'var(--semi-color-danger)'
|
||||
? 'var(--ui-color-danger)'
|
||||
: percent > 60
|
||||
? 'var(--semi-color-warning)'
|
||||
: 'var(--semi-color-success)';
|
||||
? 'var(--ui-color-warning)'
|
||||
: 'var(--ui-color-success)';
|
||||
|
||||
const quotaPeriodLimitLabel = (t, period) => {
|
||||
switch (period) {
|
||||
@@ -267,8 +267,8 @@ const MemberUsageSheet = ({ visible, onClose, member, orgId, t }) => {
|
||||
onCancel={onClose}
|
||||
placement='right'
|
||||
width={640}
|
||||
bodyStyle={{ background: 'var(--semi-color-bg-0)' }}
|
||||
style={{ background: 'var(--semi-color-bg-0)' }}
|
||||
bodyStyle={{ background: 'var(--ui-color-bg-0)' }}
|
||||
style={{ background: 'var(--ui-color-bg-0)' }}
|
||||
mask={true}
|
||||
maskClosable={true}
|
||||
maskStyle={{
|
||||
@@ -616,7 +616,7 @@ const OrgDashboard = ({ orgId, orgRole, featureFlags }) => {
|
||||
const unattributedQuota = Math.max(0, poolUsedQuota - memberUsedSum);
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8 space-y-6'>
|
||||
<div className='uc-page space-y-6'>
|
||||
{/* Header */}
|
||||
<OrgPageHeader
|
||||
icon={BarChart2}
|
||||
@@ -632,7 +632,6 @@ const OrgDashboard = ({ orgId, orgRole, featureFlags }) => {
|
||||
theme='solid'
|
||||
type='primary'
|
||||
onClick={() => navigate('/org/recharge')}
|
||||
className='!bg-gradient-to-r !from-emerald-500 !to-emerald-600 !border-0 !shadow-md !shadow-emerald-500/30'
|
||||
>
|
||||
{t('立即充值')}
|
||||
</Button>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Tabs, TabPane } from '@douyinfe/semi-ui';
|
||||
import { Tabs, TabPane } from '@/components/ui';
|
||||
import OrgDsPolicy from './datasecurity/OrgDsPolicy';
|
||||
import OrgDsRules from './datasecurity/OrgDsRules';
|
||||
import OrgDsTest from './datasecurity/OrgDsTest';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Banner, Button, Form, Toast, Empty, Spin } from '@douyinfe/semi-ui';
|
||||
import { Banner, Button, Form, Toast, Empty, Spin } from '@/components/ui';
|
||||
import { RefreshCw, Plus, Network } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
@@ -239,7 +239,7 @@ const OrgDepartments = ({ orgId }) => {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
icon={Network}
|
||||
title={t('部门管理')}
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Empty,
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
RefreshCw,
|
||||
Users,
|
||||
@@ -307,7 +307,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('部门管理')}
|
||||
subtitle={t('管理本部门成员额度、用量与审批')}
|
||||
@@ -379,7 +379,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
) : (
|
||||
<>
|
||||
<div className='flex gap-4 mb-4'>
|
||||
<div className='px-4 py-3 rounded-lg bg-[var(--semi-color-fill-0)]'>
|
||||
<div className='px-4 py-3 rounded-lg bg-[var(--ui-color-fill-0)]'>
|
||||
<div className='text-xs text-gray-500'>
|
||||
{t('累计消耗')}
|
||||
</div>
|
||||
@@ -387,7 +387,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
{renderQuota(stat?.quota || 0, 2)}
|
||||
</div>
|
||||
</div>
|
||||
<div className='px-4 py-3 rounded-lg bg-[var(--semi-color-fill-0)]'>
|
||||
<div className='px-4 py-3 rounded-lg bg-[var(--ui-color-fill-0)]'>
|
||||
<div className='text-xs text-gray-500'>{t('请求数')}</div>
|
||||
<div className='text-lg font-semibold'>
|
||||
{stat?.rpm || 0}
|
||||
@@ -424,7 +424,7 @@ const OrgDeptManage = ({ orgId, featureFlags }) => {
|
||||
style={{ padding: 40 }}
|
||||
/>
|
||||
) : (
|
||||
<div className='flex flex-col divide-y divide-[var(--semi-color-border)]'>
|
||||
<div className='flex flex-col divide-y divide-[var(--ui-color-border)]'>
|
||||
{requests.map((r) => (
|
||||
<div
|
||||
key={r.id}
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Activity,
|
||||
FlaskConical,
|
||||
@@ -47,6 +47,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
import './org-effectiveness.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
@@ -344,6 +345,7 @@ const OrgEffectiveness = ({ orgId, canManagePolicy, canManageSkills }) => {
|
||||
<div className='org-effect-page'>
|
||||
<header className='org-effect-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={2}>{t('效能分析')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t('回答谁在用、节省多少时间、成本是否对账、质量与安全是否改善。')}
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
@@ -41,6 +41,7 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-experts.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
@@ -336,6 +337,7 @@ const OrgExperts = ({ orgId }) => {
|
||||
<main className='org-expert-page'>
|
||||
<header className='org-expert-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={3}>{t('企业专家工坊')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
|
||||
@@ -36,7 +36,7 @@ import {
|
||||
Tag,
|
||||
TextArea,
|
||||
Toast,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
BookOpenText,
|
||||
Boxes,
|
||||
@@ -67,6 +67,7 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-knowledge.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const headersFor = (orgId) => ({ 'X-Org-Id': String(orgId) });
|
||||
// Kept in sync with the backend reindex gate: pending_reconciliation is an
|
||||
@@ -1341,6 +1342,7 @@ const OrgKnowledge = ({ orgId, canAuditContent = false }) => {
|
||||
<main className='knowledge-page'>
|
||||
<header className='knowledge-hero'>
|
||||
<div className='knowledge-hero-copy'>
|
||||
<OrgBreadcrumb />
|
||||
<div className='knowledge-eyebrow'>
|
||||
<ShieldCheck size={15} />
|
||||
<span>{t('企业可信知识层')}</span>
|
||||
|
||||
@@ -38,7 +38,7 @@ import {
|
||||
Checkbox,
|
||||
Radio,
|
||||
RadioGroup,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
useOrgMemberLogs,
|
||||
useOrgLogsStat,
|
||||
@@ -771,7 +771,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
{/* 标题栏 */}
|
||||
<OrgPageHeader
|
||||
title={canViewTeamUsage ? t('消耗明细') : t('我的消耗明细')}
|
||||
@@ -1062,7 +1062,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
</div>
|
||||
<div
|
||||
className='flex flex-wrap rounded-lg p-3'
|
||||
style={{ border: '1px solid var(--semi-color-border)' }}
|
||||
style={{ border: '1px solid var(--ui-color-border)' }}
|
||||
>
|
||||
{EXPORT_FIELDS.map((f) => (
|
||||
<div key={f.id} className='w-1/2 mb-2'>
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Banner,
|
||||
Typography,
|
||||
Tooltip,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
RefreshCw,
|
||||
UserPlus,
|
||||
@@ -479,7 +479,7 @@ const OrgMemberAccounts = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={embedded ? 'space-y-4' : 'p-4 sm:p-6 lg:p-8'}>
|
||||
<div className={embedded ? 'space-y-4' : 'uc-page'}>
|
||||
{embedded ? (
|
||||
<div className='flex items-start justify-between gap-3 flex-wrap rounded-2xl border border-dashed border-brand/25 bg-brand/5 p-4 dark:border-brand/25 dark:bg-brand/10'>
|
||||
<div className='flex items-start gap-3'>
|
||||
|
||||
@@ -41,7 +41,7 @@ import {
|
||||
Tabs,
|
||||
TabPane,
|
||||
Switch,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useOrgMembers } from '../../hooks/org/useOrgMembers';
|
||||
import { API, selectFilter, getUserIdFromLocalStorage } from '../../helpers';
|
||||
import { renderQuota } from '../../helpers/render';
|
||||
@@ -797,7 +797,7 @@ const OrgMembers = ({
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
icon={Users}
|
||||
title={t('员工管理')}
|
||||
|
||||
@@ -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 React, { useEffect, useMemo, useState } from 'react';
|
||||
import { Button, Empty, Tag } from '@douyinfe/semi-ui';
|
||||
import { Button, Empty, Tag } from '@/components/ui';
|
||||
import { Cable, LockKeyhole } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers/api';
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-connectors.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const OrgMyConnectors = ({ orgId }) => {
|
||||
const { t } = useTranslation();
|
||||
@@ -111,6 +112,7 @@ const OrgMyConnectors = ({ orgId }) => {
|
||||
<main className='org-connector-page'>
|
||||
<header className='org-connector-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb current={t('我的业务系统授权')} />
|
||||
<h1>{t('我的业务系统授权')}</h1>
|
||||
<p>{t('查看专家在任务中可代表你调用的业务系统、方法和确认策略。')}</p>
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Switch, Toast, Typography } from '@douyinfe/semi-ui';
|
||||
import { Switch, Toast, Typography } from '@/components/ui';
|
||||
import { LockKeyhole } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
@@ -33,6 +33,7 @@ import {
|
||||
PageGuideTrigger,
|
||||
} from '../../components/common/PageGuide';
|
||||
import './org-skills.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
@@ -116,6 +117,7 @@ const OrgMySkills = ({ orgId }) => {
|
||||
<main className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb current={t('我的技能')} />
|
||||
<Title heading={3}>{t('我的技能')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
Tabs,
|
||||
TabPane,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Bell,
|
||||
Building2,
|
||||
@@ -319,7 +319,7 @@ const OrgPersonalSettings = ({ orgId }) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
icon={UserCog}
|
||||
title={t('个人设置')}
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Code2, FileCheck2, OctagonX, RotateCcw } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API, getUserIdFromLocalStorage } from '../../helpers';
|
||||
@@ -40,6 +40,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
import './org-skills.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Text, Paragraph } = Typography;
|
||||
const blankSkill = {
|
||||
@@ -398,6 +399,7 @@ const OrgPrivateSkills = ({ orgId }) => {
|
||||
<div className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb current={t('企业自研 Skill')} />
|
||||
<Title heading={3}>{t('企业自研 Skill')}</Title>
|
||||
<Text type='tertiary'>
|
||||
{t(
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
Popconfirm,
|
||||
Empty,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus, Pencil } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError } from '../../helpers';
|
||||
@@ -212,7 +212,7 @@ const OrgProjectManage = ({ orgId }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('我的项目')}
|
||||
subtitle={t('管理您负责的项目成员')}
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Popconfirm,
|
||||
Tag,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Plus, Users } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
@@ -349,7 +349,7 @@ const OrgProjects = ({ orgId }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('项目管理')}
|
||||
subtitle={t('项目成员与项目预算')}
|
||||
|
||||
@@ -35,7 +35,7 @@ import {
|
||||
Tag,
|
||||
Tooltip,
|
||||
DatePicker,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { copy, getQuotaPerUnit, showError, showSuccess } from '../../helpers';
|
||||
import { API } from '../../helpers/api';
|
||||
import { useOrgPromptRecords } from '../../hooks/org/useOrgData';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Typography } from '@douyinfe/semi-ui';
|
||||
import { Typography } from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import {
|
||||
usePageGuide,
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import QualityDashboard from '../../components/quality/QualityDashboard';
|
||||
import './org-quality.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Text } = Typography;
|
||||
|
||||
@@ -78,6 +79,7 @@ const OrgQuality = ({ orgId }) => {
|
||||
<div className='org-quality-page'>
|
||||
<header className='org-quality-hero'>
|
||||
<div className='min-w-0'>
|
||||
<OrgBreadcrumb />
|
||||
<div className='org-quality-eyebrow'>{t('调用质量')}</div>
|
||||
<Title heading={3}>{t('企业调用质量')}</Title>
|
||||
<Text type='tertiary'>
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
Tag,
|
||||
InputNumber,
|
||||
Select,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
CreditCard,
|
||||
Wallet,
|
||||
@@ -516,7 +516,7 @@ const OrgRecharge = ({ orgId }) => {
|
||||
enableWechatTopUp || enableAlipayTopUp || enablePayPalTopUp;
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8 space-y-6'>
|
||||
<div className='uc-page space-y-6'>
|
||||
<OrgPageHeader title={t('企业充值')} subtitle={t('为企业账户充值额度')} />
|
||||
|
||||
{/* 签名时刻:余额展示区(本页唯一的品牌渐变区,渐变走 --brand-* token 随预设切换) */}
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Input,
|
||||
Empty,
|
||||
Popconfirm,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { RefreshCw, Check, X } from 'lucide-react';
|
||||
import { API } from '../../helpers/api';
|
||||
import { showError, collectPagedItems } from '../../helpers';
|
||||
@@ -234,7 +234,7 @@ const OrgRequests = ({ orgId, orgRole, featureFlags }) => {
|
||||
const filters = ['pending', 'approved', 'rejected', ''];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={isApprover ? t('审批中心') : t('我的申请')}
|
||||
subtitle={t('提额申请与审批')}
|
||||
|
||||
@@ -46,7 +46,7 @@ import {
|
||||
Tabs,
|
||||
TabPane,
|
||||
Switch,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import NotifyChannelForm from '../../components/settings/NotifyChannelForm';
|
||||
import { API } from '../../helpers/api';
|
||||
import {
|
||||
@@ -509,7 +509,7 @@ const OrgSettings = ({ orgId, orgRole }) => {
|
||||
const orgLoginLink = `${getServerAddress()}/org/${orgInfo.code}/login`;
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('企业设置')}
|
||||
subtitle={t(isAdmin ? '配置企业数据安全策略' : '管理企业基本信息')}
|
||||
|
||||
@@ -541,7 +541,7 @@ const OrgSidebar = ({
|
||||
relative flex flex-col h-full transition-all duration-300 ease-out
|
||||
bg-[var(--surface-sidebar)]
|
||||
border-r border-[var(--border-subtle)]
|
||||
${collapsed ? 'w-[68px]' : 'w-[240px]'}
|
||||
${collapsed ? 'w-[64px]' : 'w-[216px]'}
|
||||
`}
|
||||
>
|
||||
{/* 标题区域 */}
|
||||
@@ -583,7 +583,7 @@ const OrgSidebar = ({
|
||||
}}
|
||||
placeholder={t('搜索菜单')}
|
||||
aria-label={t('搜索菜单')}
|
||||
className='h-8 w-full rounded-lg border border-transparent bg-[var(--semi-color-fill-0)] pl-8 pr-7 text-sm text-[var(--text-primary)] outline-none transition-colors duration-200 placeholder:text-gray-400 focus:border-brand/40 focus:bg-[var(--surface-card)] dark:placeholder:text-gray-500'
|
||||
className='h-8 w-full rounded-lg border border-transparent bg-[var(--ui-color-fill-0)] pl-8 pr-7 text-sm text-[var(--text-primary)] outline-none transition-colors duration-200 placeholder:text-gray-400 focus:border-brand/40 focus:bg-[var(--surface-card)] dark:placeholder:text-gray-500'
|
||||
/>
|
||||
{searchText && (
|
||||
<button
|
||||
@@ -634,7 +634,7 @@ const OrgSidebar = ({
|
||||
type='button'
|
||||
onClick={() => toggleGroup(group.key)}
|
||||
aria-expanded={!folded}
|
||||
className='mb-1 flex w-full select-none items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400 transition-colors duration-200 hover:bg-[var(--semi-color-fill-0)] hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300'
|
||||
className='mb-1 flex w-full select-none items-center gap-1.5 rounded-md px-2 py-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400 transition-colors duration-200 hover:bg-[var(--ui-color-fill-0)] hover:text-gray-600 dark:text-gray-500 dark:hover:text-gray-300'
|
||||
>
|
||||
<span className='truncate'>{group.label}</span>
|
||||
<span className='ml-auto text-[10px] font-normal tabular-nums opacity-70'>
|
||||
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
Table,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { API } from '../../helpers';
|
||||
import {
|
||||
@@ -43,6 +43,7 @@ import {
|
||||
} from '../../components/common/PageGuide';
|
||||
import OrgPanel from './components/OrgPanel';
|
||||
import './org-skills.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Paragraph, Text } = Typography;
|
||||
|
||||
@@ -276,6 +277,7 @@ const OrgSkillAssignments = ({ orgId, orgRole = '' }) => {
|
||||
<main className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb />
|
||||
<Title heading={3}>{t('分发与锁定')}</Title>
|
||||
<Paragraph>
|
||||
{t(
|
||||
|
||||
@@ -37,7 +37,7 @@ import {
|
||||
TextArea,
|
||||
Toast,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { Search } from 'lucide-react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
@@ -57,6 +57,7 @@ import OrgPanel from './components/OrgPanel';
|
||||
import { StatusContext } from '../../context/Status';
|
||||
import { normalizeSidebarModulesAdmin } from '../../constants/sidebarModules';
|
||||
import './org-skills.css';
|
||||
import OrgBreadcrumb from './components/OrgBreadcrumb';
|
||||
|
||||
const { Title, Text, Paragraph } = Typography;
|
||||
|
||||
@@ -456,6 +457,7 @@ const OrgSkillLibrary = ({ orgId, orgRole, canAssignSkills = false }) => {
|
||||
<main className='org-skills-page'>
|
||||
<header className='org-skills-hero'>
|
||||
<div>
|
||||
<OrgBreadcrumb current={t('企业技能库')} />
|
||||
<Title heading={3}>{t('企业技能库')}</Title>
|
||||
<Paragraph>
|
||||
{t('控制启用状态、版本锁定、紧急停用和企业展示定制。')}
|
||||
|
||||
@@ -55,7 +55,7 @@ import {
|
||||
Select,
|
||||
Switch,
|
||||
TextArea,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import { useOrgTokens } from '../../hooks/org/useOrgData';
|
||||
import {
|
||||
API,
|
||||
@@ -412,7 +412,7 @@ const OrgTokens = ({ orgId, orgRole }) => {
|
||||
];
|
||||
|
||||
return (
|
||||
<div className='p-4 sm:p-6 lg:p-8'>
|
||||
<div className='uc-page'>
|
||||
<OrgPageHeader
|
||||
title={t('令牌管理')}
|
||||
subtitle={isAdmin ? t('管理企业所有API令牌') : t('管理您创建的API令牌')}
|
||||
@@ -1511,8 +1511,8 @@ const ModelsSideSheet = ({ visible, onClose, token, orgId, t }) => {
|
||||
onCancel={onClose}
|
||||
placement='right'
|
||||
width={400}
|
||||
bodyStyle={{ background: 'var(--semi-color-bg-0)' }}
|
||||
style={{ background: 'var(--semi-color-bg-0)' }}
|
||||
bodyStyle={{ background: 'var(--ui-color-bg-0)' }}
|
||||
style={{ background: 'var(--ui-color-bg-0)' }}
|
||||
mask={true}
|
||||
maskClosable={true}
|
||||
maskStyle={{
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import { timestamp2string } from '../../helpers/utils';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
@@ -29,7 +30,7 @@ import {
|
||||
Empty,
|
||||
Spin,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Wallet,
|
||||
Key,
|
||||
@@ -128,7 +129,7 @@ const isFeatureEnabled = (flags, key) => {
|
||||
|
||||
// 用量趋势小块:窗口标题 + 消耗 + 请求数
|
||||
const UsageBlock = ({ t, title, data }) => (
|
||||
<div className='flex-1 min-w-[140px] rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-card)] px-4 py-3'>
|
||||
<div className='org-workbench-usage-block'>
|
||||
<div className='text-xs font-medium text-gray-500 dark:text-gray-400 mb-1'>
|
||||
{title}
|
||||
</div>
|
||||
@@ -385,8 +386,11 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
summary?.member?.display_name || summary?.member?.username || '';
|
||||
|
||||
return (
|
||||
<div className='org-stagger p-4 sm:p-6 lg:p-8 space-y-5'>
|
||||
{/* 签名时刻:hero 问候区(每页至多一个签名渐变区,见方案 A+ 冲击力护栏) */}
|
||||
<div className='org-stagger org-workbench'>
|
||||
<Breadcrumb
|
||||
className='org-workbench-breadcrumb'
|
||||
items={[{ title: t('企业中心') }, { title: t('工作台') }]}
|
||||
/>
|
||||
<OrgHero
|
||||
eyebrow={`${getGreeting(t)}${memberName ? ',' + memberName : ''}`}
|
||||
title={summary?.organization?.name || t('企业工作台')}
|
||||
@@ -423,7 +427,7 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
/>
|
||||
|
||||
{/* 关键指标卡组 */}
|
||||
<div className='grid grid-cols-1 sm:grid-cols-2 xl:grid-cols-4 gap-4'>
|
||||
<div className='org-workbench-stats'>
|
||||
<StatCard
|
||||
icon={Coins}
|
||||
label={quotaUsageLabel}
|
||||
@@ -451,8 +455,8 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
</div>
|
||||
|
||||
{/* 我的额度进度 + 我的令牌 */}
|
||||
<div className='grid grid-cols-1 md:grid-cols-3 gap-4'>
|
||||
<OrgPanel className='md:col-span-2'>
|
||||
<div className='org-workbench-middle'>
|
||||
<OrgPanel className='org-workbench-quota'>
|
||||
<div className='flex items-center gap-2 mb-3'>
|
||||
<Wallet size={18} className='text-brand-deep' />
|
||||
<Text strong>{t('我的额度')}</Text>
|
||||
@@ -462,7 +466,7 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
<Progress
|
||||
percent={quotaPercent}
|
||||
stroke={
|
||||
quotaPercent >= 90 ? 'var(--semi-color-danger)' : undefined
|
||||
quotaPercent >= 90 ? 'var(--ui-color-danger)' : undefined
|
||||
}
|
||||
style={{ marginBottom: 8 }}
|
||||
/>
|
||||
@@ -496,7 +500,7 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
</div>
|
||||
</OrgPanel>
|
||||
|
||||
<OrgPanel>
|
||||
<OrgPanel className='org-workbench-tokens'>
|
||||
<div className='flex items-center gap-2 mb-3'>
|
||||
<Key size={18} className='text-brand-deep' />
|
||||
<Text strong>{t('我的令牌')}</Text>
|
||||
@@ -515,12 +519,12 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
</div>
|
||||
|
||||
{/* 个人用量趋势 */}
|
||||
<OrgPanel>
|
||||
<OrgPanel className='org-workbench-usage'>
|
||||
<div className='flex items-center gap-2 mb-3'>
|
||||
<TrendingUp size={18} className='text-brand-deep' />
|
||||
<Text strong>{t('个人用量趋势')}</Text>
|
||||
</div>
|
||||
<div className='flex flex-wrap gap-4'>
|
||||
<div className='org-workbench-usage-grid'>
|
||||
<UsageBlock t={t} title={t('今日')} data={usage.today} />
|
||||
<UsageBlock t={t} title={t('近 7 天')} data={usage.last7d} />
|
||||
<UsageBlock t={t} title={t('近 30 天')} data={usage.last30d} />
|
||||
@@ -535,7 +539,7 @@ const OrgWorkbench = ({ orgId, orgRole, featureFlags }) => {
|
||||
<Text strong>{t('最近申请')}</Text>
|
||||
</div>
|
||||
{summary?.recent_requests?.length ? (
|
||||
<div className='flex flex-col divide-y divide-[var(--semi-color-border)]'>
|
||||
<div className='flex flex-col divide-y divide-[var(--ui-color-border)]'>
|
||||
{summary.recent_requests.map((r) => (
|
||||
<div
|
||||
key={r.id}
|
||||
|
||||
@@ -22,10 +22,10 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
colorMode(容器上的 .dark/.light 类,与全局主题一致)。 */
|
||||
|
||||
.dept-flow-cinema {
|
||||
--dfc-glow: color-mix(in srgb, var(--semi-color-primary) 16%, transparent);
|
||||
--dfc-glow: color-mix(in srgb, var(--ui-color-primary) 16%, transparent);
|
||||
--dfc-glow-soft: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 9%,
|
||||
var(--ui-color-primary) 9%,
|
||||
transparent
|
||||
);
|
||||
/* 不支持 color-mix 的旧内核退化为纯渐变底 */
|
||||
@@ -47,7 +47,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
background: linear-gradient(180deg, #0b1020 0%, #0d1329 55%, #090e1c 100%);
|
||||
background: radial-gradient(
|
||||
1100px 520px at 50% -8%,
|
||||
color-mix(in srgb, var(--semi-color-primary) 24%, transparent),
|
||||
color-mix(in srgb, var(--ui-color-primary) 24%, transparent),
|
||||
transparent 62%
|
||||
),
|
||||
radial-gradient(
|
||||
@@ -84,18 +84,18 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
.dept-flow-cinema .react-flow__edge-path {
|
||||
stroke: color-mix(
|
||||
in srgb,
|
||||
var(--semi-color-primary) 55%,
|
||||
var(--ui-color-primary) 55%,
|
||||
rgba(148, 163, 184, 0.45)
|
||||
);
|
||||
filter: drop-shadow(0 0 3px var(--dfc-glow));
|
||||
}
|
||||
|
||||
.dept-flow-cinema .react-flow__edge.selected .react-flow__edge-path {
|
||||
stroke: var(--semi-color-primary);
|
||||
stroke: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
.dept-flow-cinema .react-flow__connection-path {
|
||||
stroke: var(--semi-color-primary);
|
||||
stroke: var(--ui-color-primary);
|
||||
}
|
||||
|
||||
/* 缩放控件:磨玻璃 */
|
||||
|
||||
@@ -49,7 +49,7 @@ import {
|
||||
Tag,
|
||||
Tooltip,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import {
|
||||
Plus,
|
||||
Pencil,
|
||||
@@ -150,19 +150,19 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<div
|
||||
className={`relative rounded-xl border bg-white/75 backdrop-blur-xl transition-all duration-150 dark:bg-[#0e1430]/65 ${
|
||||
selected
|
||||
? 'border-[var(--semi-color-primary)] shadow-lg ring-2 ring-[var(--semi-color-primary-light-default)]'
|
||||
: 'border-white/60 shadow-[0_10px_30px_-14px_rgba(15,23,42,0.35)] hover:border-[var(--semi-color-primary-light-active)] hover:shadow-lg dark:border-white/10'
|
||||
? 'border-[var(--ui-color-primary)] shadow-lg ring-2 ring-[var(--ui-color-primary-light-default)]'
|
||||
: 'border-white/60 shadow-[0_10px_30px_-14px_rgba(15,23,42,0.35)] hover:border-[var(--ui-color-primary-light-active)] hover:shadow-lg dark:border-white/10'
|
||||
} ${active ? '' : 'opacity-70'}`}
|
||||
style={{ width: NODE_WIDTH }}
|
||||
>
|
||||
{/* 根节点渐变顶条:一眼区分树的入口 */}
|
||||
{isRoot && (
|
||||
<div className='absolute inset-x-0 top-0 h-[3px] rounded-t-xl bg-gradient-to-r from-[var(--semi-color-primary)] to-[var(--semi-color-primary-light-active)]' />
|
||||
<div className='absolute inset-x-0 top-0 h-[3px] rounded-t-xl bg-gradient-to-r from-[var(--ui-color-primary)] to-[var(--ui-color-primary-light-active)]' />
|
||||
)}
|
||||
<Handle
|
||||
type='target'
|
||||
position={targetPos}
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--semi-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--ui-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
/>
|
||||
<div className='px-3.5 pt-3'>
|
||||
<div className='flex items-center justify-between gap-2'>
|
||||
@@ -248,7 +248,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
);
|
||||
const danger = pct >= 90;
|
||||
return (
|
||||
<div className='mt-2 rounded-md bg-[var(--semi-color-fill-0)] px-2 py-1'>
|
||||
<div className='mt-2 rounded-md bg-[var(--ui-color-fill-0)] px-2 py-1'>
|
||||
<div className='flex items-center justify-between gap-2 text-[11px] leading-4'>
|
||||
<span className='text-gray-500 dark:text-gray-400 flex-shrink-0'>
|
||||
{t('预算')} · {budgetInfo.label}
|
||||
@@ -256,7 +256,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<span
|
||||
className={
|
||||
danger
|
||||
? 'font-medium text-[var(--semi-color-danger)] truncate'
|
||||
? 'font-medium text-[var(--ui-color-danger)] truncate'
|
||||
: 'text-gray-600 dark:text-gray-300 truncate'
|
||||
}
|
||||
title={`${renderQuota(budgetInfo.used, 2)} / ${renderQuota(budgetInfo.cap, 2)}`}
|
||||
@@ -271,8 +271,8 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
style={{
|
||||
width: `${pct}%`,
|
||||
background: danger
|
||||
? 'var(--semi-color-danger)'
|
||||
: 'var(--semi-color-primary)',
|
||||
? 'var(--ui-color-danger)'
|
||||
: 'var(--ui-color-primary)',
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
@@ -329,7 +329,7 @@ const DeptNode = memo(({ data, selected }) => {
|
||||
<Handle
|
||||
type='source'
|
||||
position={sourcePos}
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--semi-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
className='!w-2.5 !h-2.5 !bg-[var(--ui-color-primary)] !border-2 !border-[var(--surface-card)]'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
@@ -697,8 +697,8 @@ const FlowInner = ({
|
||||
nodeColor={(n) => {
|
||||
const dept = deptMap[parseInt(n.id, 10)];
|
||||
return dept && dept.status === 1
|
||||
? 'var(--semi-color-primary-light-active)'
|
||||
: 'var(--semi-color-fill-2)';
|
||||
? 'var(--ui-color-primary-light-active)'
|
||||
: 'var(--ui-color-fill-2)';
|
||||
}}
|
||||
maskColor={
|
||||
colorMode === 'dark'
|
||||
@@ -774,7 +774,7 @@ const FlowInner = ({
|
||||
return (
|
||||
<div
|
||||
key={m.user_id}
|
||||
className='flex items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-[var(--semi-color-fill-0)]'
|
||||
className='flex items-center gap-3 rounded-lg px-2 py-1.5 hover:bg-[var(--ui-color-fill-0)]'
|
||||
>
|
||||
<Avatar size='extra-small' color='blue'>
|
||||
{name.slice(0, 1).toUpperCase()}
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useMemo } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { TreeSelect } from '@douyinfe/semi-ui';
|
||||
import { TreeSelect } from '@/components/ui';
|
||||
import { buildDeptTreeData } from './deptTree';
|
||||
|
||||
// 部门树选择(受控):按组织架构展示层级,默认只允许选末级部门(成员主归属
|
||||
|
||||
@@ -26,10 +26,10 @@ import {
|
||||
Spin,
|
||||
Progress,
|
||||
Typography,
|
||||
} from '@douyinfe/semi-ui';
|
||||
} from '@/components/ui';
|
||||
import OrgPanel from './OrgPanel';
|
||||
import { VChart } from '@visactor/react-vchart';
|
||||
import { initVChartSemiTheme } from '@visactor/vchart-semi-theme';
|
||||
import { initVChartTheme } from '@/components/ui/chartTheme';
|
||||
import {
|
||||
RefreshCw,
|
||||
PieChart,
|
||||
@@ -107,7 +107,7 @@ const DeltaBadge = ({ cur, prev, t }) => {
|
||||
<span
|
||||
className='text-xs font-medium'
|
||||
style={{
|
||||
color: up ? 'var(--semi-color-success)' : 'var(--semi-color-danger)',
|
||||
color: up ? 'var(--ui-color-success)' : 'var(--ui-color-danger)',
|
||||
}}
|
||||
>
|
||||
{up ? '▲' : '▼'} {Math.abs(pct).toFixed(1)}%
|
||||
@@ -117,7 +117,7 @@ const DeltaBadge = ({ cur, prev, t }) => {
|
||||
};
|
||||
|
||||
const KpiCard = ({ label, value, sub }) => (
|
||||
<div className='px-4 py-3 rounded-xl bg-[var(--semi-color-fill-0)]'>
|
||||
<div className='px-4 py-3 rounded-xl bg-[var(--ui-color-fill-0)]'>
|
||||
<div className='text-xs text-gray-500 mb-1'>{label}</div>
|
||||
<div className='text-lg font-semibold text-gray-900 dark:text-white truncate'>
|
||||
{value}
|
||||
@@ -191,7 +191,7 @@ const OrgAnalyticsPanel = ({ orgId }) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
initVChartSemiTheme({ isWatchingThemeSwitch: true });
|
||||
initVChartTheme({ isWatchingThemeSwitch: true });
|
||||
}, []);
|
||||
|
||||
const dimensions = useMemo(
|
||||
|
||||
@@ -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 React from 'react';
|
||||
import { Button, Input, Radio, RadioGroup } from '@douyinfe/semi-ui';
|
||||
import { Button, Input, Radio, RadioGroup } from '@/components/ui';
|
||||
import { Check, Image as ImageIcon, Palette, Type, UserRound } from 'lucide-react';
|
||||
import OrgPanel from './OrgPanel';
|
||||
import {
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
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 <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
// 路径末段 → 侧栏菜单名;随角色变化的页面(审批中心/消耗明细等)不登记,由页头标题兜底。
|
||||
const orgPageTitles = {
|
||||
workbench: '工作台',
|
||||
'cloud-brain': '云端大脑',
|
||||
knowledge: '企业知识',
|
||||
'my-capabilities': '我的 AI 能力',
|
||||
'skill-center': '技能中心',
|
||||
'skill-assignments': '分发与锁定',
|
||||
experts: '企业专家工坊',
|
||||
connectors: 'Connector 管理',
|
||||
effectiveness: '效能分析',
|
||||
quality: '调用质量',
|
||||
'agent-audit': 'Agent 任务审计',
|
||||
dashboard: '数据看板',
|
||||
departments: '部门管理',
|
||||
'dept-manage': '部门管理',
|
||||
'project-manage': '我的项目',
|
||||
projects: '项目管理',
|
||||
budgets: '预算中心',
|
||||
tokens: '令牌管理',
|
||||
recharge: '企业充值',
|
||||
audit: '审计日志',
|
||||
'personal-settings': '个人设置',
|
||||
settings: '企业设置',
|
||||
};
|
||||
|
||||
/** 企业端统一面包屑:“企业中心 / 当前页面”,样式与用户中心一致。current 仅在路径未登记时兜底。 */
|
||||
export default function OrgBreadcrumb({ current }) {
|
||||
const { pathname } = useLocation();
|
||||
const { t } = useTranslation();
|
||||
const key = pathname.split('/').filter(Boolean)[1];
|
||||
const mapped = orgPageTitles[key];
|
||||
const title = mapped ? t(mapped) : current;
|
||||
if (!title) return null;
|
||||
return (
|
||||
<Breadcrumb
|
||||
className='ui-dashboard-breadcrumb ui-user-center-breadcrumb'
|
||||
items={[{ title: t('企业中心') }, { title }]}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -19,11 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
import React from 'react';
|
||||
|
||||
/**
|
||||
* 企业中心签名渐变区(方案 A+ 签名层的核心组件)。
|
||||
*
|
||||
* 冲击力护栏:每页至多使用一次;品牌渐变全部走 --brand-* token,
|
||||
* 随主题预设整套切换。亮色 = 品牌渐变实底;暗色 = midnight glow
|
||||
* (深底 + 渐变辉光边缘),两套模式各有性格。
|
||||
* 企业工作台横幅,背景与轮廓来自原型 .ew-hero。
|
||||
*
|
||||
* @param {React.ReactNode} eyebrow 顶部小字(如时段问候/版块名)
|
||||
* @param {React.ReactNode} title 大标题
|
||||
@@ -32,29 +28,29 @@ import React from 'react';
|
||||
* @param {React.ReactNode} [children] 底部扩展槽(如 KPI 行)
|
||||
* @param {string} [className]
|
||||
*/
|
||||
const OrgHero = ({ eyebrow, title, subtitle, actions, children, className = '' }) => (
|
||||
<div
|
||||
className={`relative overflow-hidden rounded-xl border border-brand/20 bg-gradient-to-br from-brand-from via-brand-via to-brand-to text-white shadow-[var(--elevation-md)] dark:border-white/10 dark:from-brand-via/30 dark:via-neutral-950 dark:to-neutral-950 ${className}`}
|
||||
>
|
||||
{/* 暗色 midnight glow:左上角品牌辉光,亮色下渐变实底本身就是签名,不再叠加 */}
|
||||
<div className='pointer-events-none absolute -left-16 -top-24 hidden h-56 w-56 rounded-full bg-brand-from/25 blur-3xl dark:block' />
|
||||
<div className='pointer-events-none absolute inset-x-0 top-0 hidden h-px bg-gradient-to-r from-transparent via-white/25 to-transparent dark:block' />
|
||||
|
||||
<div className='relative px-5 py-5 sm:px-6 sm:py-6'>
|
||||
<div className='flex items-start justify-between gap-4 flex-wrap'>
|
||||
const OrgHero = ({
|
||||
eyebrow,
|
||||
title,
|
||||
subtitle,
|
||||
actions,
|
||||
children,
|
||||
className = '',
|
||||
}) => (
|
||||
<div className={`org-workbench-hero ${className}`}>
|
||||
<div className='org-workbench-hero-art' aria-hidden='true'>
|
||||
<i />
|
||||
<i />
|
||||
<i />
|
||||
</div>
|
||||
<div className='org-workbench-hero-content'>
|
||||
<div className='org-workbench-hero-heading'>
|
||||
<div className='min-w-0'>
|
||||
{eyebrow && (
|
||||
<div className='mb-1 text-xs font-medium text-white/75 dark:text-brand-from/90'>
|
||||
{eyebrow}
|
||||
</div>
|
||||
<div className='org-workbench-hero-greeting'>{eyebrow}</div>
|
||||
)}
|
||||
<h1 className='text-xl sm:text-2xl font-bold tracking-tight truncate'>
|
||||
{title}
|
||||
</h1>
|
||||
<h1>{title}</h1>
|
||||
{subtitle && (
|
||||
<p className='mt-1 max-w-2xl text-sm text-white/70 dark:text-gray-400'>
|
||||
{subtitle}
|
||||
</p>
|
||||
<p className='org-workbench-hero-subtitle'>{subtitle}</p>
|
||||
)}
|
||||
</div>
|
||||
{actions && (
|
||||
|
||||
@@ -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 React from 'react';
|
||||
import { Modal } from '@douyinfe/semi-ui';
|
||||
import { Modal } from '@/components/ui';
|
||||
|
||||
/*
|
||||
* 企业中心统一弹窗包装。
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Input, Toast, Typography } from '@douyinfe/semi-ui';
|
||||
import { Input, Toast, Typography } from '@/components/ui';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
import OrgModal from './OrgModal';
|
||||
|
||||
@@ -17,41 +17,26 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React from 'react';
|
||||
import UserCenterPageHeader from '../../../components/common/UserCenterPageHeader';
|
||||
import OrgBreadcrumb from './OrgBreadcrumb';
|
||||
|
||||
/**
|
||||
* 企业中心统一页面标题区。
|
||||
* 所有企业页(/org/*)共用,保证标题字号、副标题、右侧操作区写法一致。
|
||||
* 企业中心统一页面标题区(/org/*):与个人端共用 UserCenterPageHeader 的样式,
|
||||
* 面包屑为“企业中心 / 当前页面”,标题 28px、副标题 14px。
|
||||
*
|
||||
* @param {React.ComponentType} [icon] 可选的 lucide 图标组件(如 Wallet)
|
||||
* @param {React.ReactNode} title 主标题
|
||||
* @param {React.ReactNode} [subtitle] 副标题(一句话说明本页用途)
|
||||
* @param {React.ReactNode} [actions] 右侧操作区(刷新/新建等按钮)
|
||||
*/
|
||||
const OrgPageHeader = ({ icon: Icon, title, subtitle, actions }) => (
|
||||
<div className='mb-5 flex items-start justify-between gap-4 flex-wrap'>
|
||||
<div className='flex items-center gap-3 min-w-0'>
|
||||
{Icon && (
|
||||
<div className='flex-shrink-0 inline-flex h-9 w-9 items-center justify-center rounded-lg bg-brand/10 text-brand'>
|
||||
<Icon size={18} />
|
||||
</div>
|
||||
)}
|
||||
<div className='min-w-0'>
|
||||
<h1 className='text-lg sm:text-xl font-semibold tracking-tight text-[var(--text-primary)] truncate'>
|
||||
{title}
|
||||
</h1>
|
||||
{subtitle && (
|
||||
<p className='text-[13px] text-gray-500 dark:text-gray-400 mt-0.5 max-w-3xl'>
|
||||
{subtitle}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
{actions && (
|
||||
<div className='flex items-center gap-2 flex-wrap justify-end'>
|
||||
{actions}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
const OrgPageHeader = ({ title, subtitle, actions }) => (
|
||||
<UserCenterPageHeader
|
||||
breadcrumb={
|
||||
<OrgBreadcrumb current={typeof title === 'string' ? title : undefined} />
|
||||
}
|
||||
title={title}
|
||||
subtitle={subtitle}
|
||||
extra={actions}
|
||||
/>
|
||||
);
|
||||
|
||||
export default OrgPageHeader;
|
||||
|
||||
@@ -17,6 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React from 'react';
|
||||
import { Card } from 'antd';
|
||||
|
||||
/**
|
||||
* 企业中心统一卡片容器(方案 A+ 底盘层)。
|
||||
@@ -43,9 +44,7 @@ const OrgPanel = ({
|
||||
}) => {
|
||||
const hasHeader = title || actions;
|
||||
return (
|
||||
<div
|
||||
className={`relative overflow-hidden rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-card)] shadow-[var(--elevation-xs)] ${className}`}
|
||||
>
|
||||
<Card className={`org-panel ${className}`} styles={{ body: { padding: 24 } }}>
|
||||
{hasHeader && (
|
||||
<div className='flex items-start justify-between gap-3 flex-wrap border-b border-[var(--border-subtle)] px-5 py-3.5'>
|
||||
<div className='flex items-center gap-2.5 min-w-0'>
|
||||
@@ -76,7 +75,7 @@ const OrgPanel = ({
|
||||
)}
|
||||
|
||||
<div className={`${padding} ${bodyClassName}`}>{children}</div>
|
||||
</div>
|
||||
</Card>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Input, Toast, Typography } from '@douyinfe/semi-ui';
|
||||
import { Input, Toast, Typography } from '@/components/ui';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
import OrgModal from './OrgModal';
|
||||
|
||||
@@ -18,7 +18,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import React, { useCallback, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Select, Toast, Tooltip } from '@douyinfe/semi-ui';
|
||||
import { Button, Select, Toast, Tooltip } from '@/components/ui';
|
||||
import { Layers } from 'lucide-react';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
|
||||
@@ -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 React from 'react';
|
||||
import { SideSheet } from '@douyinfe/semi-ui';
|
||||
import { SideSheet } from '@/components/ui';
|
||||
|
||||
/*
|
||||
* 企业中心统一侧滑面板包装。与 OrgModal 同理:SideSheet 走 portal,
|
||||
@@ -25,7 +25,7 @@ import { SideSheet } from '@douyinfe/semi-ui';
|
||||
* 企业中心所有 <SideSheet> 一律使用本组件。
|
||||
*
|
||||
* 移动端适配:调用方普遍传固定像素宽(如技能详情的 720),在手机上会超出视口——
|
||||
* Semi 把 width 作为内联样式打在 .semi-sidesheet-inner 上,面板 right:0 定位,
|
||||
* Semi 把 width 作为内联样式打在 .ant-drawer-content 上,面板 right:0 定位,
|
||||
* 超出的部分被推到屏幕左侧外并裁掉。这里统一把像素宽钳到视口内。
|
||||
*
|
||||
* 用 min() 钳制而不是「窄屏一律 100%」:企业中心的移动端导航抽屉是
|
||||
|
||||
@@ -90,18 +90,22 @@ const OrgStatCard = ({
|
||||
const hasCountUp = typeof countTo === 'number';
|
||||
const animated = useCountUp(hasCountUp ? countTo : 0, { decimals });
|
||||
const displayValue = hasCountUp
|
||||
? (formatter ? formatter(animated) : animated.toLocaleString())
|
||||
? formatter
|
||||
? formatter(animated)
|
||||
: animated.toLocaleString()
|
||||
: value;
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-card)] shadow-[var(--elevation-xs)] ${compact ? 'p-3' : 'p-4'} ${className}`}
|
||||
className={`org-stat-card rounded-xl border border-[var(--border-subtle)] bg-[var(--surface-card)] shadow-[var(--elevation-xs)] ${compact ? 'p-3' : 'p-4'} ${className}`}
|
||||
>
|
||||
<div className={`flex ${compact ? 'items-center gap-3' : 'flex-col'}`}>
|
||||
<div className={`flex items-center gap-2.5 ${compact ? '' : 'mb-2.5'}`}>
|
||||
<div
|
||||
className={`org-stat-label flex items-center gap-2.5 ${compact ? '' : 'mb-2.5'}`}
|
||||
>
|
||||
{Icon && (
|
||||
<span
|
||||
className={`inline-flex flex-shrink-0 items-center justify-center rounded-lg ${palette.icon} ${compact ? 'h-8 w-8' : 'h-9 w-9'}`}
|
||||
className={`org-stat-icon inline-flex flex-shrink-0 items-center justify-center rounded-lg ${palette.icon} ${compact ? 'h-8 w-8' : 'h-9 w-9'}`}
|
||||
>
|
||||
<Icon size={compact ? 15 : 17} />
|
||||
</span>
|
||||
@@ -140,12 +144,12 @@ const OrgStatCard = ({
|
||||
) : (
|
||||
<>
|
||||
<div
|
||||
className={`text-2xl font-semibold tracking-tight tabular-nums ${palette.value}`}
|
||||
className={`org-stat-value text-2xl font-semibold tracking-tight tabular-nums ${palette.value}`}
|
||||
>
|
||||
{displayValue}
|
||||
</div>
|
||||
{sub && (
|
||||
<div className='mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
||||
<div className='org-stat-hint mt-1 text-xs text-gray-500 dark:text-gray-400'>
|
||||
{sub}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@@ -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 React from 'react';
|
||||
import { Spin } from '@douyinfe/semi-ui';
|
||||
import { Spin } from '@/components/ui';
|
||||
import { Inbox } from 'lucide-react';
|
||||
|
||||
/**
|
||||
|
||||
@@ -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 React, { useEffect } from 'react';
|
||||
import { TabPane, Tabs } from '@douyinfe/semi-ui';
|
||||
import { TabPane, Tabs } from '@/components/ui';
|
||||
import { useSearchParams } from 'react-router-dom';
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,7 +19,7 @@ For commercial licensing, please contact support@quantumnous.com
|
||||
import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { History } from 'lucide-react';
|
||||
import { Button, Spin, Table, Tag, Typography } from '@douyinfe/semi-ui';
|
||||
import { Button, Spin, Table, Tag, Typography } from '@/components/ui';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
import OrgPanel from '../components/OrgPanel';
|
||||
|
||||
@@ -25,7 +25,7 @@ import React, {
|
||||
} from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Activity } from 'lucide-react';
|
||||
import { Button, Select, Spin, Switch, Table, Tag } from '@douyinfe/semi-ui';
|
||||
import { Button, Select, Spin, Switch, Table, Tag } from '@/components/ui';
|
||||
import { API } from '../../../helpers/api';
|
||||
import { showError } from '../../../helpers';
|
||||
import OrgPanel from '../components/OrgPanel';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user