-
-
{group.label}
-
- {group.tasks.length}
-
-
+ {/* 只有一个时间分组时标题不提供额外信息(总数已在“全部”页签),直接省略以让出图片高度;
+ 多个分组时保留紧凑的分组标签 */}
+ {groupedTasks.length > 1 && (
+
+
{group.label}
+
+ {group.tasks.length}
+
+
+ )}
{group.tasks.map((task) => renderTaskCard(task))}
diff --git a/src/pages/ExperienceCenter/components/AICreation/Video/VideoTaskQueue.jsx b/src/pages/ExperienceCenter/components/AICreation/Video/VideoTaskQueue.jsx
index 5a513108..131fc0f2 100644
--- a/src/pages/ExperienceCenter/components/AICreation/Video/VideoTaskQueue.jsx
+++ b/src/pages/ExperienceCenter/components/AICreation/Video/VideoTaskQueue.jsx
@@ -1,5 +1,4 @@
import {
- Play as ActionPlay,
Download as ActionDownload,
RefreshCw as ActionRefreshCw,
Trash2 as ActionTrash2,
@@ -7,23 +6,18 @@ import {
ChevronDown as ActionChevronDown,
} from '@/components/common/icons/ActionIcons';
import React, { useState, useId } from 'react';
+import { Button as AntButton } from 'antd';
import {
Table,
Button,
Space,
Tag,
Progress,
- Tooltip,
Modal,
Badge,
+ Pagination,
} from '@/components/ui';
-import {
- ListVideo,
- CheckCircle2,
- AlertCircle,
- Clock,
- Loader2,
-} from 'lucide-react';
+import { ListVideo } from 'lucide-react';
import { useTranslation } from 'react-i18next';
import { useIsMobile } from '../../../../../hooks/common/useIsMobile';
import {
@@ -35,6 +29,12 @@ const VideoTaskQueue = ({
visible,
setVisible,
tasks,
+ page = 1,
+ pageSize = 10,
+ total = 0,
+ loading = false,
+ onPageChange,
+ onPageSizeChange,
onRefresh,
onDelete,
onDownload,
@@ -47,55 +47,36 @@ const VideoTaskQueue = ({
// 8 列合计 1190px 塞进 ~340px 容器、按钮全带文字,实际完全用不了。
const isCompact = useIsMobile();
const [selectedTasks, setSelectedTasks] = useState([]);
+ // 服务端分页:tasks 为当前页数据,翻页 / 改每页条数时由 useVideoGeneration 重新请求
+ // GET /api/video/tasks?p=&page_size=。分页器放在表格滚动区之外(与密钥管理一致),避免抖动
const queueId = useId();
+ // 勾选只针对当前页,翻页或数据刷新后剔除已不在当前页的任务
+ const pageTaskIds = new Set(tasks.map((task) => task.task_id));
+ const visibleSelected = selectedTasks.filter((id) => pageTaskIds.has(id));
+ if (visibleSelected.length !== selectedTasks.length) {
+ setSelectedTasks(visibleSelected);
+ }
// 状态标签映射
const getStatusTag = (status) => {
// 统一转换为小写进行比较
const normalizedStatus = normalizeVideoTaskStatus(status);
+ // 状态统一为“文字 + 边框”标签,不带图标;居中由列 align 与 .video-queue-status 控制
const statusMap = {
- queued: { color: 'blue', text: t('排队中'), icon:
},
- in_progress: {
- color: 'cyan',
- text: t('生成中'),
- icon:
,
- },
- success: {
- color: 'green',
- text: t('已完成'),
- icon:
,
- },
- completed: {
- color: 'green',
- text: t('已完成'),
- icon:
,
- },
- failure: {
- color: 'red',
- text: t('失败'),
- icon:
,
- },
- failed: {
- color: 'red',
- text: t('失败'),
- icon:
,
- },
- canceled: {
- color: 'grey',
- text: t('已取消'),
- icon:
,
- },
+ queued: { color: 'blue', text: t('排队中') },
+ in_progress: { color: 'cyan', text: t('生成中') },
+ success: { color: 'green', text: t('已完成') },
+ completed: { color: 'green', text: t('已完成') },
+ failure: { color: 'red', text: t('失败') },
+ failed: { color: 'red', text: t('失败') },
+ canceled: { color: 'grey', text: t('已取消') },
};
const config = statusMap[normalizedStatus] || {
color: 'grey',
text: status,
};
return (
-
- {config.icon}
+
{config.text}
);
@@ -128,12 +109,9 @@ const VideoTaskQueue = ({
{
title: t('任务ID'),
dataIndex: 'task_id',
- width: !isCompact ? 120 : 100,
- render: (text) => (
-
- {text?.substring(0, 8)}...
-
- ),
+ width: 200,
+ // 完整展示任务 ID(纯文本,不截断)
+ render: (text) => text || '-',
},
{
title: t('模式'),
@@ -166,6 +144,7 @@ const VideoTaskQueue = ({
title: t('状态'),
dataIndex: 'status',
width: !isCompact ? 120 : 100,
+ align: 'center',
render: (status) => getStatusTag(status),
},
{
@@ -193,51 +172,53 @@ const VideoTaskQueue = ({
{
title: t('操作'),
dataIndex: 'operate',
- width: !isCompact ? 220 : 180,
+ width: 200,
fixed: 'right',
render: (text, record) => {
const normalizedStatus = normalizeVideoTaskStatus(record.status);
return (
-
+ // 操作列与密钥管理列表一致:文字链接按钮(主色 / 删除为危险色),不带图标与描边
+
{/* 播放和下载按钮:仅根据状态显示,视频URL在点击时才获取 */}
{normalizedStatus === 'success' && (
<>
-
}
+ className='video-queue-link'
onClick={() => onPlay && onPlay(record)}
>
- {!isCompact ? t('播放') : ''}
-
-
+ {t('下载')}
+
>
)}
{/* 再生成按钮 - 对所有已完成或失败的任务显示 */}
{(normalizedStatus === 'success' ||
normalizedStatus === 'failure') &&
canRegenerateVideoTask(record) && (
-
}
+ className='video-queue-link'
onClick={() => onRegenerate && onRegenerate(record)}
>
- {!isCompact ? t('再生成') : ''}
-
+ {t('再生成')}
+
)}
-
}
+ danger
+ className='video-queue-link'
onClick={() => {
Modal.warning({
title: t('确定删除此任务?'),
@@ -253,17 +234,17 @@ const VideoTaskQueue = ({
});
}}
>
- {!isCompact ? t('删除') : ''}
-
-
+ {t('删除')}
+
+
);
},
},
];
- // 统计信息
+ // 统计信息:总数取服务端 total,分状态计数为当前页
const taskStats = {
- total: tasks.length,
+ total,
queued: tasks.filter((t) => normalizeVideoTaskStatus(t.status) === 'queued')
.length,
in_progress: tasks.filter(
@@ -278,112 +259,144 @@ const VideoTaskQueue = ({
};
return (
-
-
-
-
-
-
-
- }
- onClick={onRefresh}
- >
- {t('刷新')}
-
- {selectedTasks.length > 0 && (
- <>
- }
- onClick={handleBatchDownload}
- >
- {t('批量下载')} ({selectedTasks.length})
-
- }
- onClick={() => {
- Modal.warning({
- title: t('确定删除选中的任务?'),
- content: t('将删除 {{count}} 个任务,删除后将无法恢复', {
- count: selectedTasks.length,
- }),
- icon: (
-
- ),
- okText: t('确定删除'),
- cancelText: t('取消'),
- onOk: handleBatchDelete,
- centered: true,
- okButtonProps: { type: 'danger' },
- });
- }}
- >
- {t('批量删除')} ({selectedTasks.length})
-
- >
+ // 外层 section 在桌面端只占折叠条高度;展开内容由 .video-queue-panel 自底向上浮层覆盖,
+ // 不挤压上方的参数 / 预览区域(样式见 VideoWorkspace.css)。Esc 收起并把焦点还给切换按钮。
+ {
+ if (event.key === 'Escape' && visible) {
+ event.stopPropagation();
+ setVisible(false);
+ event.currentTarget.querySelector('.video-queue-toggle')?.focus();
+ }
+ }}
+ >
+
+
+
+
+
+
+
+ }
+ onClick={onRefresh}
+ >
+ {t('刷新')}
+
+ {selectedTasks.length > 0 && (
+ <>
+ }
+ onClick={handleBatchDownload}
+ >
+ {t('批量下载')} ({selectedTasks.length})
+
+ }
+ onClick={() => {
+ Modal.warning({
+ title: t('确定删除选中的任务?'),
+ content: t(
+ '将删除 {{count}} 个任务,删除后将无法恢复',
+ {
+ count: selectedTasks.length,
+ },
+ ),
+ icon: (
+
+ ),
+ okText: t('确定删除'),
+ cancelText: t('取消'),
+ onOk: handleBatchDelete,
+ centered: true,
+ okButtonProps: { type: 'danger' },
+ });
+ }}
+ >
+ {t('批量删除')} ({selectedTasks.length})
+
+ >
+ )}
+
- {/* 统计信息 */}
-
-
- {t('排队')}: {taskStats.queued}
-
-
- {t('生成中')}: {taskStats.in_progress}
-
-
- {t('完成')}: {taskStats.completed}
-
-
- {t('失败')}: {taskStats.failed}
-
-
-
+ {/* 统计信息 */}
+
+
+ {t('排队')}: {taskStats.queued}
+
+
+ {t('生成中')}: {taskStats.in_progress}
+
+
+ {t('完成')}: {taskStats.completed}
+
+
+ {t('失败')}: {taskStats.failed}
+
+
+
- {/* 任务表格 */}
-
-
({
- disabled: record.status === 'in_progress',
- }),
- }}
- size='small'
- empty={t('暂无任务')}
- />
+ {/* 任务表格 */}
+
+
sum + column.width, 0),
+ }}
+ pagination={false}
+ rowSelection={{
+ selectedRowKeys: selectedTasks,
+ onChange: setSelectedTasks,
+ getCheckboxProps: (record) => ({
+ disabled: record.status === 'in_progress',
+ }),
+ }}
+ size='middle'
+ empty={t('暂无任务')}
+ />
+
+ {total > 0 ? (
+ onPageChange?.(next)}
+ onPageSizeChange={(size) => onPageSizeChange?.(size)}
+ />
+ ) : null}
diff --git a/src/pages/ExperienceCenter/components/AICreation/Video/VideoWorkspace.css b/src/pages/ExperienceCenter/components/AICreation/Video/VideoWorkspace.css
index 60c7eb37..853726b7 100644
--- a/src/pages/ExperienceCenter/components/AICreation/Video/VideoWorkspace.css
+++ b/src/pages/ExperienceCenter/components/AICreation/Video/VideoWorkspace.css
@@ -1,14 +1,17 @@
.video-workspace {
display: flex;
flex-direction: column;
- gap: 20px;
height: 100%;
- padding: 24px;
+ /* 内容边距与用户中心一致(GLOBAL_UI_BASELINE 4.4),底部取一半与图片生成页统一;页头与首块间距由 .uc-page-header 的 18px 提供 */
+ padding: var(--uc-page-pad-top) var(--uc-page-pad-x)
+ calc(var(--uc-page-pad-bottom) / 2);
overflow: auto;
}
-.video-workspace-heading,
-.video-workspace-title,
+.video-workspace > .exp-page-header {
+ flex: none;
+}
+
.video-panel-heading {
display: flex;
align-items: center;
@@ -16,12 +19,6 @@
min-width: 0;
}
-.video-workspace-heading {
- flex: none;
- flex-wrap: wrap;
- justify-content: space-between;
-}
-
.video-workspace-capabilities {
--vw-capability-line: color-mix(
in srgb,
@@ -54,7 +51,6 @@
flex: none;
}
-.video-workspace-icon,
.video-preview-empty-icon {
display: grid;
flex: none;
@@ -66,20 +62,6 @@
border-radius: 10px;
}
-.video-workspace-heading h1 {
- margin: 0;
- color: var(--text-primary);
- font-size: 28px;
- font-weight: 650;
- line-height: 32px;
-}
-
-.video-workspace-heading p {
- margin: 4px 0 0;
- color: var(--text-secondary);
- font-size: 13px;
-}
-
.video-workspace-body {
display: flex;
flex: 1;
@@ -134,13 +116,54 @@
}
.video-queue {
+ /* 表格配色与密钥管理列表(key-management.css 的 --km-*)同值 */
+ --vq-head-bg: #f8f9fc;
+ --vq-head-text: #687589;
+ --vq-row-split: #f0f0f0;
+ --vq-text: rgba(0, 0, 0, 0.88);
+ position: relative;
flex: none;
min-width: 0;
+}
+
+html.dark .video-queue {
+ --vq-head-bg: var(--ui-color-fill-0);
+ --vq-head-text: var(--text-secondary);
+ --vq-row-split: var(--border-subtle);
+ --vq-text: var(--uc-heading);
+}
+
+.video-queue-panel {
background: var(--surface-card);
border: 1px solid var(--border-subtle);
border-radius: 12px;
}
+/* 宽屏:队列占位只保留折叠条高度(52px 按钮 + 2px 边框),展开内容以浮层自底向上覆盖,
+ 不推挤上方的参数 / 预览区;窄屏整页滚动,保持文档流内展开 */
+@media (min-width: 1025px) {
+ .video-queue {
+ height: 54px;
+ }
+
+ .video-queue-panel {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 20;
+ }
+
+ .video-queue[data-expanded='true'] .video-queue-panel {
+ box-shadow: 0 -12px 32px
+ color-mix(in srgb, var(--text-primary) 14%, transparent);
+ }
+
+ .video-queue[data-expanded='true'] .video-queue-table {
+ max-height: clamp(160px, 40dvh, 400px);
+ }
+}
+
.video-queue-heading {
margin: 0;
}
@@ -219,8 +242,60 @@
min-width: 0;
max-height: clamp(120px, 24dvh, 260px);
overflow: auto;
- border-end-start-radius: 11px;
- border-end-end-radius: 11px;
+ /* 预留滚动条位置:行数变化或下拉展开时不因滚动条出现 / 消失而横向抖动 */
+ scrollbar-gutter: stable;
+}
+
+/* 表格样式与交互对齐密钥管理列表:middle 尺寸、表头 46px 常规字重、行分隔线、文字链接操作 */
+.video-queue-grid .ant-table-thead > tr > th {
+ --center-table-head-bg: var(--vq-head-bg);
+ height: 46px;
+ padding-block: 0;
+ border-bottom-color: var(--vq-row-split);
+ background: var(--vq-head-bg);
+ color: var(--vq-head-text);
+ font-weight: 400;
+}
+
+.video-queue-grid .ant-table-thead > tr > th::before {
+ display: none;
+}
+
+.video-queue-grid .ant-table-tbody > tr > td {
+ border-bottom-color: var(--vq-row-split);
+ color: var(--vq-text);
+}
+
+.video-queue-grid .ant-tag {
+ margin-inline-end: 0;
+}
+
+/* 状态:仅文字 + 边框,单元格内水平垂直居中 */
+.video-queue-grid .video-queue-status.ant-tag {
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ margin: 0;
+ vertical-align: middle;
+}
+
+.video-queue-actions {
+ display: flex;
+ align-items: center;
+ gap: 6px;
+}
+
+.video-queue-actions .video-queue-link.ant-btn {
+ height: auto;
+ padding: 0;
+}
+
+/* 分页器在表格滚动区之外,位置固定,不随表格内容滚动或跳动 */
+.video-queue-pagination {
+ display: flex;
+ justify-content: flex-end;
+ padding: 12px 16px;
+ border-top: 1px solid var(--vq-row-split);
}
@media (max-width: 767px) {
@@ -230,11 +305,6 @@
}
@media (max-width: 1024px) {
- .video-workspace {
- gap: 16px;
- padding: 16px;
- }
-
.video-workspace-body {
flex: none;
height: auto;
@@ -245,11 +315,6 @@
min-height: 0;
}
- .video-workspace-heading h1 {
- font-size: 24px;
- line-height: 28px;
- }
-
.video-queue-table {
max-height: 320px;
}
diff --git a/src/pages/ExperienceCenter/components/AICreation/VideoGenerationTab.jsx b/src/pages/ExperienceCenter/components/AICreation/VideoGenerationTab.jsx
index 745627e8..a20b61d2 100644
--- a/src/pages/ExperienceCenter/components/AICreation/VideoGenerationTab.jsx
+++ b/src/pages/ExperienceCenter/components/AICreation/VideoGenerationTab.jsx
@@ -35,6 +35,12 @@ const VideoGenerationTab = () => {
estSeconds,
// 任务列表
tasks,
+ taskPage,
+ taskPageSize,
+ taskTotal,
+ tasksLoading,
+ changeTaskPage,
+ changeTaskPageSize,
refreshTasks,
deleteTask,
getRegenerationTask,
@@ -125,6 +131,12 @@ const VideoGenerationTab = () => {
visible={taskQueueVisible}
setVisible={setTaskQueueVisible}
tasks={tasks}
+ page={taskPage}
+ pageSize={taskPageSize}
+ total={taskTotal}
+ loading={tasksLoading}
+ onPageChange={changeTaskPage}
+ onPageSizeChange={changeTaskPageSize}
onRefresh={refreshTasks}
onDelete={deleteTask}
onDownload={downloadTask}
diff --git a/src/pages/ExperienceCenter/components/ExperiencePageHeader.jsx b/src/pages/ExperienceCenter/components/ExperiencePageHeader.jsx
new file mode 100644
index 00000000..f1aea9f3
--- /dev/null
+++ b/src/pages/ExperienceCenter/components/ExperiencePageHeader.jsx
@@ -0,0 +1,45 @@
+import React from 'react';
+import { Breadcrumb } from 'antd';
+import { useTranslation } from 'react-i18next';
+import UserCenterPageHeader from '../../../components/common/UserCenterPageHeader';
+import '../experience-page.css';
+
+/**
+ * 体验中心子页统一页头:复用用户中心页头规格(GLOBAL_UI_BASELINE 4.4 第 2 条),
+ * 面包屑固定为“体验中心 / 当前页面”,标题 28 / 32px、副标题 14 / 22px、右侧操作走 extra。
+ * 内容边距由各页根节点读取 --uc-page-pad-*,本组件只负责呈现。
+ *
+ * @param {{ title: string, titleSuffix?: React.ReactNode, subtitle?: React.ReactNode, extra?: React.ReactNode, className?: string }} props
+ */
+export default function ExperiencePageHeader({
+ title,
+ titleSuffix,
+ subtitle,
+ extra,
+ className = '',
+}) {
+ const { t } = useTranslation();
+ return (
+
+ }
+ title={
+ titleSuffix ? (
+
+ {title}
+ {titleSuffix}
+
+ ) : (
+ title
+ )
+ }
+ subtitle={subtitle}
+ extra={extra}
+ />
+ );
+}
diff --git a/src/pages/ExperienceCenter/components/ExperienceSidebar.jsx b/src/pages/ExperienceCenter/components/ExperienceSidebar.jsx
index 8477f9e1..80576079 100644
--- a/src/pages/ExperienceCenter/components/ExperienceSidebar.jsx
+++ b/src/pages/ExperienceCenter/components/ExperienceSidebar.jsx
@@ -3,26 +3,28 @@ import {
ChevronRight as ActionChevronRight,
ChevronLeft as ActionChevronLeft,
} from '@/components/common/icons/ActionIcons';
-import React, { useMemo, useState, useEffect } from 'react';
+import React, { useMemo } from 'react';
import { Link, useLocation } from 'react-router-dom';
import { useTranslation } from 'react-i18next';
-import { BrainCircuit, Image, Video, Sparkles } from 'lucide-react';
+import { BrainCircuit, Image, Video } from 'lucide-react';
import { useSidebarCollapsed } from '../../../hooks/common/useSidebarCollapsed';
import { useExperienceModules } from '../useExperienceModules';
import { badgeText } from '../../../hooks/creation/creationWatch';
/**
+ * 体验中心桌面侧栏:结构、样式与收起交互对齐用户中心侧栏(UserCenterSidebar),
+ * 共用 center-layout.css 的 .ui-center-sidebar / .ui-center-menu-item / .ui-center-sidebar-collapse,
+ * 收起状态与其他中心侧栏共用 useSidebarCollapsed。
+ *
* @param {{ unread?: { image: number, video: number } }} props
* unread:新创作台中用户不在该页时完成的作品数(WP C-4 未读角标)
*/
const ExperienceSidebar = ({ unread }) => {
const { t } = useTranslation();
const [collapsed, toggleCollapsed] = useSidebarCollapsed();
- const [selectedKeys, setSelectedKeys] = useState([]);
const location = useLocation();
const { isAvailable } = useExperienceModules();
- // 统一单一品牌色高亮(云平台风格),不再每项一种颜色
const allNavItems = useMemo(
() => [
{
@@ -59,199 +61,75 @@ const ExperienceSidebar = ({ unread }) => {
[allNavItems, isAvailable],
);
- // 根据当前路径设置选中的菜单项
- useEffect(() => {
- const currentPath = location.pathname;
- const matchingItem = navItems.find((item) =>
- currentPath.startsWith(item.to),
- );
-
- if (matchingItem) {
- setSelectedKeys([matchingItem.itemKey]);
- }
- }, [location.pathname, navItems]);
+ // 选中项直接由当前路径推导,避免额外状态与路由不同步
+ const selectedKey =
+ navItems.find((item) => location.pathname.startsWith(item.to))?.itemKey ||
+ '';
return (
-
- {/* 毛玻璃内层光泽 */}
-
- {/* 顶部装饰渐变 —— /8 /3 步进 Tailwind 不生成,改用 /10 两 stop 确保可见 */}
-
+
-
- {/* 底部分隔线装饰 */}
-
-
- {/* 底部折叠按钮 */}
-
-
-
-
+
+
);
};
diff --git a/src/pages/ExperienceCenter/components/ImageGeneration.jsx b/src/pages/ExperienceCenter/components/ImageGeneration.jsx
index b0478fa8..3058ccb1 100644
--- a/src/pages/ExperienceCenter/components/ImageGeneration.jsx
+++ b/src/pages/ExperienceCenter/components/ImageGeneration.jsx
@@ -1,18 +1,27 @@
import React, { useContext } from 'react';
+import { useTranslation } from 'react-i18next';
import ImageGenerationTab from './AICreation/ImageGenerationTab';
import CreationStudio from '../../../components/creation/CreationStudio';
+import ExperiencePageHeader from './ExperiencePageHeader';
import { StatusContext } from '../../../context/Status';
import { isCreationStudioEnabled } from '../../../helpers/creationStudio';
const ImageGeneration = () => {
+ const { t } = useTranslation();
const [statusState] = useContext(StatusContext);
// 灰度开关开启时使用新创作台,关闭时保持旧页面不变
if (isCreationStudioEnabled(statusState?.status)) {
return ;
}
return (
-
-
+
);
};
diff --git a/src/pages/ExperienceCenter/components/VideoGeneration.jsx b/src/pages/ExperienceCenter/components/VideoGeneration.jsx
index bbf6922b..0a0d47ba 100644
--- a/src/pages/ExperienceCenter/components/VideoGeneration.jsx
+++ b/src/pages/ExperienceCenter/components/VideoGeneration.jsx
@@ -1,8 +1,9 @@
import React, { useContext } from 'react';
import { useTranslation } from 'react-i18next';
-import { Clapperboard, Film, Sparkles, Video } from 'lucide-react';
+import { Clapperboard, Film, Sparkles } from 'lucide-react';
import VideoGenerationTab from './AICreation/VideoGenerationTab';
import CreationStudio from '../../../components/creation/CreationStudio';
+import ExperiencePageHeader from './ExperiencePageHeader';
import { StatusContext } from '../../../context/Status';
import { isCreationStudioEnabled } from '../../../helpers/creationStudio';
@@ -17,31 +18,26 @@ const VideoGeneration = () => {
return (
-
-
-
-
-
-
-
{t('视频生成')}
-
{t('使用 AI 创建令人惊叹的视频内容')}
-
-
-
- -
-
- {t('图生视频')}
-
- -
-
- {t('文生视频')}
-
- -
-
- {t('多模型支持')}
-
-
-
+
+
+
+ {t('图生视频')}
+
+
+
+ {t('文生视频')}
+
+
+
+ {t('多模型支持')}
+
+
+ }
+ />
);
diff --git a/src/pages/ExperienceCenter/experience-page.css b/src/pages/ExperienceCenter/experience-page.css
new file mode 100644
index 00000000..15b9f439
--- /dev/null
+++ b/src/pages/ExperienceCenter/experience-page.css
@@ -0,0 +1,133 @@
+/*
+ * 体验中心子页(云端大脑 / 图片生成 / 视频生成)页头与页级布局。
+ * 页头几何沿用 user-center.css 的 .uc-page-header(GLOBAL_UI_BASELINE 4.4),此处只补体验中心特有部分;
+ * 内容边距统一读取 --uc-page-pad-*(桌面 30 / 36 / 36px,≤ 768px 16 / 16 / 24px)。
+ */
+
+/* 标题后缀(如 BETA):与 28px 标题垂直居中,不改变标题行高 */
+.exp-page-title-row {
+ display: inline-flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 10px;
+}
+
+/* 图片生成:页头 + 双栏工作区。宽屏双栏各自滚动,窄屏整页滚动 */
+.exp-image-page {
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ min-height: 0;
+ padding-top: var(--uc-page-pad-top);
+}
+
+.exp-image-page > .exp-page-header {
+ flex: none;
+ padding-inline: var(--uc-page-pad-x);
+}
+
+.exp-image-page-body {
+ flex: 1 1 auto;
+ min-height: 0;
+}
+
+/* 覆盖工作区原 p-4 / lg:p-6:左右与页头对齐,顶部间距由页头 18px 提供;
+ 底部按需求取标准下边距的一半,让两栏尽量多占可视高度 */
+.exp-image-page .image-generation-workspace {
+ padding: 0 var(--uc-page-pad-x) calc(var(--uc-page-pad-bottom) / 2);
+}
+
+/* 宽屏:左侧参数栏固定(仅表单内部滚动);右侧“生成历史”整列(工具栏 + 图片网格)
+ 作为一个局部滚动容器,向下滚动时工具栏随之移出,让出更多图片可视面积 */
+@media (min-width: 1024px) {
+ /* 滚动视口与左侧参数卡同为 12px 圆角:底部被裁切的卡片按圆角收边,两栏底边圆角对齐 */
+ .exp-image-page .image-generation-results {
+ overflow-x: hidden;
+ overflow-y: auto;
+ overscroll-behavior: contain;
+ scrollbar-gutter: stable;
+ border-radius: 12px;
+ }
+
+ .exp-image-page .image-generation-results .image-task-list {
+ height: auto;
+ min-height: 100%;
+ }
+
+ /* 列表区占满工具栏以下的剩余高度,空状态在其中水平垂直居中 */
+ .exp-image-page .image-generation-results .task-list-scrollable {
+ display: flex;
+ flex: 1 0 auto;
+ flex-direction: column;
+ overflow: visible;
+ }
+
+ .exp-image-page .image-generation-results .image-history-content {
+ display: flex;
+ flex: 1 0 auto;
+ flex-direction: column;
+ }
+
+ /* 舒适密度:两行卡片按可视高度均分拉伸,第二行底边与左侧参数卡底边(同为 12px 圆角)对齐。
+ 行高 = (视口高 - 工具栏 56 - 列表上内边距 10 - 行间距 12) / 2,限定在 260–440px,
+ 更矮或更高的屏幕回落到区间端点并保持局部滚动 */
+ .exp-image-page .image-generation-results {
+ container-type: size;
+ }
+
+ .exp-image-page
+ .image-generation-results
+ .image-task-grid[data-density='comfortable'] {
+ grid-auto-rows: clamp(260px, calc((100cqh - 78px) / 2), 440px);
+ }
+
+ .exp-image-page
+ .image-generation-results
+ .image-task-grid[data-density='comfortable']
+ .image-task-card {
+ height: 100%;
+ }
+
+ .exp-image-page
+ .image-generation-results
+ .image-task-grid[data-density='comfortable']
+ .image-task-media {
+ flex: 1 1 auto;
+ min-height: 120px;
+ aspect-ratio: auto;
+ }
+
+ /* 拉伸出的高度全部给缩略图,信息区保持内容高度,避免与操作行之间出现空白 */
+ .exp-image-page
+ .image-generation-results
+ .image-task-grid[data-density='comfortable']
+ .image-task-info {
+ flex: none;
+ }
+
+ .exp-image-page .image-generation-results .image-history-content {
+ padding-bottom: 0;
+ }
+
+ .exp-image-page .image-generation-results .image-history-empty {
+ display: flex;
+ flex: 1 0 auto;
+ align-items: center;
+ justify-content: center;
+ }
+}
+
+@media (max-width: 1023.98px) {
+ .exp-image-page {
+ overflow-y: auto;
+ }
+
+ .exp-image-page-body {
+ flex: none;
+ }
+
+ .exp-image-page .image-generation-workspace {
+ height: auto;
+ overflow: visible;
+ }
+}
diff --git a/src/pages/ExperienceCenter/index.jsx b/src/pages/ExperienceCenter/index.jsx
index 1f989749..4c2b753a 100644
--- a/src/pages/ExperienceCenter/index.jsx
+++ b/src/pages/ExperienceCenter/index.jsx
@@ -169,13 +169,18 @@ const ExperienceCenter = () => {
// 新创作台:视口高度用 dvh,微信 H5 / 移动端键盘弹起时底部创作台与生成按钮保持可见
const dynamicViewport =
(isVideoGeneration || isImageGeneration) && creationStudioEnabled;
+ // 云端大脑 / 图片生成 / 视频生成(非新创作台)与 /console/analytics 统一纯色页底:
+ // 读取 --uc-page-bg(浅色 #f8fafc,深色 --surface-bg-base),不叠加装饰光晕层
+ const consolePageBg =
+ isCloudBrain ||
+ ((isVideoGeneration || isImageGeneration) && !creationStudioEnabled);
return (
{/* Sidebar - 桌面端 */}
-
+
@@ -191,6 +196,7 @@ const ExperienceCenter = () => {
* text-model 特例:TextModel 自带 via-white 亮底保证聊天可读性,由其自身渲染,此处跳过。
* 沉浸式生成页(视频/图片)用 rich 大光球,密钥管理(Token 列表)用 subtle。 */}
{!isTextModel &&
+ !consolePageBg &&
(!(isVideoGeneration || isImageGeneration) ||
creationStudioEnabled) && (
({
WeyAiPersonalKeyGroup: '',
WeyAiOrgKeyGroup: '',
WeyAiDefaultModel: '',
+ WeyAiDefaultAssistants: [],
WeyAiDownloadEnabled: false,
WeyAiReleaseBaseUrl: '',
ClientMinVersion: '',
@@ -359,7 +371,7 @@ function OrgSelect({
}
export default function SettingsWeyAi() {
- const { t } = useTranslation();
+ const { t, i18n } = useTranslation();
const [loading, setLoading] = useState(true);
const [saving, setSaving] = useState(false);
const [values, setValues] = useState(createEmptyState);
@@ -487,6 +499,11 @@ export default function SettingsWeyAi() {
LIST_KEYS.forEach((key) => {
next[key] = splitList(map[key]);
});
+ // 助手列表按后端的口径拆(换行、中文逗号等也算分隔符):只按英文逗号拆的话,
+ // 经接口写成多行的值会回读成一个不合法的条目,连别的设置都保存不了
+ next.WeyAiDefaultAssistants = normalizeAssistantIds(
+ map.WeyAiDefaultAssistants,
+ );
setValues(next);
setOriginal(next);
setSecretSet(!!map[SECRET_KEY]);
@@ -704,6 +721,27 @@ export default function SettingsWeyAi() {
}
}
}
+ // 与后端 ValidateWeyAiDefaultAssistants 对齐:数量上限与 ID 的形状。下拉允许
+ // 手动输入清单里没有的 ID,写错的要在这里先拦下来
+ if (values.WeyAiDefaultAssistants.length > MAX_DEFAULT_ASSISTANTS) {
+ return t('{{label}}:{{message}}', {
+ label: t(KEY_LABELS.WeyAiDefaultAssistants),
+ message: t('最多选择 {{count}} 个助手', {
+ count: MAX_DEFAULT_ASSISTANTS,
+ }),
+ });
+ }
+ const badAssistant = values.WeyAiDefaultAssistants.find(
+ (id) => !isAssistantId(id),
+ );
+ if (badAssistant) {
+ return t('{{label}}:{{message}}', {
+ label: t(KEY_LABELS.WeyAiDefaultAssistants),
+ message: t('{{id}} 不是合法的助手 ID(只能包含字母、数字和 . _ : -)', {
+ id: badAssistant,
+ }),
+ });
+ }
const minVersion = (values.ClientMinVersion || '').trim();
if (minVersion && !/^\d+(\.\d+){0,2}$/.test(minVersion)) {
return t('最低版本号格式应为 1.2.3');
@@ -1290,6 +1328,72 @@ export default function SettingsWeyAi() {
{t('低于此版本的桌面端会提示升级,留空不限制')}
+
+
+
+ {t('新用户默认开启的助手')}
+
+
+
+