Compare commits

..

24 Commits

Author SHA1 Message Date
stringadmin 1049fa3218 Merge branch 'master' into feat/toolbox-preview-cards-and-responsive-polish 2026-06-08 10:59:20 +00:00
ludan 6f54ad92c0 feat: 工具盒卡片预览图替换与响应式视觉优化
本次提交包含以下改进:

## 1. 工具卡片真实预览图替换 (MorePage.tsx)
- 移除原有的CSS绘制Before/After对比图(ToolComparePanel/CompareScene)
- 新增ToolPreviewPanel组件,使用OSS真实截图展示每个工具的效果预览
- 建立toolPreviewImages映射表,为8个工具分别配置预览图URL
- 预览图支持hover悬浮放大效果(popover),桌面端鼠标悬停时展示大图
- 触摸设备通过@media (hover: none)隐藏popover,避免移动端误触

## 2. 核心工具区重构 (MorePage.tsx)
- 移除FeaturedTool独立接口和featuredTools数组,统一到tools体系
- 新增coreToolIds集合标记核心工具(workbench/inpaint/watermarkRemoval)
- 新增coreToolGradients和coreToolSteps独立配置每张核心卡的渐变和步骤
- 移除openFeaturedTool,统一使用openTool处理所有工具点击
- 核心卡片kick er改为显示分类标签(图像创作/视频创作)
- 视频生成分类标签更名为"视频创作"

## 3. 工具卡片视觉升级 (more.css)
- 新增CSS变量体系:--more-card-surface/surface-strong/border/border-strong
- 核心工具卡:三列网格布局、渐变背景叠加、预览图16:9占位区
- 普通工具卡:增大最小高度至392px、radial-gradient光晕、增强边框
- 卡片预览图:aspect-ratio容器、内边框光效、::after渐变叠加层
- Hover悬浮popover:从卡片底部弹出大图,160ms过渡动画
- CTA按钮强化:渐变背景、内阴影高光、font-weight 850
- :active状态按压反馈(translateY(0)消除位移)
- 阴影系统升级:更深、更柔和的阴影层次

## 4. Prompt案例弹窗响应式重构 (workbench.css)
- 720px断点:从垂直堆叠改为水平左右分栏布局(1.08:0.92)
- 侧边栏从底部面板移至右侧,带左分割线和投影
- 420px断点:紧凑水平分栏(0.9:1.1)、更小字号和间距
- 弹窗增加边框和圆角、关闭按钮毛玻璃效果
- 作者信息采用grid布局、描述文本line-clamp截断

## 5. 响应式细节完善
- more.css 860px: 双列核心卡、增大预览图、调整间距
- more.css 520px: 单列布局、筛选标签横向滚动、CTA按钮全宽
- workbench.css: 各断点prompt-case-modal精确调优
2026-06-08 18:57:07 +08:00
stringadmin 9b7e708f85 Merge pull request 'Codex/generation task reliability' (#27) from codex/generation-task-reliability into master
Reviewed-on: #27
2026-06-08 10:31:08 +00:00
stringadmin 4e97e706fd Add beta application email fields 2026-06-08 18:30:05 +08:00
stringadmin 30536ad15f Fix wan2.7 image quality selection 2026-06-08 18:26:44 +08:00
stringadmin e78cc05299 Merge remote-tracking branch 'origin/master' into codex/generation-task-reliability 2026-06-08 17:39:11 +08:00
stringadmin b88be66e7f Merge pull request 'feat: Workbench SaaS视觉升级与视图重置机制' (#26) from feat/workbench-saas-polish-and-reset into master
Reviewed-on: #26
2026-06-08 09:31:55 +00:00
stringadmin 1a9196a63a Merge branch 'master' into feat/workbench-saas-polish-and-reset 2026-06-08 09:31:49 +00:00
ludan 4dfcb6fc8a feat: Workbench SaaS视觉升级与视图重置机制
本次提交包含以下改进:

## 1. Workbench视图重置机制 (App.tsx + WorkbenchPage.tsx)
- 在App.tsx中新增workbenchResetToken状态,每次导航到workbench页面且存在session时递增token
- WorkbenchPage新增resetToken属性,检测token变化后自动调用handleNewConversation()重置工作台状态
- 重置时清空消息列表和活跃会话ID,确保每次进入工作台都是全新状态

## 2. 滚动操作提示系统 (WorkbenchPage.tsx)
- 新增scrollActionHint状态和hideScrollActionHint/showScrollActionHint方法
- 用户滚动离开消息区域时自动显示滚动方向提示(顶部/底部按钮)
- 1.4秒后自动隐藏提示,优化交互体验
- 手动点击滚动按钮后立即隐藏提示
- 为滚动按钮添加--top/--bottom标识类名,支持独立定位

## 3. Prompt案例弹窗自适应布局 (WorkbenchPage.tsx)
- renderPromptCaseOverlay重构为动态计算moda l类名
- 根据图片实测宽高比(is-tall-media/is-portrait-media)和文案长度(is-long-copy)动态调整布局
- 添加handlePromptCaseImageLoad回调在图片加载后测量尺寸

## 4. Workbench SaaS视觉美化 (workbench.css)
- 全新SaaS风格设计变量(--wb-panel, --wb-line, --wb-shadow等)
- 首页区域:标题样式、Composer输入框圆角/阴影/聚焦态、发送按钮渐变样式
- 模式选择/芯片组件:下拉菜单、悬停态优化、选中态高亮
- 聊天消息区:气泡圆角、头像样式、消息间距、空状态引导
- 图片/视频结果卡片:边框、阴影、标签徽章、视频PLAY标识
- 生成中卡片:停止按钮样式
- 会话侧边栏:折叠态浮动按钮定位、展开态面板样式、选中项左侧指示条
- 滚动快捷键:固定定位圆形按钮、显示/隐藏过渡动画
- Prompt案例弹窗:桌面端毛玻璃双栏布局、移动端底部面板布局
- @media适配:560px/720px/900px/980px四个断点全覆盖

## 5. 全局移动端布局变量 (dark-green.css)
- 新增--dg-mobile-nav-height/gap/space CSS变量,统一移动端底部导航高度计算
- 优化Topbar z-index层级
- 非特殊页面自动添加顶部padding避让移动导航
- Profile弹窗fixed定位及安全区域适配
2026-06-08 17:30:21 +08:00
stringadmin e351e93200 Center beta application review layout 2026-06-08 16:35:32 +08:00
stringadmin 117b9354eb Restore moderation page styles 2026-06-08 16:32:16 +08:00
stringadmin 446514dd06 Fix beta application review page scrolling 2026-06-08 16:26:38 +08:00
stringadmin 85a174bcb5 Avoid clearing sessions on permission errors 2026-06-08 16:20:52 +08:00
stringadmin 560a7baddc Restore image generation estimate to 20 credits 2026-06-08 16:07:04 +08:00
stringadmin 4f7f67a278 Scale generation billing estimates to 1-to-100 credits 2026-06-08 16:03:52 +08:00
stringadmin 3963d9ae2f Show billing estimate and clarify session replacement 2026-06-08 15:55:50 +08:00
stringadmin 60d5cd2edf Merge pull request 'Codex/generation task reliability' (#25) from codex/generation-task-reliability into master
Reviewed-on: #25
2026-06-08 07:49:24 +00:00
stringadmin 2afa73ac18 Align visible credit pricing to 1-to-100 2026-06-08 15:46:31 +08:00
stringadmin 3a1bc0241e feat: add beta application review flow 2026-06-08 15:23:13 +08:00
stringadmin 33723d00f0 Merge remote-tracking branch 'origin/master' into codex/generation-task-reliability 2026-06-08 15:08:26 +08:00
stringadmin 52972d4521 Merge pull request 'feat: 内测申请弹窗 + 电商功能介绍页样式优化' (#24) from feat/dialog-generator-cancel-generation into master
Reviewed-on: #24
2026-06-08 06:59:39 +00:00
OmniAI Developer ce9a7308a3 Merge origin/master into feat/dialog-generator-cancel-generation 2026-06-08 14:46:34 +08:00
OmniAI Developer 192be0e701 feat: 内测申请弹窗 + 电商功能介绍页样式优化
- 新增 BetaApplicationModal 组件,支持文本输入、单/多选、签字等交互

- 顶部通知铃铛左侧添加「内测申请」按钮(脉冲动画)

- 电商功能介绍页等比例放大,减少空白,布局更紧凑

- 右侧卡片区域放大,卡片内容清晰可见
2026-06-08 14:40:47 +08:00
stringadmin 8252f56722 Merge pull request 'Codex/generation task reliability' (#20) from codex/generation-task-reliability into master
Reviewed-on: #20
2026-06-08 05:56:38 +00:00
40 changed files with 4512 additions and 339 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 525 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 KiB

+16 -3
View File
@@ -33,6 +33,7 @@ const CharacterMixPage = lazy(() => import("./features/character-mix/CharacterMi
const CommunityPage = lazy(() => import("./features/community/CommunityPage")); const CommunityPage = lazy(() => import("./features/community/CommunityPage"));
const CommunityCaseAddPage = lazy(() => import("./features/community-review/CommunityCaseAddPage")); const CommunityCaseAddPage = lazy(() => import("./features/community-review/CommunityCaseAddPage"));
const CommunityReviewPage = lazy(() => import("./features/community-review/CommunityReviewPage")); const CommunityReviewPage = lazy(() => import("./features/community-review/CommunityReviewPage"));
const BetaApplicationsPage = lazy(() => import("./features/beta-applications/BetaApplicationsPage"));
const AvatarConsolePage = lazy(() => import("./features/digital-human/AvatarConsolePage")); const AvatarConsolePage = lazy(() => import("./features/digital-human/AvatarConsolePage"));
const DigitalHumanPage = lazy(() => import("./features/digital-human/DigitalHumanPage")); const DigitalHumanPage = lazy(() => import("./features/digital-human/DigitalHumanPage"));
const DialogGeneratorPage = lazy(() => import("./features/dialog-generator/DialogGeneratorPage")); const DialogGeneratorPage = lazy(() => import("./features/dialog-generator/DialogGeneratorPage"));
@@ -109,6 +110,7 @@ const VIEW_KEYS = new Set<WebViewKey>([
"more", "more",
"communityReview", "communityReview",
"communityCaseAdd", "communityCaseAdd",
"betaApplications",
"report", "report",
"providerHealth", "providerHealth",
"userAgreement", "userAgreement",
@@ -124,6 +126,7 @@ const LEGACY_PAGE_STYLE_VIEWS = new Set<WebViewKey>([
"community", "community",
"communityReview", "communityReview",
"communityCaseAdd", "communityCaseAdd",
"betaApplications",
"assets", "assets",
"ecommerce", "ecommerce",
"ecommerceHub", "ecommerceHub",
@@ -157,6 +160,8 @@ function normalizeViewKey(rawView: string): WebViewKey {
? "communityReview" ? "communityReview"
: rawView === "community-case-add" : rawView === "community-case-add"
? "communityCaseAdd" ? "communityCaseAdd"
: rawView === "beta-applications" || rawView === "beta-application-review"
? "betaApplications"
: rawView; : rawView;
return VIEW_KEYS.has(normalized as WebViewKey) ? (normalized as WebViewKey) : "not-found"; return VIEW_KEYS.has(normalized as WebViewKey) ? (normalized as WebViewKey) : "not-found";
} }
@@ -199,7 +204,7 @@ function createWorkflowFromResult(payload: WorkbenchResultActionPayload): WebCan
description: payload.prompt || "从生成结果进入画布继续创作。", description: payload.prompt || "从生成结果进入画布继续创作。",
source: "blank", source: "blank",
settings: { settings: {
model: payload.resultType === "video" ? "Seedance 2.0" : "Nano Banana Pro", model: payload.resultType === "video" ? "Seedance 2.0" : "omni-水果 Pro",
ratio: payload.resultType === "video" ? "16:9" : "1:1", ratio: payload.resultType === "video" ? "16:9" : "1:1",
duration: payload.resultType === "video" ? "6s" : "0s", duration: payload.resultType === "video" ? "6s" : "0s",
resolution: payload.resultType === "video" ? "720p" : "2K", resolution: payload.resultType === "video" ? "720p" : "2K",
@@ -369,6 +374,7 @@ function App() {
}))); })));
const [ecommerceEverMounted, setEcommerceEverMounted] = useState(false); const [ecommerceEverMounted, setEcommerceEverMounted] = useState(false);
const [workbenchResetToken, setWorkbenchResetToken] = useState(0);
const isEcommerceActive = activeView === "ecommerce" || activeView === "ecommerceHub"; const isEcommerceActive = activeView === "ecommerce" || activeView === "ecommerceHub";
useEffect(() => { useEffect(() => {
if (isEcommerceActive && !ecommerceEverMounted) setEcommerceEverMounted(true); if (isEcommerceActive && !ecommerceEverMounted) setEcommerceEverMounted(true);
@@ -454,6 +460,9 @@ function App() {
); );
const handleSetView = useCallback((view: WebViewKey) => { const handleSetView = useCallback((view: WebViewKey) => {
if (view === "workbench" && Boolean(session)) {
setWorkbenchResetToken((token) => token + 1);
}
window.location.hash = `/${view}`; window.location.hash = `/${view}`;
setView(view); setView(view);
if (view !== "login") { if (view !== "login") {
@@ -462,7 +471,7 @@ function App() {
if (isWorkspaceView(view)) { if (isWorkspaceView(view)) {
setWorkspaceExpanded(true); setWorkspaceExpanded(true);
} }
}, [setView, setWorkspaceExpanded]); }, [session, setView, setWorkspaceExpanded]);
const clearAuthenticatedState = useCallback((options?: { resetView?: boolean }) => { const clearAuthenticatedState = useCallback((options?: { resetView?: boolean }) => {
clearAllUserStorage(); clearAllUserStorage();
@@ -1011,7 +1020,7 @@ function App() {
previewUrl: payload.resultUrl, previewUrl: payload.resultUrl,
params: payload.resultType === "video" params: payload.resultType === "video"
? { model: "Kling V3 Omni", aspectRatio: "16:9", resolution: "720p", duration: "6s", videoMode: "text-to-video" } ? { model: "Kling V3 Omni", aspectRatio: "16:9", resolution: "720p", duration: "6s", videoMode: "text-to-video" }
: { model: "Nano Banana Pro", aspectRatio: "1:1", imageSize: "2K" }, : { model: "omni-水果 Pro", aspectRatio: "1:1", imageSize: "2K" },
assetRef: payload.resultOssKey ? { url: payload.resultUrl, ossKey: payload.resultOssKey, mediaType: payload.resultType === "video" ? "video/mp4" : "image/png", sourceTaskId: payload.taskId } : undefined, assetRef: payload.resultOssKey ? { url: payload.resultUrl, ossKey: payload.resultOssKey, mediaType: payload.resultType === "video" ? "video/mp4" : "image/png", sourceTaskId: payload.taskId } : undefined,
}, },
]; ];
@@ -1303,14 +1312,18 @@ function App() {
onOpenReview={() => handleSetView("communityReview")} onOpenReview={() => handleSetView("communityReview")}
/> />
); );
case "betaApplications":
return <BetaApplicationsPage session={session} onOpenLogin={handleOpenLogin} />;
case "workbench": case "workbench":
return ( return (
<WorkbenchPage <WorkbenchPage
key={`workbench-${workbenchResetToken}`}
isAuthenticated={Boolean(session)} isAuthenticated={Boolean(session)}
session={session} session={session}
onRequireLogin={handleRequireTaskLogin} onRequireLogin={handleRequireTaskLogin}
onOpenResultInCanvas={handleOpenResultInCanvas} onOpenResultInCanvas={handleOpenResultInCanvas}
onRefreshUsage={refreshUsage} onRefreshUsage={refreshUsage}
resetToken={workbenchResetToken}
/> />
); );
case "home": case "home":
+139
View File
@@ -0,0 +1,139 @@
import { serverRequest } from "./serverConnection";
export interface BetaApplicationInput {
name: string;
email: string;
phone: string;
wechat: string;
industry: string;
company: string;
city: string;
aiTools: string;
aiDuration: string;
aiTrack: string;
aiDirection: string[];
weeklyUsage: string;
feedbackWilling: string;
wantFeature: string[];
selfStatement: string;
signature: string;
applicationDate: string;
agreeRules: boolean;
}
export type BetaApplicationStatus = "pending" | "approved" | "rejected";
export interface BetaApplicationItem extends BetaApplicationInput {
id: number;
userId: number | null;
username: string | null;
status: BetaApplicationStatus;
inviteCode: string | null;
reviewNote: string | null;
reviewedBy: number | null;
reviewerUsername: string | null;
reviewedAt: string | null;
ipAddress: string | null;
userAgent: string | null;
createdAt: string;
updatedAt: string;
}
export interface BetaApplicationSubmitResult {
id: number;
status: BetaApplicationStatus;
createdAt: string;
}
function readString(value: unknown): string {
return typeof value === "string" ? value : "";
}
function readNullableString(value: unknown): string | null {
return typeof value === "string" && value ? value : null;
}
function readNumberOrNull(value: unknown): number | null {
if (value === null || value === undefined || value === "") return null;
const next = Number(value);
return Number.isFinite(next) ? next : null;
}
function readStringArray(value: unknown): string[] {
return Array.isArray(value) ? value.filter((item): item is string => typeof item === "string") : [];
}
function normalizeStatus(value: unknown): BetaApplicationStatus {
return value === "approved" || value === "rejected" ? value : "pending";
}
function normalizeApplication(raw: unknown): BetaApplicationItem {
const item = raw && typeof raw === "object" && !Array.isArray(raw) ? (raw as Record<string, unknown>) : {};
return {
id: Number(item.id) || 0,
userId: readNumberOrNull(item.userId),
username: readNullableString(item.username),
name: readString(item.name),
email: readString(item.email),
phone: readString(item.phone),
wechat: readString(item.wechat),
industry: readString(item.industry),
company: readString(item.company),
city: readString(item.city),
aiTools: readString(item.aiTools),
aiDuration: readString(item.aiDuration),
aiTrack: readString(item.aiTrack),
aiDirection: readStringArray(item.aiDirection),
weeklyUsage: readString(item.weeklyUsage),
feedbackWilling: readString(item.feedbackWilling),
wantFeature: readStringArray(item.wantFeature),
selfStatement: readString(item.selfStatement),
signature: readString(item.signature),
applicationDate: readString(item.applicationDate),
agreeRules: item.agreeRules === true,
status: normalizeStatus(item.status),
inviteCode: readNullableString(item.inviteCode),
reviewNote: readNullableString(item.reviewNote),
reviewedBy: readNumberOrNull(item.reviewedBy),
reviewerUsername: readNullableString(item.reviewerUsername),
reviewedAt: readNullableString(item.reviewedAt),
ipAddress: readNullableString(item.ipAddress),
userAgent: readNullableString(item.userAgent),
createdAt: readString(item.createdAt),
updatedAt: readString(item.updatedAt),
};
}
export const betaApplicationClient = {
async submit(input: BetaApplicationInput): Promise<BetaApplicationSubmitResult> {
const payload = await serverRequest<{ application: BetaApplicationSubmitResult }>("beta-applications", {
method: "POST",
body: input,
maxRetries: 0,
fallbackMessage: "提交内测申请失败",
});
return payload.application;
},
async listAdminApplications(status?: BetaApplicationStatus | ""): Promise<BetaApplicationItem[]> {
const query = status ? `?status=${encodeURIComponent(status)}` : "";
const payload = await serverRequest<{ applications?: unknown[] }>(`admin/beta-applications${query}`, {
fallbackMessage: "读取内测申请失败",
});
return Array.isArray(payload.applications) ? payload.applications.map(normalizeApplication) : [];
},
async reviewApplication(
id: number,
action: "approve" | "reject",
reviewNote?: string,
): Promise<BetaApplicationItem> {
const payload = await serverRequest<{ application: unknown }>(`admin/beta-applications/${id}`, {
method: "PATCH",
body: { action, reviewNote },
maxRetries: 0,
fallbackMessage: "审核内测申请失败",
});
return normalizeApplication(payload.application);
},
};
+1 -1
View File
@@ -481,7 +481,7 @@ function migrateLegacyWorkflowData(old: Record<string, unknown>, wrapper: Record
description: String(wrapper.description || ""), description: String(wrapper.description || ""),
source: (wrapper.source as WebCanvasWorkflow["source"]) || "blank", source: (wrapper.source as WebCanvasWorkflow["source"]) || "blank",
settings: { settings: {
model: String(isRecord(old.settings) ? old.settings.model || "Nano Banana Pro" : "Nano Banana Pro"), model: String(isRecord(old.settings) ? old.settings.model || "omni-水果 Pro" : "omni-水果 Pro"),
ratio: String(isRecord(old.settings) ? old.settings.ratio || "1:1" : "1:1"), ratio: String(isRecord(old.settings) ? old.settings.ratio || "1:1" : "1:1"),
duration: String(isRecord(old.settings) ? old.settings.duration || "0s" : "0s"), duration: String(isRecord(old.settings) ? old.settings.duration || "0s" : "0s"),
resolution: String(isRecord(old.settings) ? old.settings.resolution || "2K" : "2K"), resolution: String(isRecord(old.settings) ? old.settings.resolution || "2K" : "2K"),
+6 -1
View File
@@ -38,9 +38,14 @@ function normalizeModelOption(raw: unknown): ModelCapabilityOption | null {
const enabled = raw.enabled === undefined ? status !== "maintenance" && status !== "disabled" : Boolean(raw.enabled); const enabled = raw.enabled === undefined ? status !== "maintenance" && status !== "disabled" : Boolean(raw.enabled);
if (!enabled) return null; if (!enabled) return null;
const label = toStringValue(raw.label ?? raw.displayName ?? raw.display_name ?? raw.name, value);
return { return {
value, value,
label: toStringValue(raw.label ?? raw.displayName ?? raw.display_name ?? raw.name, value), label:
value === "wan2.7-image-pro"
? label.replace(/\s*4k\b/i, "").trim() || "wan 2.7 Pro"
: label,
description: toStringValue(raw.description) || undefined, description: toStringValue(raw.description) || undefined,
badge: toStringValue(raw.badge) || undefined, badge: toStringValue(raw.badge) || undefined,
enabled, enabled,
+12
View File
@@ -248,6 +248,17 @@ function isNonAuthErrorCode(code: string | undefined): boolean {
].includes(code); ].includes(code);
} }
function isAuthFailureResponse(status: number, payload: unknown): boolean {
if (status === 401) return true;
if (status !== 403) return false;
const code = getPayloadCode(payload);
if (code === "SESSION_REPLACED" || code === "TOKEN_EXPIRED" || code === "ACCOUNT_DISABLED") return true;
const message = getPayloadMessage(payload) || "";
return /账号已禁用|登录已过期|登录状态|session|token|企业信息不存在/i.test(message);
}
function notifySessionExpired(status: number, response: Response, payload: unknown): void { function notifySessionExpired(status: number, response: Response, payload: unknown): void {
if (status !== 401 && status !== 403) return; if (status !== 401 && status !== 403) return;
if (typeof window === "undefined") return; if (typeof window === "undefined") return;
@@ -263,6 +274,7 @@ function notifySessionExpired(status: number, response: Response, payload: unkno
// Non-auth 403 errors (enterprise model access, insufficient balance) must // Non-auth 403 errors (enterprise model access, insufficient balance) must
// not trigger session expiry. // not trigger session expiry.
if (status === 403 && isNonAuthErrorCode(getPayloadCode(payload))) return; if (status === 403 && isNonAuthErrorCode(getPayloadCode(payload))) return;
if (!isAuthFailureResponse(status, payload)) return;
const now = Date.now(); const now = Date.now();
if (now - lastSessionExpiredEventAt < 1500) return; if (now - lastSessionExpiredEventAt < 1500) return;
+32 -1
View File
@@ -7,6 +7,7 @@ import { ossAssets } from "../data/ossAssets";
import { canManageCommunityCases, canReviewCommunity } from "../features/community-review/communityPermissions"; import { canManageCommunityCases, canReviewCommunity } from "../features/community-review/communityPermissions";
import type { WebNavItem, WebNotification, WebUsageSummary, WebUserSession, WebViewKey } from "../types"; import type { WebNavItem, WebNotification, WebUsageSummary, WebUserSession, WebViewKey } from "../types";
import NotificationCenter from "./NotificationCenter"; import NotificationCenter from "./NotificationCenter";
import BetaApplicationModal from "./BetaApplicationModal";
import { AnimatedPanel } from "./AnimatedPanel"; import { AnimatedPanel } from "./AnimatedPanel";
import AdminMonitor from "./AdminMonitor"; import AdminMonitor from "./AdminMonitor";
import CookieConsentBanner from "./CookieConsentBanner"; import CookieConsentBanner from "./CookieConsentBanner";
@@ -63,6 +64,12 @@ function formatBalance(cents: number): string {
return `${value.toFixed(2)} 积分`; return `${value.toFixed(2)} 积分`;
} }
function canReviewBetaApplications(session: WebUserSession | null): boolean {
const role = String(session?.user.role || "").trim().toLowerCase();
const username = String(session?.user.username || "").trim().toLowerCase();
return role === "admin" || username === "xqy1912";
}
function AppShell({ function AppShell({
activeView, activeView,
navItems, navItems,
@@ -85,6 +92,7 @@ function AppShell({
const [rechargeOpen, setRechargeOpen] = useState(false); const [rechargeOpen, setRechargeOpen] = useState(false);
const [RechargeModal, setRechargeModal] = useState<RechargeModalComponent | null>(null); const [RechargeModal, setRechargeModal] = useState<RechargeModalComponent | null>(null);
const [infoOpen, setInfoOpen] = useState(false); const [infoOpen, setInfoOpen] = useState(false);
const [betaOpen, setBetaOpen] = useState(false);
const infoRef = useRef<HTMLDivElement>(null); const infoRef = useRef<HTMLDivElement>(null);
const [openSubmenuKey, setOpenSubmenuKey] = useState<WebViewKey | null>(null); const [openSubmenuKey, setOpenSubmenuKey] = useState<WebViewKey | null>(null);
const [publicConfig, setPublicConfig] = useState<WebPublicConfig>({}); const [publicConfig, setPublicConfig] = useState<WebPublicConfig>({});
@@ -247,6 +255,7 @@ function AppShell({
const displayedBalanceLabel = session ? formatBalance(displayedBalanceCents) : "0 积分"; const displayedBalanceLabel = session ? formatBalance(displayedBalanceCents) : "0 积分";
const showCommunityReview = canReviewCommunity(session); const showCommunityReview = canReviewCommunity(session);
const showCommunityCaseAdd = canManageCommunityCases(session); const showCommunityCaseAdd = canManageCommunityCases(session);
const showBetaApplicationReview = canReviewBetaApplications(session);
return ( return (
<div <div
@@ -343,6 +352,15 @@ function AppShell({
<span className="brand-lockup__name">OmniAI</span> <span className="brand-lockup__name">OmniAI</span>
</button> </button>
<div className="web-topbar__actions"> <div className="web-topbar__actions">
<button
type="button"
className="beta-apply-button"
title="内测申请"
aria-label="内测申请"
onClick={() => setBetaOpen(true)}
>
</button>
{session && ( {session && (
<NotificationCenter <NotificationCenter
items={notifications} items={notifications}
@@ -475,6 +493,19 @@ function AppShell({
</button> </button>
</> </>
) : null} ) : null}
{showBetaApplicationReview ? (
<button
type="button"
className="profile-popover__review-btn"
onClick={() => {
setProfileOpen(false);
onSelectView("betaApplications");
}}
>
<ShellIcon name="check-circle" />
</button>
) : null}
{showCommunityCaseAdd ? ( {showCommunityCaseAdd ? (
<> <>
<button <button
@@ -502,7 +533,7 @@ function AppShell({
{rechargeOpen && RechargeModal ? ( {rechargeOpen && RechargeModal ? (
<RechargeModal open={rechargeOpen} onClose={() => setRechargeOpen(false)} currentBalance={displayedBalanceCents} /> <RechargeModal open={rechargeOpen} onClose={() => setRechargeOpen(false)} currentBalance={displayedBalanceCents} />
) : null} ) : null}
<CookieConsentBanner /> <BetaApplicationModal open={betaOpen} onClose={() => setBetaOpen(false)} />
</div> </div>
); );
} }
+349
View File
@@ -0,0 +1,349 @@
import { CloseOutlined, ExperimentOutlined } from "@ant-design/icons";
import { useState } from "react";
import { betaApplicationClient } from "../api/betaApplicationClient";
interface BetaApplicationModalProps {
open: boolean;
onClose: () => void;
}
/* ── Form state ── */
interface BetaFormData {
name: string;
email: string;
phone: string;
wechat: string;
industry: string;
company: string;
city: string;
aiTools: string;
aiDuration: string;
aiTrack: string;
aiDirection: string[];
weeklyUsage: string;
feedbackWilling: string;
wantFeature: string[];
selfStatement: string;
signature: string;
applicationDate: string;
agreeRules: boolean;
}
const INITIAL_FORM: BetaFormData = {
name: "",
email: "",
phone: "",
wechat: "",
industry: "",
company: "",
city: "",
aiTools: "",
aiDuration: "",
aiTrack: "",
aiDirection: [],
weeklyUsage: "",
feedbackWilling: "",
wantFeature: [],
selfStatement: "",
signature: "",
applicationDate: "",
agreeRules: false,
};
/* ── Option groups (from the docx) ── */
const AI_DURATION_OPTIONS = ["1年以内", "1-3年", "3-5年", "5年以上"];
const AI_TRACK_OPTIONS = ["是,长期承接相关业务", "业余创作", "新手学习"];
const AI_DIRECTION_OPTIONS = [
"AI短剧批量制作", "漫剧剧情生成", "自媒体短视频", "电商图文及视频素材",
"MCN商业内容", "企业宣传视频", "个人兴趣创作", "其他",
];
const WEEKLY_USAGE_OPTIONS = ["7次及以上", "1-3次", "空闲时间使用"];
const FEEDBACK_OPTIONS = ["全力配合深度反馈", "简单体验留言", "仅使用不反馈"];
const WANT_FEATURE_OPTIONS = [
"一站式短剧漫剧完整AIGC工作流", "电商素材自动化创作流程",
"多模态智能中枢全能创作", "批量自动化创作流程", "全新未公开AI创作玩法",
];
/* ── Helper: single-select radio group ── */
function RadioGroup({
name, options, value, onChange,
}: {
name: string;
options: string[];
value: string;
onChange: (v: string) => void;
}) {
return (
<div className="beta-radio-group">
{options.map((opt) => (
<label key={opt} className="beta-radio">
<input
type="radio"
name={name}
checked={value === opt}
onChange={() => onChange(opt)}
/>
<span>{opt}</span>
</label>
))}
</div>
);
}
/* ── Helper: multi-select checkbox group ── */
function CheckboxGroup({
options, value, onChange,
}: {
options: string[];
value: string[];
onChange: (v: string[]) => void;
}) {
return (
<div className="beta-checkbox-group">
{options.map((opt) => (
<label key={opt} className="beta-checkbox">
<input
type="checkbox"
checked={value.includes(opt)}
onChange={() => {
if (value.includes(opt)) {
onChange(value.filter((item) => item !== opt));
} else {
onChange([...value, opt]);
}
}}
/>
<span>{opt}</span>
</label>
))}
</div>
);
}
/* ── Helper: text field ── */
function TextField({
label, value, onChange, placeholder,
}: {
label: string;
value: string;
onChange: (v: string) => void;
placeholder?: string;
}) {
return (
<div className="beta-text-field">
<span className="beta-text-field__label">{label}</span>
<input
type="text"
className="beta-text-field__input"
value={value}
onChange={(e) => onChange(e.target.value)}
placeholder={placeholder ?? "请填写"}
/>
</div>
);
}
const BetaApplicationModal = ({ open, onClose }: BetaApplicationModalProps) => {
const [form, setForm] = useState<BetaFormData>(INITIAL_FORM);
const [submitting, setSubmitting] = useState(false);
const [message, setMessage] = useState<{ tone: "success" | "error"; text: string } | null>(null);
const update = <K extends keyof BetaFormData>(key: K, value: BetaFormData[K]) => {
setForm((prev) => ({ ...prev, [key]: value }));
setMessage(null);
};
const close = () => {
if (submitting) return;
onClose();
};
const validate = () => {
if (!form.name.trim()) return "请填写姓名 / 常用昵称";
if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(form.email.trim())) return "请填写用于接收内测码的有效邮箱";
if (!form.phone.trim()) return "请填写联系手机号码";
if (!form.wechat.trim()) return "请填写微信账号";
if (!form.selfStatement.trim()) return "请填写申请自述";
if (!form.signature.trim()) return "请填写申请人确认签字";
if (!form.applicationDate.trim()) return "请填写申请日期";
if (!form.agreeRules) return "请先阅读并同意内测规则";
return null;
};
const submit = async () => {
if (submitting) return;
const validationError = validate();
if (validationError) {
setMessage({ tone: "error", text: validationError });
return;
}
setSubmitting(true);
setMessage(null);
try {
await betaApplicationClient.submit({
...form,
name: form.name.trim(),
email: form.email.trim(),
phone: form.phone.trim(),
wechat: form.wechat.trim(),
industry: form.industry.trim(),
company: form.company.trim(),
city: form.city.trim(),
aiTools: form.aiTools.trim(),
aiDuration: form.aiDuration.trim(),
aiTrack: form.aiTrack.trim(),
weeklyUsage: form.weeklyUsage.trim(),
feedbackWilling: form.feedbackWilling.trim(),
selfStatement: form.selfStatement.trim(),
signature: form.signature.trim(),
applicationDate: form.applicationDate.trim(),
});
setForm(INITIAL_FORM);
setMessage({ tone: "success", text: "申请已提交,请留意预留邮箱中的审核结果。" });
} catch (error) {
setMessage({ tone: "error", text: error instanceof Error ? error.message : "提交内测申请失败" });
} finally {
setSubmitting(false);
}
};
if (!open) return null;
return (
<div className="beta-application-modal" role="dialog" aria-modal="true" aria-labelledby="beta-modal-title">
<button type="button" className="beta-application-modal__backdrop" onClick={close} aria-label="关闭内测申请弹窗" />
<section className="beta-application-modal__panel">
{/* ── Header ── */}
<header className="beta-modal-header">
<div className="beta-modal-header__left">
<ExperimentOutlined className="beta-modal-header__icon" />
<div>
<h2 id="beta-modal-title">OmniAI </h2>
<p className="beta-modal-header__subtitle"> · <strong>30 </strong> · <strong>500 50,000 </strong></p>
</div>
</div>
<button type="button" className="beta-modal-header__close" onClick={close} aria-label="关闭" disabled={submitting}>
<CloseOutlined />
</button>
</header>
{/* ── Body (scrollable document) ── */}
<div className="beta-modal-body">
{/* 一、个人基础信息 */}
<section className="beta-doc-section">
<h3 className="beta-doc-section__title"></h3>
<div className="beta-doc-grid">
<TextField label="姓名 / 常用昵称" value={form.name} onChange={(v) => update("name", v)} />
<TextField label="接收内测码邮箱" value={form.email} onChange={(v) => update("email", v)} placeholder="审核通过后内测码将发送到此邮箱" />
<TextField label="联系手机号码" value={form.phone} onChange={(v) => update("phone", v)} />
<TextField label="微信账号" value={form.wechat} onChange={(v) => update("wechat", v)} />
<TextField label="所在行业 / 职业" value={form.industry} onChange={(v) => update("industry", v)} />
<TextField label="所属公司 / 机构" value={form.company} onChange={(v) => update("company", v)} />
<TextField label="所在城市" value={form.city} onChange={(v) => update("city", v)} />
</div>
</section>
{/* 二、AI从业与使用经历 */}
<section className="beta-doc-section">
<h3 className="beta-doc-section__title">AI 使</h3>
<div className="beta-doc-grid">
<TextField label="日常常用 AI 创作工具有哪些" value={form.aiTools} onChange={(v) => update("aiTools", v)} placeholder="例如:Midjourney / Stable Diffusion / ChatGPT 等" />
<div className="beta-form-group">
<span className="beta-form-group__label">AI </span>
<RadioGroup name="aiDuration" options={AI_DURATION_OPTIONS} value={form.aiDuration} onChange={(v) => update("aiDuration", v)} />
</div>
<div className="beta-form-group">
<span className="beta-form-group__label"> AI </span>
<RadioGroup name="aiTrack" options={AI_TRACK_OPTIONS} value={form.aiTrack} onChange={(v) => update("aiTrack", v)} />
</div>
<div className="beta-form-group beta-form-group--full">
<span className="beta-form-group__label"></span>
<CheckboxGroup options={AI_DIRECTION_OPTIONS} value={form.aiDirection} onChange={(v) => update("aiDirection", v)} />
</div>
</div>
</section>
{/* 三、内测使用意向调研 */}
<section className="beta-doc-section">
<h3 className="beta-doc-section__title">使</h3>
<div className="beta-doc-grid">
<div className="beta-form-group">
<span className="beta-form-group__label">使</span>
<RadioGroup name="weeklyUsage" options={WEEKLY_USAGE_OPTIONS} value={form.weeklyUsage} onChange={(v) => update("weeklyUsage", v)} />
</div>
<div className="beta-form-group">
<span className="beta-form-group__label"> BUG</span>
<RadioGroup name="feedback" options={FEEDBACK_OPTIONS} value={form.feedbackWilling} onChange={(v) => update("feedbackWilling", v)} />
</div>
<div className="beta-form-group beta-form-group--full">
<span className="beta-form-group__label"> OmniAI </span>
<CheckboxGroup options={WANT_FEATURE_OPTIONS} value={form.wantFeature} onChange={(v) => update("wantFeature", v)} />
</div>
</div>
</section>
{/* 四、申请自述 */}
<section className="beta-doc-section">
<h3 className="beta-doc-section__title"> <em className="beta-required"></em></h3>
<p className="beta-doc-section__desc"> AI </p>
<textarea
className="beta-textarea"
value={form.selfStatement}
onChange={(e) => update("selfStatement", e.target.value)}
placeholder="请在此填写您的申请自述(必填)…"
rows={6}
/>
</section>
{/* 五、内测规则知情同意书 */}
<section className="beta-doc-section">
<h3 className="beta-doc-section__title"></h3>
<ol className="beta-rules-list">
<li> <strong>30 </strong> + </li>
<li> <strong>500 50,000 </strong>使</li>
<li>线</li>
<li></li>
<li> <strong>48 </strong> </li>
<li>线</li>
</ol>
<label className="beta-agree-row">
<input
type="checkbox"
checked={form.agreeRules}
onChange={(e) => update("agreeRules", e.target.checked)}
/>
<span></span>
</label>
<div className="beta-doc-grid beta-doc-grid--two">
<TextField label="申请人确认签字" value={form.signature} onChange={(v) => update("signature", v)} placeholder="请签署姓名" />
<TextField label="申请填写日期" value={form.applicationDate} onChange={(v) => update("applicationDate", v)} placeholder="例如:2026年6月8日" />
</div>
</section>
</div>
{/* ── Footer ── */}
<footer className="beta-modal-footer">
{message ? (
<p className={`beta-modal-footer__message beta-modal-footer__message--${message.tone}`} role="status">
{message.text}
</p>
) : null}
<button type="button" className="beta-modal-footer__btn beta-modal-footer__btn--secondary" onClick={close} disabled={submitting}>
</button>
<button type="button" className="beta-modal-footer__btn beta-modal-footer__btn--primary" onClick={() => void submit()} disabled={submitting}>
{submitting ? "提交中..." : "提交申请"}
</button>
</footer>
</section>
</div>
);
};
export default BetaApplicationModal;
@@ -29,7 +29,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Pro", subtitle: "Pro",
period: "月付", period: "月付",
price: "299 元 / 月", price: "299 元 / 月",
grant: "每月赠送 10000 积分,30 天有效", grant: "每月赠送 29900 积分,30 天有效",
comparisonLabel: "专业版基础权益", comparisonLabel: "专业版基础权益",
icon: <CrownOutlined />, icon: <CrownOutlined />,
benefits: ["通用大模型全解锁", "积分与 API 消耗 9 折", "并发提升到 3 个", "去水印、插队加速、专属客服"], benefits: ["通用大模型全解锁", "积分与 API 消耗 9 折", "并发提升到 3 个", "去水印、插队加速、专属客服"],
@@ -41,7 +41,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Pro", subtitle: "Pro",
period: "季付", period: "季付",
price: "897 元 / 季", price: "897 元 / 季",
grant: "连续 3 个月按月发放 Pro 积分", grant: "季度合计 89700 积分,默认按月分摊",
comparisonLabel: "相比月付新增", comparisonLabel: "相比月付新增",
badge: "季度", badge: "季度",
icon: <CrownOutlined />, icon: <CrownOutlined />,
@@ -54,7 +54,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Pro", subtitle: "Pro",
period: "年付", period: "年付",
price: "1990 元 / 年", price: "1990 元 / 年",
grant: "全年合计 140000 积分,默认按月分摊", grant: "全年合计 199000 积分,默认按月分摊",
comparisonLabel: "相比季付新增", comparisonLabel: "相比季付新增",
badge: "年费优惠", badge: "年费优惠",
icon: <CrownOutlined />, icon: <CrownOutlined />,
@@ -67,7 +67,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Enterprise", subtitle: "Enterprise",
period: "月付", period: "月付",
price: "499 元 / 月", price: "499 元 / 月",
grant: "每月赠送 2000 积分,30 天有效", grant: "每月赠送 49900 积分,30 天有效",
comparisonLabel: "企业版基础权益", comparisonLabel: "企业版基础权益",
icon: <RocketOutlined />, icon: <RocketOutlined />,
benefits: ["企业私有模型与高性能模型", "默认 10 并发,可申请提升", "积分与 API 消耗 8 折", "用量报表与正式 API 权限"], benefits: ["企业私有模型与高性能模型", "默认 10 并发,可申请提升", "积分与 API 消耗 8 折", "用量报表与正式 API 权限"],
@@ -79,7 +79,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Enterprise", subtitle: "Enterprise",
period: "季付", period: "季付",
price: "1497 元 / 季", price: "1497 元 / 季",
grant: "连续 3 个月按月发放企业版积分", grant: "季度合计 149700 积分,默认按月分摊",
comparisonLabel: "相比月付新增", comparisonLabel: "相比月付新增",
badge: "季度", badge: "季度",
icon: <RocketOutlined />, icon: <RocketOutlined />,
@@ -92,7 +92,7 @@ const membershipPlans: MembershipPlan[] = [
subtitle: "Enterprise", subtitle: "Enterprise",
period: "年付", period: "年付",
price: "4990 元 / 年", price: "4990 元 / 年",
grant: "全年合计 340000 积分,默认按月分摊", grant: "全年合计 499000 积分,默认按月分摊",
comparisonLabel: "相比季付新增", comparisonLabel: "相比季付新增",
badge: "企业年费", badge: "企业年费",
icon: <RocketOutlined />, icon: <RocketOutlined />,
@@ -0,0 +1,298 @@
import {
CheckCircleOutlined,
CloseCircleOutlined,
ExperimentOutlined,
FileSearchOutlined,
LoginOutlined,
ReloadOutlined,
} from "@ant-design/icons";
import { useCallback, useEffect, useMemo, useState } from "react";
import { betaApplicationClient, type BetaApplicationItem, type BetaApplicationStatus } from "../../api/betaApplicationClient";
import WorkspacePageShell from "../../components/WorkspacePageShell";
import type { WebUserSession } from "../../types";
import "../../styles/pages/beta-applications.css";
interface BetaApplicationsPageProps {
session: WebUserSession | null;
onOpenLogin: () => void;
}
type StatusFilter = BetaApplicationStatus | "";
const STATUS_OPTIONS: Array<{ value: StatusFilter; label: string }> = [
{ value: "pending", label: "待审核" },
{ value: "approved", label: "已通过" },
{ value: "rejected", label: "已驳回" },
{ value: "", label: "全部" },
];
const STATUS_LABEL: Record<BetaApplicationStatus, string> = {
pending: "待审核",
approved: "已通过",
rejected: "已驳回",
};
function canReviewBetaApplications(session: WebUserSession | null): boolean {
const role = String(session?.user.role || "").trim().toLowerCase();
const username = String(session?.user.username || "").trim().toLowerCase();
return role === "admin" || username === "xqy1912";
}
function formatDate(value?: string | null): string {
if (!value) return "暂无时间";
const date = new Date(value);
if (Number.isNaN(date.getTime())) return value;
return date.toLocaleString("zh-CN", {
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
});
}
function valueOrEmpty(value?: string | null): string {
return value?.trim() || "未填写";
}
function joinValues(values: string[]): string {
return values.length ? values.join("、") : "未选择";
}
function DetailField({ label, value, wide }: { label: string; value: string; wide?: boolean }) {
return (
<div className={`beta-admin-field${wide ? " beta-admin-field--wide" : ""}`}>
<span>{label}</span>
<strong>{value}</strong>
</div>
);
}
export default function BetaApplicationsPage({ session, onOpenLogin }: BetaApplicationsPageProps) {
const allowed = canReviewBetaApplications(session);
const [status, setStatus] = useState<StatusFilter>("pending");
const [applications, setApplications] = useState<BetaApplicationItem[]>([]);
const [selectedId, setSelectedId] = useState<number | null>(null);
const [reviewNote, setReviewNote] = useState("");
const [loading, setLoading] = useState(false);
const [submitting, setSubmitting] = useState(false);
const [error, setError] = useState<string | null>(null);
const selectedApplication = useMemo(
() => applications.find((item) => item.id === selectedId) ?? applications[0] ?? null,
[applications, selectedId],
);
const load = useCallback(async () => {
if (!allowed) return;
setLoading(true);
setError(null);
try {
const items = await betaApplicationClient.listAdminApplications(status);
setApplications(items);
setSelectedId((current) =>
current && items.some((item) => item.id === current) ? current : (items[0]?.id ?? null),
);
} catch (loadError) {
setApplications([]);
setError(loadError instanceof Error ? loadError.message : "内测申请列表加载失败");
} finally {
setLoading(false);
}
}, [allowed, status]);
useEffect(() => {
void load();
}, [load]);
const handleDecision = async (action: "approve" | "reject") => {
if (!selectedApplication || selectedApplication.status !== "pending" || submitting) return;
setSubmitting(true);
setError(null);
try {
await betaApplicationClient.reviewApplication(selectedApplication.id, action, reviewNote.trim());
setReviewNote("");
await load();
} catch (submitError) {
setError(submitError instanceof Error ? submitError.message : "审核操作失败");
} finally {
setSubmitting(false);
}
};
if (!session) {
return (
<WorkspacePageShell title="内测申请审核" fullWidth className="beta-admin-page page-motion">
<section className="beta-admin-access">
<LoginOutlined />
<h1></h1>
<p> xqy1912</p>
<button type="button" onClick={onOpenLogin}> / </button>
</section>
</WorkspacePageShell>
);
}
if (!allowed) {
return (
<WorkspacePageShell title="内测申请审核" fullWidth className="beta-admin-page page-motion">
<section className="beta-admin-access">
<FileSearchOutlined />
<h1></h1>
<p> admin xqy1912 </p>
</section>
</WorkspacePageShell>
);
}
return (
<WorkspacePageShell title="内测申请审核" fullWidth className="beta-admin-page page-motion">
<div className="beta-admin-page__inner">
<section className="beta-admin-toolbar">
<div>
<span></span>
<h1></h1>
<p></p>
</div>
<button type="button" onClick={() => void load()} disabled={loading}>
<ReloadOutlined />
</button>
</section>
<div className="beta-admin-status-tabs" role="tablist" aria-label="内测申请状态">
{STATUS_OPTIONS.map((option) => (
<button
key={option.value || "all"}
type="button"
role="tab"
aria-selected={status === option.value}
className={status === option.value ? "is-active" : ""}
onClick={() => setStatus(option.value)}
>
{option.label}
</button>
))}
</div>
{error ? <p className="beta-admin-error">{error}</p> : null}
<section className="beta-admin-layout">
<aside className="beta-admin-list" aria-label="内测申请列表">
{loading ? <div className="beta-admin-list__empty">...</div> : null}
{!loading && applications.length === 0 ? (
<div className="beta-admin-list__empty"></div>
) : null}
{applications.map((item) => (
<button
key={item.id}
type="button"
className={`beta-admin-list__item${item.id === selectedApplication?.id ? " is-active" : ""}`}
onClick={() => setSelectedId(item.id)}
>
<span className={`beta-admin-status beta-admin-status--${item.status}`}>{STATUS_LABEL[item.status]}</span>
<strong>{item.name || item.username || `申请 #${item.id}`}</strong>
<small>{item.industry || "未填写行业"} · {formatDate(item.createdAt)}</small>
</button>
))}
</aside>
{selectedApplication ? (
<article className="beta-admin-detail">
<header className="beta-admin-detail__header">
<div>
<span><ExperimentOutlined /> {STATUS_LABEL[selectedApplication.status]}</span>
<h2>{selectedApplication.name || "未填写姓名"}</h2>
<p>{selectedApplication.selfStatement || "申请人未填写自述。"}</p>
</div>
{selectedApplication.inviteCode ? (
<strong className="beta-admin-code">{selectedApplication.inviteCode}</strong>
) : null}
</header>
<section className="beta-admin-form-card">
<h3></h3>
<div className="beta-admin-field-grid">
<DetailField label="姓名 / 常用昵称" value={valueOrEmpty(selectedApplication.name)} />
<DetailField label="接收内测码邮箱" value={valueOrEmpty(selectedApplication.email)} />
<DetailField label="联系手机号码" value={valueOrEmpty(selectedApplication.phone)} />
<DetailField label="微信账号" value={valueOrEmpty(selectedApplication.wechat)} />
<DetailField label="所在行业 / 职业" value={valueOrEmpty(selectedApplication.industry)} />
<DetailField label="所属公司 / 机构" value={valueOrEmpty(selectedApplication.company)} />
<DetailField label="所在城市" value={valueOrEmpty(selectedApplication.city)} />
<DetailField label="关联账号" value={selectedApplication.username || `UID ${selectedApplication.userId ?? "未登录提交"}`} />
<DetailField label="提交时间" value={formatDate(selectedApplication.createdAt)} />
</div>
</section>
<section className="beta-admin-form-card">
<h3>AI 使</h3>
<div className="beta-admin-field-grid">
<DetailField label="常用 AI 创作工具" value={valueOrEmpty(selectedApplication.aiTools)} wide />
<DetailField label="AI 内容创作从业时长" value={valueOrEmpty(selectedApplication.aiDuration)} />
<DetailField label="是否深耕相关赛道" value={valueOrEmpty(selectedApplication.aiTrack)} />
<DetailField label="日常主要创作方向" value={joinValues(selectedApplication.aiDirection)} wide />
</div>
</section>
<section className="beta-admin-form-card">
<h3>使</h3>
<div className="beta-admin-field-grid">
<DetailField label="每周稳定使用次数" value={valueOrEmpty(selectedApplication.weeklyUsage)} />
<DetailField label="反馈意愿" value={valueOrEmpty(selectedApplication.feedbackWilling)} />
<DetailField label="最想体验功能" value={joinValues(selectedApplication.wantFeature)} wide />
</div>
</section>
<section className="beta-admin-form-card">
<h3></h3>
<p className="beta-admin-statement">{selectedApplication.selfStatement || "未填写"}</p>
<div className="beta-admin-field-grid">
<DetailField label="申请人确认签字" value={valueOrEmpty(selectedApplication.signature)} />
<DetailField label="申请填写日期" value={valueOrEmpty(selectedApplication.applicationDate)} />
<DetailField label="同意规则" value={selectedApplication.agreeRules ? "已同意" : "未同意"} />
<DetailField label="IP" value={valueOrEmpty(selectedApplication.ipAddress)} />
<DetailField label="客户端" value={valueOrEmpty(selectedApplication.userAgent)} wide />
</div>
</section>
{selectedApplication.status !== "pending" ? (
<section className="beta-admin-form-card">
<h3></h3>
<div className="beta-admin-field-grid">
<DetailField label="审核人" value={selectedApplication.reviewerUsername || `UID ${selectedApplication.reviewedBy ?? "-"}`} />
<DetailField label="审核时间" value={formatDate(selectedApplication.reviewedAt)} />
<DetailField label="审核备注" value={valueOrEmpty(selectedApplication.reviewNote)} wide />
</div>
</section>
) : (
<section className="beta-admin-review-box">
<label>
<span></span>
<textarea
value={reviewNote}
onChange={(event) => setReviewNote(event.target.value)}
placeholder="填写通过说明或驳回原因;驳回时该备注会作为用户通知内容。"
/>
</label>
<div className="beta-admin-actions">
<button type="button" disabled={submitting} onClick={() => void handleDecision("reject")}>
<CloseCircleOutlined />
</button>
<button type="button" disabled={submitting} onClick={() => void handleDecision("approve")}>
<CheckCircleOutlined />
</button>
</div>
</section>
)}
</article>
) : (
<div className="beta-admin-detail beta-admin-detail--empty"></div>
)}
</section>
</div>
</WorkspacePageShell>
);
}
+7 -7
View File
@@ -58,13 +58,13 @@ export const defaultTextModelId = textModelOptions[0].id;
// --- Image model options --- // --- Image model options ---
export const imageModelOptions: CanvasOption[] = [ export const imageModelOptions: CanvasOption[] = [
{ value: "wan2.7-image", label: "wan 2.7 · 0.20 积分" }, { value: "wan2.7-image", label: "wan 2.7" },
{ value: "wan2.7-image-pro", label: "wan 2.7 Pro · 0.20 积分" }, { value: "wan2.7-image-pro", label: "wan 2.7 Pro" },
{ value: "gpt-image-2", label: "GPT-Image-2 · 0.20 积分" }, { value: "gpt-image-2", label: "omni-GPT" },
{ value: "gpt-image-2-vip", label: "GPT-Image-2 VIP · 0.20 积分" }, { value: "gpt-image-2-vip", label: "omni-GPT VIP" },
{ value: "nano-banana-pro", label: "Nano Banana Pro · 0.20 积分" }, { value: "nano-banana-pro", label: "omni-水果 Pro" },
{ value: "nano-banana-2", label: "Nano Banana 2 · 0.20 积分" }, { value: "nano-banana-2", label: "omni-水果 2" },
{ value: "nano-banana-fast", label: "Nano Banana · 0.20 积分" }, { value: "nano-banana-fast", label: "omni-水果" },
]; ];
export const imageRatioOptions: CanvasOption[] = [ export const imageRatioOptions: CanvasOption[] = [
@@ -10,6 +10,7 @@ import { useEffect, useMemo, useRef, useState, type ChangeEvent } from "react";
import { aiGenerationClient } from "../../api/aiGenerationClient"; import { aiGenerationClient } from "../../api/aiGenerationClient";
import { communityClient } from "../../api/communityClient"; import { communityClient } from "../../api/communityClient";
import WorkspacePageShell from "../../components/WorkspacePageShell"; import WorkspacePageShell from "../../components/WorkspacePageShell";
import "../../styles/pages/compliance.css";
import type { WebCanvasWorkflow, WebUserSession } from "../../types"; import type { WebCanvasWorkflow, WebUserSession } from "../../types";
import { getWorkflowCoverUrl, isCanvasWorkflow } from "../community/communityCaseUtils"; import { getWorkflowCoverUrl, isCanvasWorkflow } from "../community/communityCaseUtils";
import { canManageCommunityCases } from "./communityPermissions"; import { canManageCommunityCases } from "./communityPermissions";
@@ -11,6 +11,7 @@ import { useCallback, useEffect, useMemo, useState } from "react";
import { communityClient, type ServerCommunityCase } from "../../api/communityClient"; import { communityClient, type ServerCommunityCase } from "../../api/communityClient";
import { reportClient, type AdminReportItem } from "../../api/reportClient"; import { reportClient, type AdminReportItem } from "../../api/reportClient";
import WorkspacePageShell from "../../components/WorkspacePageShell"; import WorkspacePageShell from "../../components/WorkspacePageShell";
import "../../styles/pages/compliance.css";
import type { WebUserSession } from "../../types"; import type { WebUserSession } from "../../types";
import { canManageCommunityCases, canReviewCommunity } from "./communityPermissions"; import { canManageCommunityCases, canReviewCommunity } from "./communityPermissions";
+29 -4
View File
@@ -842,6 +842,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
const skipInitialCloneAutoSaveRef = useRef(true); const skipInitialCloneAutoSaveRef = useRef(true);
const skipNextCloneAutoSaveRef = useRef(false); const skipNextCloneAutoSaveRef = useRef(false);
const [activeTool, setActiveTool] = useState<ProductKitToolKey>("clone"); const [activeTool, setActiveTool] = useState<ProductKitToolKey>("clone");
useEffect(() => { setPreviewZoom(1); }, [activeTool]);
const [setImages, setSetImages] = useState<CloneImageItem[]>([]); const [setImages, setSetImages] = useState<CloneImageItem[]>([]);
const [productSetPlatform, setProductSetPlatform] = useState(platformOptions[0]); const [productSetPlatform, setProductSetPlatform] = useState(platformOptions[0]);
const [productSetMarket, setProductSetMarket] = useState(marketOptions[0]); const [productSetMarket, setProductSetMarket] = useState(marketOptions[0]);
@@ -882,6 +883,30 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
const [videoOutfitRefFile, setVideoOutfitRefFile] = useState<File | null>(null); const [videoOutfitRefFile, setVideoOutfitRefFile] = useState<File | null>(null);
const [isCloneSettingsCollapsed, setIsCloneSettingsCollapsed] = useState(false); const [isCloneSettingsCollapsed, setIsCloneSettingsCollapsed] = useState(false);
const [previewZoom, setPreviewZoom] = useState(1); const [previewZoom, setPreviewZoom] = useState(1);
const handlePreviewWheel = (event: React.WheelEvent<HTMLElement>) => {
if (!event.currentTarget) return;
event.preventDefault();
const container = event.currentTarget as HTMLElement;
const rect = container.getBoundingClientRect();
const cursorX = event.clientX - rect.left;
const cursorY = event.clientY - rect.top;
const zoomDelta = event.deltaY < 0 ? 1.08 : 0.92;
const nextZoom = Math.min(2, Math.max(0.25, previewZoom * zoomDelta));
if (nextZoom === previewZoom) return;
const contentX = (cursorX + container.scrollLeft) / previewZoom;
const contentY = (cursorY + container.scrollTop) / previewZoom;
setPreviewZoom(nextZoom);
requestAnimationFrame(() => {
container.scrollLeft = contentX * nextZoom - cursorX;
container.scrollTop = contentY * nextZoom - cursorY;
});
};
const [requirement, setRequirement] = useState(""); const [requirement, setRequirement] = useState("");
const [requirementImageMentionQuery, setRequirementImageMentionQuery] = useState<string | null>(null); const [requirementImageMentionQuery, setRequirementImageMentionQuery] = useState<string | null>(null);
const [cloneSettingName, setCloneSettingName] = useState("新建创作"); const [cloneSettingName, setCloneSettingName] = useState("新建创作");
@@ -2332,7 +2357,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
); );
const setPreview = ( const setPreview = (
<main className="product-clone-preview product-clone-preview--set" aria-label="AI商品套图预览"> <main className="product-clone-preview product-clone-preview--set" aria-label="AI商品套图预览" onWheel={handlePreviewWheel}>
<div className="product-clone-preview__headline"> <div className="product-clone-preview__headline">
<h1></h1> <h1></h1>
<p> <p>
@@ -2400,7 +2425,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
); );
const clonePreview = ( const clonePreview = (
<main className="product-clone-preview clone-ai-preview" aria-label="电商AI作图预览"> <main className="product-clone-preview clone-ai-preview" aria-label="电商AI作图预览" onWheel={handlePreviewWheel}>
<header className="clone-ai-preview-header"> <header className="clone-ai-preview-header">
<strong></strong> <strong></strong>
<span> <span>
@@ -2610,7 +2635,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
); );
const detailPreview = ( const detailPreview = (
<main className="product-clone-preview product-clone-preview--detail" aria-label="A+详情预览"> <main className="product-clone-preview product-clone-preview--detail" aria-label="A+详情预览" onWheel={handlePreviewWheel}>
<div className="product-clone-preview__headline"> <div className="product-clone-preview__headline">
<h1>A+/</h1> <h1>A+/</h1>
<p> <p>
@@ -2647,7 +2672,7 @@ function ProductClonePage(_props: ProductClonePageProps = {}) {
); );
const tryOnPreview = ( const tryOnPreview = (
<main className="product-clone-preview product-clone-preview--try-on" aria-label="服饰穿戴预览"> <main className="product-clone-preview product-clone-preview--try-on" aria-label="服饰穿戴预览" onWheel={handlePreviewWheel}>
<div className="product-clone-preview__headline"> <div className="product-clone-preview__headline">
<h1>AI服饰穿戴</h1> <h1>AI服饰穿戴</h1>
<p>姿</p> <p>姿</p>
+171 -129
View File
@@ -37,117 +37,153 @@ interface MoreTool {
imageTool?: WebImageWorkbenchTool; imageTool?: WebImageWorkbenchTool;
ready: boolean; ready: boolean;
badge?: string; badge?: string;
featured?: boolean;
} }
type CompareScene = const toolPreviewImages: Record<string, string> = {
| "workbench" inpaint: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%B1%80%E9%83%A8%E9%87%8D%E7%BB%98.PNG",
| "inpaint" camera: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E9%95%9C%E5%A4%B4%E5%AE%9E%E9%AA%8C%E5%AE%A4.PNG",
| "camera" upscale: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%88%86%E8%BE%A8%E7%8E%87%E6%8F%90%E5%8D%87.PNG",
| "upscale" watermarkRemoval: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%8E%BB%E6%B0%B4%E5%8D%B0.PNG",
| "watermark" dialogGenerator: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E4%BA%A4%E4%BA%92%E5%BC%8F%E5%AF%B9%E8%AF%9D%E6%A1%86%E7%94%9F%E6%88%90%E5%99%A8.PNG",
| "dialog" subtitleRemoval: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E5%AD%97%E5%B9%95%E5%8E%BB%E9%99%A4.PNG",
| "subtitle" characterMix: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E8%A7%92%E8%89%B2%E8%BF%81%E7%A7%BB.PNG",
| "digital-human" avatarConsole: "https://stringtest.oss-cn-hangzhou.aliyuncs.com/toolbox/images/%E6%95%B0%E5%AD%97%E4%BA%BA%E6%8E%A7%E5%88%B6%E5%8F%B0.PNG",
| "character"
| "avatar";
const toolCompareScenes: Record<string, CompareScene> = {
workbench: "workbench",
inpaint: "inpaint",
camera: "camera",
upscale: "upscale",
watermarkRemoval: "watermark",
dialogGenerator: "dialog",
subtitleRemoval: "subtitle",
digitalHuman: "digital-human",
characterMix: "character",
avatarConsole: "avatar",
}; };
function ToolComparePanel({ scene }: { scene: CompareScene }) { function ToolPreviewPanel({ toolId }: { toolId: string }) {
const imageUrl = toolPreviewImages[toolId];
if (!imageUrl) return null;
return ( return (
<span className={`more-card__compare more-card__compare--${scene}`} aria-hidden="true"> <span className="more-card__preview" aria-hidden="true">
<span className="more-card__compare-labels"> <span className="more-card__preview-frame">
<span>Before</span> <img src={imageUrl} alt="" loading="lazy" decoding="async" />
<span>After</span>
</span>
<span className="more-card__compare-stage">
<span className="more-card__compare-side more-card__compare-side--before">
<span className="more-card__scene-subject" />
<span className="more-card__scene-detail" />
<span className="more-card__scene-overlay" />
</span>
<span className="more-card__compare-divider">
<span />
</span>
<span className="more-card__compare-side more-card__compare-side--after">
<span className="more-card__scene-subject" />
<span className="more-card__scene-detail" />
<span className="more-card__scene-overlay" />
</span>
</span> </span>
<img className="more-card__preview-popover" src={imageUrl} alt="" loading="lazy" decoding="async" />
</span> </span>
); );
} }
const tools: MoreTool[] = [ function getPreviewClassName(toolId: string) {
{ id: "workbench", title: "图片工作台", text: "融合、修复、局部增强", useCase: "适合商品图精修、创意合成和局部画面重做", tags: ["热门", "一站式", "商品图"], icon: <EditOutlined />, category: "image", imageTool: "workbench", ready: true, featured: true }, return toolPreviewImages[toolId] ? " more-card--has-preview" : " more-card--no-preview";
{ id: "inpaint", title: "局部重绘", text: "修掉瑕疵、替换物体、重做局部画面", useCase: "适合快速处理商品瑕疵、人物细节和背景杂物", tags: ["新手推荐", "精修"], icon: <HighlightOutlined />, category: "image", imageTool: "inpaint", ready: true },
{ id: "camera", title: "镜头实验室", text: "快速生成俯拍、特写、广角等商业镜头", useCase: "适合做产品主图、种草图和不同机位方案", tags: ["电商常用", "镜头"], icon: <CameraOutlined />, category: "image", imageTool: "camera", ready: true },
{ id: "upscale", title: "分辨率提升", text: "把低清图片或视频提升到可交付质感", useCase: "适合修复旧素材、放大商品图和增强短视频清晰度", tags: ["高清", "交付前"], icon: <ColumnWidthOutlined />, category: "image", target: "resolutionUpscale", ready: true },
{ id: "watermarkRemoval", title: "去水印", text: "智能去除图片水印、文字和遮挡元素", useCase: "适合整理素材、清理参考图和恢复画面干净度", tags: ["素材清理", "高频"], icon: <DeleteOutlined />, category: "image", target: "watermarkRemoval", ready: true },
{ id: "dialogGenerator", title: "交互式对话框生成器", text: "上传背景图,快速制作可拖拽编辑的对话框", useCase: "适合剧情海报、社媒截图和角色对白设计", tags: ["内容创作", "可编辑"], icon: <MessageOutlined />, category: "image", target: "dialogGenerator", ready: true },
{ id: "subtitleRemoval", title: "字幕去除", text: "擦除视频字幕,让画面重新变干净", useCase: "适合二创前素材整理、短视频重剪和画面修复", tags: ["视频增强", "素材清理"], icon: <DeleteOutlined />, category: "video", target: "subtitleRemoval", ready: true },
{ id: "digitalHuman", title: "数字人", text: "用一张人像和音频生成口播视频", useCase: "适合品牌讲解、课程口播和带货短视频", tags: ["热门", "口播", "视频"], icon: <CustomerServiceOutlined />, category: "video", target: "digitalHuman", ready: true, featured: true },
{ id: "characterMix", title: "角色迁移", text: "把人物图迁移到参考视频的动作里", useCase: "适合角色短片、动作复刻和虚拟人内容生产", tags: ["角色视频", "动作"], icon: <SwapOutlined />, category: "video", target: "characterMix", ready: true },
{ id: "avatarConsole", title: "数字人控制台", text: "管理形象、播报、互动与接入配置", useCase: "适合持续运营数字人、配置品牌形象和复用口播模板", tags: ["运营台", "企业"], icon: <DashboardOutlined />, category: "video", target: "avatarConsole", ready: true },
];
interface FeaturedTool {
id: string;
title: string;
desc: string;
kicker: string;
steps: string[];
outcome: string;
icon: ReactNode;
imageTool?: WebImageWorkbenchTool;
target?: WebViewKey;
category: ToolCategory;
gradient: string;
} }
const featuredTools: FeaturedTool[] = [ const tools: MoreTool[] = [
{ {
id: "workbench", id: "workbench",
title: "图片工作台", title: "图片工作台",
desc: "从一张素材开始,完成精修、合成和二次创作。", text: "融合、修复、局部增强",
kicker: "图片精修工作流", useCase: "适合商品图精修、创意合成和局部画面重做",
steps: ["上传素材", "局部修复", "高清导出"], tags: ["热门", "一站式", "商品图"],
outcome: "适合商品图、海报图和创意视觉",
icon: <EditOutlined />, icon: <EditOutlined />,
imageTool: "workbench",
category: "image", category: "image",
gradient: "linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.06))", imageTool: "workbench",
ready: true,
},
{
id: "inpaint",
title: "局部重绘",
text: "修掉瑕疵、替换物体、重做局部画面",
useCase: "适合快速处理商品瑕疵、人物细节和背景杂物",
tags: ["新手推荐", "精修"],
icon: <HighlightOutlined />,
category: "image",
imageTool: "inpaint",
ready: true,
},
{
id: "camera",
title: "镜头实验室",
text: "快速生成俯拍、特写、广角等商业镜头",
useCase: "适合做产品主图、种草图和不同机位方案",
tags: ["电商常用", "镜头"],
icon: <CameraOutlined />,
category: "image",
imageTool: "camera",
ready: true,
},
{
id: "upscale",
title: "分辨率提升",
text: "把低清图片或视频提升到可交付质感",
useCase: "适合修复旧素材、放大商品图和增强短视频清晰度",
tags: ["高清", "交付前"],
icon: <ColumnWidthOutlined />,
category: "image",
target: "resolutionUpscale",
ready: true,
},
{
id: "watermarkRemoval",
title: "去水印",
text: "智能去除图片水印、文字和遮挡元素",
useCase: "适合整理素材、清理参考图和恢复画面干净度",
tags: ["素材清理", "高频"],
icon: <DeleteOutlined />,
category: "image",
target: "watermarkRemoval",
ready: true,
},
{
id: "dialogGenerator",
title: "交互式对话框生成器",
text: "上传背景图,快速制作可拖拽编辑的对话框",
useCase: "适合剧情海报、社媒截图和角色对白设计",
tags: ["内容创作", "可编辑"],
icon: <MessageOutlined />,
category: "image",
target: "dialogGenerator",
ready: true,
},
{
id: "subtitleRemoval",
title: "字幕去除",
text: "擦除视频字幕,让画面重新变干净",
useCase: "适合二创前素材整理、短视频重剪和画面修复",
tags: ["视频增强", "素材清理"],
icon: <DeleteOutlined />,
category: "video",
target: "subtitleRemoval",
ready: true,
}, },
{ {
id: "digitalHuman", id: "digitalHuman",
title: "数字人", title: "数字人",
desc: "用参考人像和音频,快速生成可交付口播视频", text: "用一张人像和音频生成口播视频",
kicker: "口播视频工作流", useCase: "适合品牌讲解、课程口播和带货短视频",
steps: ["选择人像", "上传音频", "生成视频"], tags: ["热门", "口播", "视频"],
outcome: "适合品牌讲解、课程和带货短视频",
icon: <CustomerServiceOutlined />, icon: <CustomerServiceOutlined />,
target: "digitalHuman",
category: "video", category: "video",
gradient: "linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(6, 182, 212, 0.06))", target: "digitalHuman",
ready: true,
},
{
id: "characterMix",
title: "角色迁移",
text: "把人物图迁移到参考视频的动作里",
useCase: "适合角色短片、动作复刻和虚拟人内容生产",
tags: ["角色视频", "动作"],
icon: <SwapOutlined />,
category: "video",
target: "characterMix",
ready: true,
},
{
id: "avatarConsole",
title: "数字人控制台",
text: "管理形象、播报、互动与接入配置",
useCase: "适合持续运营数字人、配置品牌形象和复用口播模板",
tags: ["运营台", "企业"],
icon: <DashboardOutlined />,
category: "video",
target: "avatarConsole",
ready: true,
}, },
]; ];
const categoryLabels: Record<ToolCategory, string> = { const categoryLabels: Record<ToolCategory, string> = {
image: "图像创作", image: "图像创作",
video: "视频生成", video: "视频创作",
}; };
const categoryIcons: Record<ToolCategory, ReactNode> = { const categoryIcons: Record<ToolCategory, ReactNode> = {
@@ -162,6 +198,20 @@ const filters: { key: FilterKey; label: string }[] = [
{ key: "upcoming", label: "即将上线" }, { key: "upcoming", label: "即将上线" },
]; ];
const coreToolIds = new Set(["workbench", "inpaint", "watermarkRemoval"]);
const coreToolGradients: Record<string, string> = {
workbench: "linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.06))",
inpaint: "linear-gradient(135deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.055))",
watermarkRemoval: "linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(var(--accent-rgb), 0.055))",
};
const coreToolSteps: Record<string, string[]> = {
workbench: ["上传素材", "局部修复", "高清导出"],
inpaint: ["选定区域", "描述修改", "生成结果"],
watermarkRemoval: ["上传素材", "智能识别", "干净导出"],
};
const RECENT_STORAGE_KEY = "omniai:more-recent-tools"; const RECENT_STORAGE_KEY = "omniai:more-recent-tools";
const MAX_RECENT = 4; const MAX_RECENT = 4;
@@ -169,7 +219,9 @@ function getRecentToolIds(): string[] {
try { try {
const raw = localStorage.getItem(RECENT_STORAGE_KEY); const raw = localStorage.getItem(RECENT_STORAGE_KEY);
return raw ? JSON.parse(raw) : []; return raw ? JSON.parse(raw) : [];
} catch { return []; } } catch {
return [];
}
} }
function pushRecentToolId(id: string) { function pushRecentToolId(id: string) {
@@ -199,39 +251,29 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
} }
}, [onOpenImageTool, onSelectView]); }, [onOpenImageTool, onSelectView]);
const openFeaturedTool = useCallback((tool: FeaturedTool) => { const filteredTools = tools.filter((tool) => {
pushRecentToolId(tool.id); if (coreToolIds.has(tool.id)) return false;
setRecentIds(getRecentToolIds());
if (tool.imageTool && onOpenImageTool) {
onOpenImageTool(tool.imageTool);
return;
}
if (tool.target && onSelectView) {
onSelectView(tool.target);
}
}, [onOpenImageTool, onSelectView]);
const filteredTools = tools.filter((t) => {
if (t.featured) return false;
if (filter === "all") return true; if (filter === "all") return true;
if (filter === "upcoming") return !t.ready; if (filter === "upcoming") return !tool.ready;
return t.category === filter; return tool.category === filter;
}); });
const filterCounts: Record<FilterKey, number> = { const filterCounts: Record<FilterKey, number> = {
all: tools.filter((t) => !t.featured).length, all: tools.filter((tool) => !coreToolIds.has(tool.id)).length,
image: tools.filter((t) => !t.featured && t.category === "image").length, image: tools.filter((tool) => !coreToolIds.has(tool.id) && tool.category === "image").length,
video: tools.filter((t) => !t.featured && t.category === "video").length, video: tools.filter((tool) => !coreToolIds.has(tool.id) && tool.category === "video").length,
upcoming: tools.filter((t) => !t.featured && !t.ready).length, upcoming: tools.filter((tool) => !coreToolIds.has(tool.id) && !tool.ready).length,
}; };
const recentTools = recentIds const recentTools = recentIds
.map((id) => tools.find((t) => t.id === id)) .map((id) => tools.find((tool) => tool.id === id))
.filter((t): t is MoreTool => Boolean(t) && (t?.ready ?? false)); .filter((tool): tool is MoreTool => Boolean(tool) && (tool?.ready ?? false));
const groupedTools = filteredTools.reduce<Record<ToolCategory, MoreTool[]>>((acc, t) => { const coreTools = tools.filter((tool) => coreToolIds.has(tool.id));
if (!acc[t.category]) acc[t.category] = [];
acc[t.category].push(t); const groupedTools = filteredTools.reduce<Record<ToolCategory, MoreTool[]>>((acc, tool) => {
if (!acc[tool.category]) acc[tool.category] = [];
acc[tool.category].push(tool);
return acc; return acc;
}, {} as Record<ToolCategory, MoreTool[]>); }, {} as Record<ToolCategory, MoreTool[]>);
@@ -247,19 +289,19 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
</div> </div>
<div className="more-page-v2__header-meta" aria-label="工具盒概览"> <div className="more-page-v2__header-meta" aria-label="工具盒概览">
<span>{tools.filter((tool) => tool.ready).length} </span> <span>{tools.filter((tool) => tool.ready).length} </span>
<span>{featuredTools.length} </span> <span>{coreTools.length} </span>
</div> </div>
<nav className="more-page-v2__filters" aria-label="工具分类筛选"> <nav className="more-page-v2__filters" aria-label="工具分类筛选">
{filters.map((f) => ( {filters.map((item) => (
<button <button
key={f.key} key={item.key}
type="button" type="button"
className={filter === f.key ? "is-active" : ""} className={filter === item.key ? "is-active" : ""}
aria-pressed={filter === f.key} aria-pressed={filter === item.key}
onClick={() => setFilter(f.key)} onClick={() => setFilter(item.key)}
> >
<span>{f.label}</span> <span>{item.label}</span>
<em>{filterCounts[f.key]}</em> <em>{filterCounts[item.key]}</em>
</button> </button>
))} ))}
</nav> </nav>
@@ -298,27 +340,27 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
<ThunderboltOutlined /> <ThunderboltOutlined />
</h2> </h2>
<div className="more-page-v2__featured-grid"> <div className="more-page-v2__featured-grid">
{featuredTools.map((tool) => ( {coreTools.map((tool) => (
<button <button
key={tool.id} key={tool.id}
type="button" type="button"
className="more-card more-card--featured" className={`more-card more-card--featured${getPreviewClassName(tool.id)}`}
style={{ "--card-gradient": tool.gradient } as CSSProperties} style={{ "--card-gradient": coreToolGradients[tool.id] ?? "linear-gradient(135deg, rgba(var(--accent-rgb), 0.12), rgba(var(--accent-rgb), 0.04))" } as CSSProperties}
aria-label={`打开核心工具:${tool.title}${tool.desc}`} aria-label={`打开核心工具:${tool.title}${tool.text}`}
onClick={() => openFeaturedTool(tool)} onClick={() => openTool(tool)}
> >
<span className="more-card__featured-icon">{tool.icon}</span> <span className="more-card__featured-icon">{tool.icon}</span>
<div className="more-card__featured-body"> <div className="more-card__featured-body">
<span className="more-card__featured-kicker">{tool.kicker}</span> <span className="more-card__featured-kicker">{categoryLabels[tool.category]}</span>
<strong>{tool.title}</strong> <strong>{tool.title}</strong>
<ToolComparePanel scene={toolCompareScenes[tool.id]} /> <ToolPreviewPanel toolId={tool.id} />
<span className="more-card__featured-desc">{tool.desc}</span> <span className="more-card__featured-desc">{tool.text}</span>
<span className="more-card__steps" aria-hidden="true"> <span className="more-card__steps" aria-hidden="true">
{tool.steps.map((step) => ( {(coreToolSteps[tool.id] ?? tool.tags.slice(0, 3)).map((step) => (
<span key={step}>{step}</span> <span key={step}>{step}</span>
))} ))}
</span> </span>
<span className="more-card__outcome">{tool.outcome}</span> <span className="more-card__outcome">{tool.useCase}</span>
<span className="more-card__cta">使 </span> <span className="more-card__cta">使 </span>
</div> </div>
</button> </button>
@@ -341,7 +383,7 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
<button <button
key={tool.id} key={tool.id}
type="button" type="button"
className={`more-card${tool.ready ? " more-card--ready" : " more-card--pending"}`} className={`more-card${tool.ready ? " more-card--ready" : " more-card--pending"}${getPreviewClassName(tool.id)}`}
aria-label={tool.ready ? `打开工具:${tool.title}${tool.text}` : `${tool.title}暂未开放`} aria-label={tool.ready ? `打开工具:${tool.title}${tool.text}` : `${tool.title}暂未开放`}
onClick={() => openTool(tool)} onClick={() => openTool(tool)}
disabled={!tool.ready} disabled={!tool.ready}
@@ -353,7 +395,7 @@ function MorePage({ onSelectView, onOpenImageTool }: MorePageProps) {
))} ))}
</span> </span>
<strong>{tool.title}</strong> <strong>{tool.title}</strong>
<ToolComparePanel scene={toolCompareScenes[tool.id]} /> <ToolPreviewPanel toolId={tool.id} />
<span className="more-card__desc">{tool.text}</span> <span className="more-card__desc">{tool.text}</span>
<span className="more-card__use-case">{tool.useCase}</span> <span className="more-card__use-case">{tool.useCase}</span>
<span className="more-card__action"> </span> <span className="more-card__action"> </span>
+1
View File
@@ -2,6 +2,7 @@ import { CheckCircleOutlined, FlagOutlined, MailOutlined, PhoneOutlined } from "
import { useEffect, useState, type FormEvent } from "react"; import { useEffect, useState, type FormEvent } from "react";
import { publicConfigClient, type WebPublicConfig } from "../../api/publicConfigClient"; import { publicConfigClient, type WebPublicConfig } from "../../api/publicConfigClient";
import { reportClient, type ReportInput } from "../../api/reportClient"; import { reportClient, type ReportInput } from "../../api/reportClient";
import "../../styles/pages/compliance.css";
type SubmitState = "idle" | "loading" | "success" | "error"; type SubmitState = "idle" | "loading" | "success" | "error";
+174 -27
View File
@@ -67,7 +67,6 @@ import { downloadResultAsset } from "./workbenchDownload";
import { translateTaskError } from "../../utils/translateTaskError"; import { translateTaskError } from "../../utils/translateTaskError";
import { import {
buildLocalTimeoutMessage, buildLocalTimeoutMessage,
formatTextTokenUsage,
getTaskTimeoutPolicy, getTaskTimeoutPolicy,
isTaskLocallyTimedOut, isTaskLocallyTimedOut,
} from "../../utils/taskLifecycle"; } from "../../utils/taskLifecycle";
@@ -79,10 +78,12 @@ import {
import { isViduModel } from "../../utils/viduRouting"; import { isViduModel } from "../../utils/viduRouting";
import { isPixverseModel } from "../../utils/pixverseRouting"; import { isPixverseModel } from "../../utils/pixverseRouting";
import { resolveVideoRequestModel } from "../../utils/resolveVideoModel"; import { resolveVideoRequestModel } from "../../utils/resolveVideoModel";
import { ENTERPRISE_DEFAULT_VIDEO_MODEL } from "../../utils/enterpriseVideoPolicy"; import { calculateEnterpriseVideoCredits, ENTERPRISE_DEFAULT_VIDEO_MODEL } from "../../utils/enterpriseVideoPolicy";
import { import {
getImageQualityOptions, getImageQualityOptions,
getImageQualityOptionsForContext,
getDefaultImageQuality, getDefaultImageQuality,
getDefaultImageQualityForContext,
getVideoQualityOptions, getVideoQualityOptions,
getDefaultVideoQuality, getDefaultVideoQuality,
getVideoQualityLabel, getVideoQualityLabel,
@@ -201,6 +202,7 @@ interface WorkbenchPageProps {
onRequireLogin: (input: CreatePreviewTaskInput) => void; onRequireLogin: (input: CreatePreviewTaskInput) => void;
onOpenResultInCanvas?: (payload: import("./workbenchConstants").WorkbenchResultActionPayload) => void; onOpenResultInCanvas?: (payload: import("./workbenchConstants").WorkbenchResultActionPayload) => void;
onRefreshUsage?: () => void; onRefreshUsage?: () => void;
resetToken?: number;
} }
// ─── Component ─────────────────────────────────────────────────────────── // ─── Component ───────────────────────────────────────────────────────────
@@ -220,12 +222,19 @@ const MODE_ICONS: Record<WorkbenchMode, ReactNode> = {
video: <VideoCameraOutlined />, video: <VideoCameraOutlined />,
}; };
function formatCreditValue(value: number): string {
if (!Number.isFinite(value)) return "-";
if (value >= 100) return Math.round(value).toLocaleString("zh-CN");
return Number(value.toFixed(2)).toString();
}
function WorkbenchPage({ function WorkbenchPage({
isAuthenticated, isAuthenticated,
session, session,
onRequireLogin, onRequireLogin,
onOpenResultInCanvas, onOpenResultInCanvas,
onRefreshUsage, onRefreshUsage,
resetToken,
}: WorkbenchPageProps) { }: WorkbenchPageProps) {
const textareaRef = useRef<HTMLTextAreaElement | null>(null); const textareaRef = useRef<HTMLTextAreaElement | null>(null);
const referenceInputRef = useRef<HTMLInputElement | null>(null); const referenceInputRef = useRef<HTMLInputElement | null>(null);
@@ -244,10 +253,11 @@ function WorkbenchPage({
const activeConversationIdRef = useRef<number | null>(null); const activeConversationIdRef = useRef<number | null>(null);
const messagesRef = useRef<ChatMessage[]>([]); const messagesRef = useRef<ChatMessage[]>([]);
const conversationMessagesCacheRef = useRef<Map<number, ChatMessage[]>>(new Map()); const conversationMessagesCacheRef = useRef<Map<number, ChatMessage[]>>(new Map());
const skipConversationAutoSelectRef = useRef(false); const skipConversationAutoSelectRef = useRef(Boolean(resetToken));
const keepaliveTasksRef = useRef<Record<string, WorkbenchKeepaliveTask>>(readStoredKeepaliveTasks()); const keepaliveTasksRef = useRef<Record<string, WorkbenchKeepaliveTask>>(readStoredKeepaliveTasks());
const taskAbortControllersRef = useRef<Map<string, AbortController>>(new Map()); const taskAbortControllersRef = useRef<Map<string, AbortController>>(new Map());
const lastScrollTopRef = useRef(0); const lastScrollTopRef = useRef(0);
const scrollActionHintTimerRef = useRef<number | null>(null);
const shouldFollowNewMessagesRef = useRef(true); const shouldFollowNewMessagesRef = useRef(true);
const pendingScrollToLatestRef = useRef(true); const pendingScrollToLatestRef = useRef(true);
const genTracker = useGenerationTasks({ sourceView: "workbench" }); const genTracker = useGenerationTasks({ sourceView: "workbench" });
@@ -256,7 +266,7 @@ function WorkbenchPage({
const [activeMode, setActiveMode] = useState<WorkbenchMode>("video"); const [activeMode, setActiveMode] = useState<WorkbenchMode>("video");
const [inputValue, setInputValue] = useState(""); const [inputValue, setInputValue] = useState("");
const [messages, setMessages] = useState<ChatMessage[]>(() => readStoredMessages()); const [messages, setMessages] = useState<ChatMessage[]>(() => (resetToken ? [] : readStoredMessages()));
const [promptHistory, setPromptHistory] = useState<string[]>(() => readStoredPromptHistory()); const [promptHistory, setPromptHistory] = useState<string[]>(() => readStoredPromptHistory());
const [toolbarMenuId, setToolbarMenuId] = useState<ToolbarMenuId>(null); const [toolbarMenuId, setToolbarMenuId] = useState<ToolbarMenuId>(null);
const [referenceItems, setReferenceItems] = useState<ReferenceItem[]>([]); const [referenceItems, setReferenceItems] = useState<ReferenceItem[]>([]);
@@ -279,7 +289,7 @@ function WorkbenchPage({
const [projectError, setProjectError] = useState<string | null>(null); const [projectError, setProjectError] = useState<string | null>(null);
const [conversations, setConversations] = useState<ConversationSummary[]>([]); const [conversations, setConversations] = useState<ConversationSummary[]>([]);
const [activeConversationId, setActiveConversationId] = useState<number | null>(() => const [activeConversationId, setActiveConversationId] = useState<number | null>(() =>
readStoredActiveConversationId(readStoredMessages()), resetToken ? null : readStoredActiveConversationId(readStoredMessages()),
); );
const [sidebarCollapsed, setSidebarCollapsed] = useState(true); const [sidebarCollapsed, setSidebarCollapsed] = useState(true);
const [deleteDialog, setDeleteDialog] = useState<DeleteDialogState | null>(null); const [deleteDialog, setDeleteDialog] = useState<DeleteDialogState | null>(null);
@@ -289,7 +299,9 @@ function WorkbenchPage({
const [promptSelectionRange, setPromptSelectionRange] = useState({ start: 0, end: 0 }); const [promptSelectionRange, setPromptSelectionRange] = useState({ start: 0, end: 0 });
const [mentionActiveIndex, setMentionActiveIndex] = useState(0); const [mentionActiveIndex, setMentionActiveIndex] = useState(0);
const [composerHidden, setComposerHidden] = useState(false); const [composerHidden, setComposerHidden] = useState(false);
const [scrollActionHint, setScrollActionHint] = useState<"top" | "bottom" | null>(null);
const [workspaceStarted, setWorkspaceStarted] = useState(false); const [workspaceStarted, setWorkspaceStarted] = useState(false);
const lastResetTokenRef = useRef(resetToken);
useEffect(() => { useEffect(() => {
activeConversationIdRef.current = activeConversationId; activeConversationIdRef.current = activeConversationId;
@@ -415,7 +427,6 @@ function WorkbenchPage({
const toolTheme = MODE_META[activeMode]; const toolTheme = MODE_META[activeMode];
const workbenchAccent = "#00ff88"; const workbenchAccent = "#00ff88";
const hasConversationRecords = activeConversationId !== null || messages.length > 0; const hasConversationRecords = activeConversationId !== null || messages.length > 0;
const hasActivatedWorkspace = workspaceStarted || isGenerating || hasConversationRecords;
const referenceCount = referenceItems.length; const referenceCount = referenceItems.length;
const activeVideoModelValue = toHappyHorseDisplayModel(videoModel); const activeVideoModelValue = toHappyHorseDisplayModel(videoModel);
const activeModelValue = const activeModelValue =
@@ -443,6 +454,7 @@ function WorkbenchPage({
[conversations], [conversations],
); );
const hasSidebarRecords = conversationRecords.length > 0; const hasSidebarRecords = conversationRecords.length > 0;
const hasActivatedWorkspace = workspaceStarted || isGenerating || hasConversationRecords;
const activeConversationTitle = useMemo(() => { const activeConversationTitle = useMemo(() => {
if (!activeConversationId) return ""; if (!activeConversationId) return "";
@@ -459,11 +471,72 @@ function WorkbenchPage({
setSidebarCollapsed(!hasSidebarRecords); setSidebarCollapsed(!hasSidebarRecords);
}, [hasSidebarRecords]); }, [hasSidebarRecords]);
const imageQualityOptions = useMemo(() => getImageQualityOptions(imageModel), [imageModel]); const hasImageReferences = activeMode === "image" && referenceItems.some((item) => item.kind === "image");
const isImageGridMode = activeMode === "image" && imageGridMode !== "single";
const imageQualityContext = useMemo(
() => ({
hasReferenceImages: hasImageReferences,
isGridMode: isImageGridMode,
}),
[hasImageReferences, isImageGridMode],
);
const imageQualityOptions = useMemo(
() => getImageQualityOptionsForContext(imageModel, imageQualityContext),
[imageModel, imageQualityContext],
);
const imageGridModeOptions = useMemo(
() =>
String(imageModel || "").toLowerCase().startsWith("wan2.7-")
? GRID_MODE_OPTIONS.filter((option) => option.value !== "grid-25")
: GRID_MODE_OPTIONS,
[imageModel],
);
const videoQualityOptions = getVideoQualityOptions(videoModel); const videoQualityOptions = getVideoQualityOptions(videoModel);
const videoQualityLabel = getVideoQualityLabel(videoModel, videoQuality); const videoQualityLabel = getVideoQualityLabel(videoModel, videoQuality);
const imageSettingsSummary = `${imageRatio} / ${imageQuality}`; const imageSettingsSummary = `${imageRatio} / ${imageQuality}`;
const billingEstimate = useMemo(() => {
if (activeMode === "image") {
return {
label: "预计 20 积分",
title: `图片生成按任务计费:${activeModel}${imageSettingsSummary},预计 20 积分`,
};
}
if (activeMode === "video") {
try {
const durationSeconds = Math.max(1, Math.ceil(Number(videoDuration) || 1));
const credits = calculateEnterpriseVideoCredits({
model: activeModelValue,
resolution: videoQuality,
durationSeconds,
muted: false,
hasReferenceVideo: referenceItems.some((item) => item.kind === "video"),
});
return {
label: `预计 ${formatCreditValue(credits)} 积分`,
title: `${activeModel}${videoQualityLabel}${durationSeconds} 秒,预计 ${formatCreditValue(credits)} 积分`,
};
} catch {
return {
label: "计费以提交后为准",
title: "当前模型的预估计费暂不可用,实际扣费以服务端结算为准",
};
}
}
return {
label: "按 Token 结算",
title: "文本对话按输入、输出 Token 实际用量结算,完成后显示本次积分",
};
}, [
activeMode,
activeModel,
activeModelValue,
imageSettingsSummary,
referenceItems,
videoDuration,
videoQuality,
videoQualityLabel,
]);
const composerPlaceholder = const composerPlaceholder =
referenceItems.length > 0 ? `${toolTheme.placeholder},可输入 @ 引用参考内容` : toolTheme.placeholder; referenceItems.length > 0 ? `${toolTheme.placeholder},可输入 @ 引用参考内容` : toolTheme.placeholder;
const dropdownDirection = hasActivatedWorkspace ? "up" : "down"; const dropdownDirection = hasActivatedWorkspace ? "up" : "down";
@@ -496,6 +569,31 @@ function WorkbenchPage({
}); });
}, []); }, []);
const hideScrollActionHint = useCallback(() => {
if (scrollActionHintTimerRef.current !== null) {
window.clearTimeout(scrollActionHintTimerRef.current);
scrollActionHintTimerRef.current = null;
}
setScrollActionHint(null);
}, []);
const showScrollActionHint = useCallback((direction: "top" | "bottom") => {
if (scrollActionHintTimerRef.current !== null) {
window.clearTimeout(scrollActionHintTimerRef.current);
}
setScrollActionHint(direction);
scrollActionHintTimerRef.current = window.setTimeout(() => {
setScrollActionHint(null);
scrollActionHintTimerRef.current = null;
}, 1400);
}, []);
useEffect(() => () => {
if (scrollActionHintTimerRef.current !== null) {
window.clearTimeout(scrollActionHintTimerRef.current);
}
}, []);
const imageSettingGroups = useMemo<WorkbenchFieldGroup[]>( const imageSettingGroups = useMemo<WorkbenchFieldGroup[]>(
() => [ () => [
{ {
@@ -1128,9 +1226,15 @@ function WorkbenchPage({
useEffect(() => { useEffect(() => {
if (!imageQualityOptions.some((option) => option.value === imageQuality)) { if (!imageQualityOptions.some((option) => option.value === imageQuality)) {
setImageQuality(getDefaultImageQuality(imageModel)); setImageQuality(getDefaultImageQualityForContext(imageModel, imageQualityContext));
} }
}, [imageModel, imageQuality, imageQualityOptions]); }, [imageModel, imageQuality, imageQualityContext, imageQualityOptions]);
useEffect(() => {
if (!imageGridModeOptions.some((option) => option.value === imageGridMode)) {
setImageGridMode("single");
}
}, [imageGridMode, imageGridModeOptions]);
useEffect(() => { useEffect(() => {
if (activeMode !== "video" || videoFrameMode !== "start-end" || referenceItems.length <= 2) return; if (activeMode !== "video" || videoFrameMode !== "start-end" || referenceItems.length <= 2) return;
@@ -1266,6 +1370,12 @@ function WorkbenchPage({
activeConversationIdRef.current = null; activeConversationIdRef.current = null;
}, [syncActiveGenerationUi]); }, [syncActiveGenerationUi]);
useEffect(() => {
if (resetToken === undefined || lastResetTokenRef.current === resetToken) return;
lastResetTokenRef.current = resetToken;
handleNewConversation();
}, [handleNewConversation, resetToken]);
const handleSelectProject = useCallback((id: string) => { const handleSelectProject = useCallback((id: string) => {
if (!id) { if (!id) {
handleNewConversation(); handleNewConversation();
@@ -1420,6 +1530,7 @@ function WorkbenchPage({
const atBottom = top + surface.clientHeight >= surface.scrollHeight - edgeThreshold; const atBottom = top + surface.clientHeight >= surface.scrollHeight - edgeThreshold;
shouldFollowNewMessagesRef.current = atBottom; shouldFollowNewMessagesRef.current = atBottom;
setComposerHidden(!(atTop || atBottom)); setComposerHidden(!(atTop || atBottom));
hideScrollActionHint();
lastScrollTopRef.current = top; lastScrollTopRef.current = top;
}; };
@@ -1434,24 +1545,27 @@ function WorkbenchPage({
shouldFollowNewMessagesRef.current = atBottom; shouldFollowNewMessagesRef.current = atBottom;
if (atTop || atBottom) { if (atTop || atBottom) {
setComposerHidden(false); setComposerHidden(false);
hideScrollActionHint();
} else if (Math.abs(delta) > scrollDeltaThreshold) { } else if (Math.abs(delta) > scrollDeltaThreshold) {
setComposerHidden(true); setComposerHidden(true);
showScrollActionHint(delta < 0 ? "top" : "bottom");
} }
lastScrollTopRef.current = top; lastScrollTopRef.current = top;
}; };
surface.addEventListener("scroll", handleScroll, { passive: true }); surface.addEventListener("scroll", handleScroll, { passive: true });
return () => surface.removeEventListener("scroll", handleScroll); return () => surface.removeEventListener("scroll", handleScroll);
}, [hasActivatedWorkspace]); }, [hasActivatedWorkspace, hideScrollActionHint, showScrollActionHint]);
const scrollMessagesSurface = useCallback((direction: "top" | "bottom") => { const scrollMessagesSurface = useCallback((direction: "top" | "bottom") => {
const surface = messagesSurfaceRef.current; const surface = messagesSurfaceRef.current;
if (!surface) return; if (!surface) return;
const top = direction === "top" ? 0 : surface.scrollHeight; const top = direction === "top" ? 0 : surface.scrollHeight;
hideScrollActionHint();
setComposerHidden(false); setComposerHidden(false);
surface.scrollTo({ top, behavior: "smooth" }); surface.scrollTo({ top, behavior: "smooth" });
}, []); }, [hideScrollActionHint]);
const closeToolbarMenus = () => setToolbarMenuId(null); const closeToolbarMenus = () => setToolbarMenuId(null);
const toggleToolbarMenu = (menuId: Exclude<ToolbarMenuId, null>) => { const toggleToolbarMenu = (menuId: Exclude<ToolbarMenuId, null>) => {
@@ -2545,7 +2659,15 @@ function WorkbenchPage({
} }
}; };
const sendDisabled = !inputValue.trim() || (activeMode !== "chat" && getActiveGenerationTaskCount(getGenerationUserKey(session?.user.id)) >= 3); const activeGenerationCount = getActiveGenerationTaskCount(getGenerationUserKey(session?.user.id));
const generationLimitReached = activeMode !== "chat" && activeGenerationCount >= 3;
const promptIsEmpty = !inputValue.trim();
const sendDisabled = promptIsEmpty || generationLimitReached;
const sendButtonTitle = promptIsEmpty
? "输入内容后可发送"
: generationLimitReached
? `当前已有 ${activeGenerationCount} 个任务进行中,请等待任一任务完成`
: billingEstimate.title;
const suggestedPrompts = [ const suggestedPrompts = [
{ text: "画一个赛博朋克风格的城市夜景", mode: "image" as WorkbenchMode }, { text: "画一个赛博朋克风格的城市夜景", mode: "image" as WorkbenchMode },
@@ -2810,7 +2932,7 @@ function WorkbenchPage({
<SelectChip <SelectChip
chipId="image-grid-mode" chipId="image-grid-mode"
value={imageGridMode} value={imageGridMode}
options={GRID_MODE_OPTIONS} options={imageGridModeOptions}
disabled={disabled} disabled={disabled}
isOpen={toolbarMenuId === "image-grid-mode"} isOpen={toolbarMenuId === "image-grid-mode"}
onToggle={() => toggleToolbarMenu("image-grid-mode")} onToggle={() => toggleToolbarMenu("image-grid-mode")}
@@ -2882,10 +3004,15 @@ function WorkbenchPage({
)} )}
</div> </div>
<div className="wb-composer__toolbar-right"> <div className="wb-composer__toolbar-right">
<span className="wb-composer__billing-estimate" title={billingEstimate.title}>
{billingEstimate.label}
</span>
<button <button
type="button" type="button"
className={`wb-composer__send-primary${isGenerating ? " is-loading" : ""}`} className={`wb-composer__send-primary${isGenerating ? " is-loading" : ""}`}
disabled={sendDisabled || isGenerating} disabled={sendDisabled || isGenerating}
title={isGenerating ? "任务处理中" : sendButtonTitle}
aria-label={isGenerating ? "任务处理中" : sendButtonTitle}
onClick={() => { onClick={() => {
if (getCachedRole() === "admin") console.log("[ai/workbench-send-click]", { if (getCachedRole() === "admin") console.log("[ai/workbench-send-click]", {
mode: activeMode, mode: activeMode,
@@ -2933,9 +3060,29 @@ function WorkbenchPage({
</div> </div>
) : null; ) : null;
const renderPromptCaseOverlay = () => const renderPromptCaseOverlay = () => {
selectedPromptCase ? ( if (!selectedPromptCase) return null;
<div className="wb-prompt-case-modal" role="dialog" aria-modal="true" aria-labelledby="wb-prompt-case-title">
const measuredRatio = promptCaseMeasuredRatios[selectedPromptCase.id];
const ratioParts = selectedPromptCase.ratio.replace(/\s+/g, "").split(":").map(Number);
const declaredRatio =
ratioParts.length === 2 && ratioParts[0] > 0 && ratioParts[1] > 0
? ratioParts[0] / ratioParts[1]
: null;
const caseRatio =
typeof measuredRatio === "number" && Number.isFinite(measuredRatio) && measuredRatio > 0
? measuredRatio
: declaredRatio;
const copyLength = `${selectedPromptCase.summary} ${selectedPromptCase.prompt}`.length;
const modalClassName = [
"wb-prompt-case-modal",
caseRatio && caseRatio < 0.72 ? "is-tall-media" : "",
caseRatio && caseRatio >= 0.72 && caseRatio < 1 ? "is-portrait-media" : "",
copyLength > 260 ? "is-long-copy" : "",
].filter(Boolean).join(" ");
return (
<div className={modalClassName} role="dialog" aria-modal="true" aria-labelledby="wb-prompt-case-title">
<button <button
type="button" type="button"
className="wb-prompt-case-modal__backdrop" className="wb-prompt-case-modal__backdrop"
@@ -2944,7 +3091,11 @@ function WorkbenchPage({
/> />
<section className="wb-prompt-case-modal__panel"> <section className="wb-prompt-case-modal__panel">
<div className="wb-prompt-case-modal__media"> <div className="wb-prompt-case-modal__media">
<img src={selectedPromptCase.imageUrl} alt={selectedPromptCase.title} /> <img
src={selectedPromptCase.imageUrl}
alt={selectedPromptCase.title}
onLoad={(event) => handlePromptCaseImageLoad(selectedPromptCase.id, event)}
/>
</div> </div>
<aside className="wb-prompt-case-modal__sidebar"> <aside className="wb-prompt-case-modal__sidebar">
<button <button
@@ -2984,7 +3135,8 @@ function WorkbenchPage({
</aside> </aside>
</section> </section>
</div> </div>
) : null; );
};
if (!hasActivatedWorkspace) { if (!hasActivatedWorkspace) {
return ( return (
@@ -3079,8 +3231,8 @@ function WorkbenchPage({
</div> </div>
</div> </div>
{renderConversationSidebar()}
</div> </div>
{renderConversationSidebar()}
{renderMessagePreviewOverlay()} {renderMessagePreviewOverlay()}
{renderPromptCaseOverlay()} {renderPromptCaseOverlay()}
{renderDeleteDialog()} {renderDeleteDialog()}
@@ -3166,11 +3318,6 @@ function WorkbenchPage({
<span>{message.taskStatusLabel || generationStatus}</span> <span>{message.taskStatusLabel || generationStatus}</span>
</div> </div>
)} )}
{message.role === "assistant" && message.mode === "chat" && message.status === "completed" && (
<div className="ai-chat-task-billing-note">
{formatTextTokenUsage(message.taskUsage)}
</div>
)}
{(message.resultUrl || (message.result && message.status !== "thinking")) && ( {(message.resultUrl || (message.result && message.status !== "thinking")) && (
<ResultCard <ResultCard
message={message} message={message}
@@ -3227,10 +3374,10 @@ function WorkbenchPage({
{renderComposerToolbar(false, isGenerating)} {renderComposerToolbar(false, isGenerating)}
</div> </div>
</section> </section>
<div className="wb-chat-scroll-actions" aria-label="聊天滚动"> <div className={`wb-chat-scroll-actions${scrollActionHint ? ` is-showing-${scrollActionHint}` : ""}`} aria-label="聊天滚动">
<button <button
type="button" type="button"
className="wb-chat-scroll-actions__button" className="wb-chat-scroll-actions__button wb-chat-scroll-actions__button--top"
title="返回聊天顶部" title="返回聊天顶部"
aria-label="返回聊天顶部" aria-label="返回聊天顶部"
onClick={() => scrollMessagesSurface("top")} onClick={() => scrollMessagesSurface("top")}
@@ -3239,7 +3386,7 @@ function WorkbenchPage({
</button> </button>
<button <button
type="button" type="button"
className="wb-chat-scroll-actions__button" className="wb-chat-scroll-actions__button wb-chat-scroll-actions__button--bottom"
title="到达聊天底部" title="到达聊天底部"
aria-label="到达聊天底部" aria-label="到达聊天底部"
onClick={() => scrollMessagesSurface("bottom")} onClick={() => scrollMessagesSurface("bottom")}
+6 -6
View File
@@ -231,13 +231,13 @@ export const MODE_OPTIONS: WorkbenchOption[] = (Object.keys(MODE_META) as Workbe
})); }));
export const IMAGE_MODEL_OPTIONS: WorkbenchOption[] = [ export const IMAGE_MODEL_OPTIONS: WorkbenchOption[] = [
{ value: "wan2.7-image-pro", label: "wan 2.7 Pro 4K" }, { value: "wan2.7-image-pro", label: "wan 2.7 Pro" },
{ value: "wan2.7-image", label: "wan 2.7" }, { value: "wan2.7-image", label: "wan 2.7" },
{ value: "gpt-image-2", label: "GPT-Image-2" }, { value: "gpt-image-2", label: "omni-GPT" },
{ value: "gpt-image-2-vip", label: "GPT-Image-2 VIP" }, { value: "gpt-image-2-vip", label: "omni-GPT VIP" },
{ value: "nano-banana-pro", label: "Nano Banana Pro" }, { value: "nano-banana-pro", label: "omni-水果 Pro" },
{ value: "nano-banana-2", label: "Nano Banana 2" }, { value: "nano-banana-2", label: "omni-水果 2" },
{ value: "nano-banana-fast", label: "Nano Banana" }, { value: "nano-banana-fast", label: "omni-水果" },
]; ];
export const VIDEO_MODEL_OPTIONS: WorkbenchOption[] = ENTERPRISE_VIDEO_MODEL_OPTIONS.map((option) => ({ ...option })); export const VIDEO_MODEL_OPTIONS: WorkbenchOption[] = ENTERPRISE_VIDEO_MODEL_OPTIONS.map((option) => ({ ...option }));
+2 -2
View File
@@ -33,7 +33,7 @@ const initialState: SessionState = {
loginPromptOpen: false, loginPromptOpen: false,
pendingAction: null, pendingAction: null,
sessionReplacedOpen: false, sessionReplacedOpen: false,
sessionReplacedMessage: '您的账号已在其他设备登录,此设备的登录状态已失效。', sessionReplacedMessage: '当前账号已在其他设备登录,此设备的登录状态已失效。',
}; };
export const useSessionStore = create<SessionState & SessionActions>((set) => ({ export const useSessionStore = create<SessionState & SessionActions>((set) => ({
@@ -55,7 +55,7 @@ export const useSessionStore = create<SessionState & SessionActions>((set) => ({
showSessionReplaced: (message) => set({ showSessionReplaced: (message) => set({
sessionReplacedOpen: true, sessionReplacedOpen: true,
sessionReplacedMessage: message || '您的账号已在其他设备登录(最多同时 2 台设备),此设备的登录状态已失效。', sessionReplacedMessage: message || '当前账号已在其他设备登录,此设备的登录状态已失效。',
}), }),
hideSessionReplaced: () => set({ sessionReplacedOpen: false }), hideSessionReplaced: () => set({ sessionReplacedOpen: false }),
@@ -0,0 +1,471 @@
/* ── Beta Application Modal ── */
/* Word-document style: paper-white panel, larger serif-ish typography, clear form fields */
.beta-application-modal {
position: fixed;
inset: 0;
z-index: 1000;
display: grid;
place-items: center;
}
.beta-application-modal__backdrop {
position: absolute;
inset: 0;
border: 0;
background: rgba(0, 0, 0, 0.58);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
cursor: pointer;
}
/* ── Panel: paper-like document ── */
.beta-application-modal__panel {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
width: min(800px, 94vw);
max-height: 90vh;
overflow: hidden;
border: 1px solid #d9d5cf;
border-radius: 4px;
background: #faf8f4;
color: #1e1e1e;
box-shadow:
0 2px 0 #e8e4dc,
0 4px 0 #d9d5cf,
0 8px 32px rgba(0, 0, 0, 0.2),
0 24px 80px rgba(0, 0, 0, 0.12);
font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
font-size: 14px;
line-height: 1.8;
}
/* ── Header ── */
.beta-modal-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 28px 36px 20px;
border-bottom: 2px solid #1e1e1e;
flex-shrink: 0;
background: #f5f1ea;
}
.beta-modal-header__left {
display: flex;
align-items: center;
gap: 14px;
}
.beta-modal-header__icon {
font-size: 28px;
color: #166534;
flex-shrink: 0;
}
.beta-modal-header h2 {
margin: 0;
font-size: 22px;
font-weight: 900;
color: #1e1e1e;
letter-spacing: 1px;
line-height: 1.3;
}
.beta-modal-header__subtitle {
margin: 2px 0 0;
font-size: 13px;
color: #6b7280;
font-weight: 500;
}
.beta-modal-header__subtitle strong {
color: #166534;
font-weight: 800;
}
.beta-modal-header__close {
display: grid;
width: 34px;
height: 34px;
place-items: center;
border: 1px solid #d5cfc4;
border-radius: 4px;
background: #f5f1ea;
color: #8c8276;
cursor: pointer;
font-size: 14px;
flex-shrink: 0;
transition: background 120ms ease, color 120ms ease;
}
.beta-modal-header__close:hover {
background: #ede6da;
color: #1e1e1e;
}
.beta-modal-header__close:disabled,
.beta-modal-footer__btn:disabled {
opacity: 0.58;
cursor: wait;
}
/* ── Scrollable body ── */
.beta-modal-body {
flex: 1;
overflow-y: auto;
padding: 32px 40px;
background: #faf8f4;
}
/* ── Document sections ── */
.beta-doc-section {
margin-bottom: 28px;
padding-bottom: 28px;
border-bottom: 1px dashed #d9d2c5;
}
.beta-doc-section:last-of-type {
border-bottom: 0;
margin-bottom: 0;
padding-bottom: 0;
}
.beta-doc-section__title {
margin: 0 0 18px;
font-size: 16px;
font-weight: 900;
color: #1e1e1e;
letter-spacing: 0.5px;
}
.beta-required {
color: #dc2626;
font-style: normal;
font-weight: 800;
}
.beta-doc-section__desc {
margin: 0 0 12px;
font-size: 14px;
color: #4b5563;
line-height: 1.7;
}
/* ── Single-column grid for form fields ── */
.beta-doc-grid {
display: flex;
flex-direction: column;
gap: 16px;
}
.beta-doc-grid--two {
margin-top: 14px;
}
/* ── Text field (Word underline style) ── */
.beta-text-field {
display: flex;
align-items: baseline;
gap: 6px;
}
.beta-text-field__label {
font-size: 14px;
font-weight: 700;
color: #1e1e1e;
white-space: nowrap;
flex-shrink: 0;
}
.beta-text-field__label::after {
content: "";
}
.beta-text-field__input {
flex: 1;
min-width: 0;
border: 0;
border-bottom: 1px solid #c5beb2;
outline: none;
background: transparent;
padding: 2px 0;
font-size: 14px;
font-family: inherit;
color: #1e1e1e;
line-height: 1.8;
transition: border-color 140ms ease;
}
.beta-text-field__input::placeholder {
color: #c4c4c4;
font-size: 13px;
}
.beta-text-field__input:focus {
border-bottom-color: #166534;
border-bottom-width: 2px;
margin-bottom: -1px;
}
.beta-text-field__input[readonly] {
color: #6b7280;
cursor: default;
}
/* ── Form group (spans full row when needed) ── */
.beta-form-group {
display: flex;
flex-direction: column;
gap: 8px;
}
.beta-form-group--full {
grid-column: 1 / -1;
}
.beta-form-group__label {
font-size: 14px;
font-weight: 700;
color: #1e1e1e;
}
.beta-form-group__label::after {
content: "";
}
/* ── Radio group ── */
.beta-radio-group {
display: flex;
flex-wrap: wrap;
gap: 6px 14px;
}
.beta-radio {
display: inline-flex;
align-items: center;
gap: 5px;
cursor: pointer;
font-size: 14px;
color: #374151;
padding: 3px 0;
user-select: none;
}
.beta-radio input[type="radio"] {
appearance: none;
width: 16px;
height: 16px;
border: 2px solid #b8b0a4;
border-radius: 50%;
margin: 0;
cursor: pointer;
flex-shrink: 0;
transition: border-color 120ms ease, background 120ms ease;
}
.beta-radio input[type="radio"]:checked {
border-color: #166534;
background: #166534;
box-shadow: inset 0 0 0 3px #ffffff;
}
.beta-radio:hover input[type="radio"] {
border-color: #166534;
}
.beta-radio span {
line-height: 1.5;
}
/* ── Checkbox group ── */
.beta-checkbox-group {
display: flex;
flex-wrap: wrap;
gap: 6px 14px;
}
.beta-checkbox {
display: inline-flex;
align-items: center;
gap: 5px;
cursor: pointer;
font-size: 14px;
color: #374151;
padding: 3px 0;
user-select: none;
}
.beta-checkbox input[type="checkbox"] {
appearance: none;
width: 16px;
height: 16px;
border: 2px solid #b8b0a4;
border-radius: 3px;
margin: 0;
cursor: pointer;
flex-shrink: 0;
transition: border-color 120ms ease, background 120ms ease;
}
.beta-checkbox input[type="checkbox"]:checked {
border-color: #166534;
background: #166534;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-size: 10px;
background-position: center;
background-repeat: no-repeat;
}
.beta-checkbox:hover input[type="checkbox"] {
border-color: #166534;
}
.beta-checkbox span {
line-height: 1.5;
}
/* ── Textarea ── */
.beta-textarea {
width: 100%;
min-height: 140px;
resize: vertical;
border: 1px solid #c5beb2;
border-radius: 4px;
outline: none;
background: #ffffff;
padding: 12px 14px;
font-size: 14px;
font-family: inherit;
color: #1e1e1e;
line-height: 1.8;
transition: border-color 140ms ease;
box-sizing: border-box;
}
.beta-textarea::placeholder {
color: #c4c4c4;
}
.beta-textarea:focus {
border-color: #166534;
box-shadow: 0 0 0 2px rgba(22, 101, 52, 0.1);
}
/* ── Rules list ── */
.beta-rules-list {
margin: 0 0 18px;
padding-left: 22px;
}
.beta-rules-list li {
font-size: 14px;
color: #374151;
line-height: 1.9;
margin-bottom: 4px;
}
.beta-rules-list li strong {
color: #166534;
}
/* ── Agreement checkbox row ── */
.beta-agree-row {
display: flex;
align-items: flex-start;
gap: 8px;
margin-bottom: 18px;
cursor: pointer;
font-size: 14px;
font-weight: 700;
color: #166534;
user-select: none;
}
.beta-agree-row input[type="checkbox"] {
appearance: none;
width: 18px;
height: 18px;
border: 2px solid #b8b0a4;
border-radius: 3px;
margin-top: 2px;
cursor: pointer;
flex-shrink: 0;
transition: border-color 120ms ease, background 120ms ease;
}
.beta-agree-row input[type="checkbox"]:checked {
border-color: #166534;
background: #166534;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
background-size: 12px;
background-position: center;
background-repeat: no-repeat;
}
/* ── Footer ── */
.beta-modal-footer {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 10px;
padding: 16px 36px 20px;
border-top: 1px solid #e0dbd2;
flex-shrink: 0;
background: #f5f1ea;
}
.beta-modal-footer__message {
flex: 1;
margin: 0;
font-size: 13px;
font-weight: 700;
line-height: 1.5;
}
.beta-modal-footer__message--success {
color: #166534;
}
.beta-modal-footer__message--error {
color: #dc2626;
}
.beta-modal-footer__btn {
display: inline-flex;
align-items: center;
justify-content: center;
height: 40px;
padding: 0 24px;
border: 0;
border-radius: 4px;
font-size: 14px;
font-weight: 700;
cursor: pointer;
transition: opacity 120ms ease, transform 120ms ease;
}
.beta-modal-footer__btn:active {
transform: scale(0.97);
}
.beta-modal-footer__btn--secondary {
background: #e8e3d9;
color: #5c5348;
}
.beta-modal-footer__btn--secondary:hover {
background: #dbd4c7;
}
.beta-modal-footer__btn--primary {
background: #166534;
color: #ffffff;
}
.beta-modal-footer__btn--primary:hover {
background: #14532d;
}
+4
View File
@@ -3,6 +3,10 @@
@import "./shell/app-shell.css"; @import "./shell/app-shell.css";
@import "./components/primitives.css"; @import "./components/primitives.css";
@import "./components/legacy-components.css"; @import "./components/legacy-components.css";
@import "./components/recharge-modal.css";
@import "./components/beta-application-modal.css";
@import "./components/dropzone.css";
@import "./components/skeleton.css";
@import "./components/toast.css"; @import "./components/toast.css";
@import "./components/page-transition.css"; @import "./components/page-transition.css";
@import "./components/motion.css"; @import "./components/motion.css";
+421
View File
@@ -0,0 +1,421 @@
.beta-admin-page__inner {
display: flex;
flex-direction: column;
gap: 18px;
width: min(1180px, calc(100vw - 48px));
margin: 0 auto;
height: 100%;
min-height: 0;
padding: 24px;
overflow: hidden;
}
.beta-admin-toolbar {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
}
.beta-admin-toolbar span {
color: var(--accent);
font-size: 12px;
font-weight: 850;
}
.beta-admin-toolbar h1 {
margin: 4px 0;
color: var(--text-primary);
font-size: 22px;
}
.beta-admin-toolbar p {
max-width: 620px;
margin: 0;
color: var(--text-muted);
font-size: 13px;
line-height: 1.7;
}
.beta-admin-toolbar button,
.beta-admin-status-tabs button,
.beta-admin-actions button,
.beta-admin-access button {
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
border: 1px solid var(--border-subtle);
border-radius: 8px;
background: var(--surface-elevated);
color: var(--text-primary);
cursor: pointer;
font-size: 13px;
font-weight: 800;
}
.beta-admin-toolbar button {
min-height: 36px;
padding: 0 14px;
}
.beta-admin-toolbar button:disabled,
.beta-admin-actions button:disabled {
opacity: 0.55;
cursor: wait;
}
.beta-admin-status-tabs {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.beta-admin-status-tabs button {
min-height: 34px;
padding: 0 14px;
color: var(--text-muted);
}
.beta-admin-status-tabs button.is-active {
border-color: rgba(var(--accent-rgb), 0.45);
background: rgba(var(--accent-rgb), 0.14);
color: var(--accent);
}
.beta-admin-error {
margin: 0;
color: var(--error, #ef4444);
font-size: 13px;
font-weight: 700;
}
.beta-admin-layout {
display: grid;
grid-template-columns: 300px minmax(0, 1fr);
gap: 16px;
flex: 1;
min-height: 0;
align-items: start;
}
.beta-admin-list {
display: flex;
flex-direction: column;
gap: 8px;
max-height: 100%;
overflow: auto;
padding-right: 4px;
}
.beta-admin-list__item {
display: grid;
gap: 6px;
width: 100%;
padding: 13px;
border: 1px solid var(--border-subtle);
border-radius: 8px;
background: var(--surface-card);
color: var(--text-primary);
text-align: left;
cursor: pointer;
}
.beta-admin-list__item.is-active {
border-color: rgba(var(--accent-rgb), 0.52);
background: rgba(var(--accent-rgb), 0.1);
}
.beta-admin-list__item strong {
overflow: hidden;
font-size: 14px;
text-overflow: ellipsis;
white-space: nowrap;
}
.beta-admin-list__item small {
overflow: hidden;
color: var(--text-muted);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
.beta-admin-list__empty,
.beta-admin-detail--empty {
display: grid;
min-height: 180px;
place-items: center;
border: 1px dashed var(--border-subtle);
border-radius: 8px;
color: var(--text-muted);
font-size: 13px;
}
.beta-admin-status {
width: fit-content;
padding: 2px 8px;
border-radius: 999px;
font-size: 12px;
font-weight: 850;
}
.beta-admin-status--pending {
background: rgba(245, 158, 11, 0.16);
color: #f59e0b;
}
.beta-admin-status--approved {
background: rgba(16, 185, 129, 0.16);
color: #10b981;
}
.beta-admin-status--rejected {
background: rgba(239, 68, 68, 0.16);
color: #ef4444;
}
.beta-admin-detail {
display: flex;
flex-direction: column;
gap: 14px;
min-width: 0;
max-height: 100%;
min-height: 0;
overflow: auto;
padding-right: 4px;
}
.beta-admin-detail__header,
.beta-admin-form-card,
.beta-admin-review-box {
border: 1px solid var(--border-subtle);
border-radius: 8px;
background: var(--surface-card);
}
.beta-admin-detail__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 16px;
padding: 18px;
}
.beta-admin-detail__header span {
display: inline-flex;
align-items: center;
gap: 6px;
color: var(--accent);
font-size: 12px;
font-weight: 850;
}
.beta-admin-detail__header h2 {
margin: 5px 0 8px;
color: var(--text-primary);
font-size: 20px;
}
.beta-admin-detail__header p {
display: -webkit-box;
overflow: hidden;
margin: 0;
color: var(--text-muted);
font-size: 13px;
line-height: 1.7;
-webkit-box-orient: vertical;
-webkit-line-clamp: 3;
}
.beta-admin-code {
flex-shrink: 0;
padding: 8px 10px;
border: 1px solid rgba(var(--accent-rgb), 0.35);
border-radius: 8px;
background: rgba(var(--accent-rgb), 0.12);
color: var(--accent);
font-size: 13px;
}
.beta-admin-form-card {
padding: 16px;
}
.beta-admin-form-card h3 {
margin: 0 0 12px;
color: var(--text-primary);
font-size: 15px;
}
.beta-admin-field-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.beta-admin-field {
min-width: 0;
padding: 10px;
border: 1px solid var(--border-subtle);
border-radius: 6px;
background: var(--surface-elevated);
}
.beta-admin-field--wide {
grid-column: 1 / -1;
}
.beta-admin-field span {
display: block;
margin-bottom: 4px;
color: var(--text-muted);
font-size: 12px;
}
.beta-admin-field strong {
display: block;
overflow-wrap: anywhere;
color: var(--text-primary);
font-size: 13px;
line-height: 1.6;
white-space: pre-wrap;
}
.beta-admin-statement {
margin: 0 0 12px;
padding: 12px;
border: 1px solid var(--border-subtle);
border-radius: 6px;
background: var(--surface-elevated);
color: var(--text-primary);
font-size: 13px;
line-height: 1.8;
white-space: pre-wrap;
}
.beta-admin-review-box {
padding: 16px;
}
.beta-admin-review-box label {
display: grid;
gap: 8px;
}
.beta-admin-review-box label span {
color: var(--text-primary);
font-size: 13px;
font-weight: 850;
}
.beta-admin-review-box textarea {
width: 100%;
min-height: 92px;
resize: vertical;
border: 1px solid var(--border-subtle);
border-radius: 8px;
background: var(--surface-elevated);
color: var(--text-primary);
font: inherit;
font-size: 13px;
line-height: 1.7;
outline: none;
padding: 10px;
}
.beta-admin-actions {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 12px;
}
.beta-admin-actions button {
min-height: 38px;
padding: 0 16px;
}
.beta-admin-actions button:first-child {
border-color: rgba(239, 68, 68, 0.35);
color: #ef4444;
}
.beta-admin-actions button:last-child {
border-color: rgba(16, 185, 129, 0.35);
background: rgba(16, 185, 129, 0.14);
color: #10b981;
}
.beta-admin-access {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
min-height: 420px;
color: var(--text-muted);
text-align: center;
}
.beta-admin-access svg {
color: var(--accent);
font-size: 28px;
}
.beta-admin-access h1 {
margin: 0;
color: var(--text-primary);
font-size: 20px;
}
.beta-admin-access p {
margin: 0;
font-size: 13px;
}
.beta-admin-access button {
min-height: 38px;
padding: 0 18px;
border-color: rgba(var(--accent-rgb), 0.38);
background: rgba(var(--accent-rgb), 0.14);
color: var(--accent);
}
@media (max-width: 900px) {
.beta-admin-page__inner {
width: min(100%, calc(100vw - 24px));
padding: 16px 12px;
overflow: auto;
}
.beta-admin-toolbar,
.beta-admin-detail__header {
flex-direction: column;
}
.beta-admin-layout {
grid-template-columns: 1fr;
overflow: visible;
}
.beta-admin-list {
max-height: none;
}
.beta-admin-detail {
max-height: none;
overflow: visible;
padding-right: 0;
}
}
@media (max-width: 640px) {
.beta-admin-field-grid {
grid-template-columns: 1fr;
}
.beta-admin-actions {
flex-direction: column;
}
}
+47 -47
View File
@@ -480,7 +480,7 @@
.omni-home__feature-page.is-script, .omni-home__feature-page.is-script,
.omni-home__feature-page.is-model, .omni-home__feature-page.is-model,
.omni-home__feature-page.is-ecommerce { .omni-home__feature-page.is-ecommerce {
--home-showcase-page-pad-y: clamp(10px, 1.8vw, 24px); --home-showcase-page-pad-y: clamp(4px, 0.8vw, 12px);
display: grid; display: grid;
grid-template-columns: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
gap: 0; gap: 0;
@@ -965,11 +965,12 @@
position: relative; position: relative;
z-index: 2; z-index: 2;
display: flex; display: flex;
align-items: center;
width: 100%; width: 100%;
height: 100%; height: 100%;
min-height: inherit; min-height: inherit;
gap: clamp(30px, 2.6cqw, 56px); gap: clamp(30px, 2.6cqw, 56px);
padding: clamp(24px, 2.2cqw, 46px) clamp(36px, 3.7cqw, 72px); padding: clamp(12px, 1.2cqw, 24px) clamp(24px, 2.4cqw, 48px);
} }
.omni-home-ecommerce-matrix .left-panel, .omni-home-ecommerce-matrix .left-panel,
@@ -981,10 +982,10 @@
.omni-home-ecommerce-matrix .left-panel { .omni-home-ecommerce-matrix .left-panel {
display: flex; display: flex;
flex: 0 0 clamp(320px, 24cqw, 450px); flex: 0 0 clamp(360px, 29cqw, 540px);
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
gap: clamp(16px, 1.1cqw, 26px); gap: clamp(22px, 1.6cqw, 34px);
min-width: 0; min-width: 0;
} }
@@ -997,7 +998,7 @@
.omni-home-ecommerce-matrix .hero-title { .omni-home-ecommerce-matrix .hero-title {
color: var(--matrix-text-primary); color: var(--matrix-text-primary);
font-size: clamp(40px, 3cqw, 58px); font-size: clamp(48px, 3.6cqw, 72px);
font-weight: 900; font-weight: 900;
letter-spacing: 0; letter-spacing: 0;
line-height: 1.08; line-height: 1.08;
@@ -1009,7 +1010,7 @@
.omni-home-ecommerce-matrix .hero-desc { .omni-home-ecommerce-matrix .hero-desc {
color: var(--matrix-text-secondary); color: var(--matrix-text-secondary);
font-size: clamp(16px, 1.2cqw, 22px); font-size: clamp(19px, 1.4cqw, 26px);
font-weight: 500; font-weight: 500;
letter-spacing: 0.2px; letter-spacing: 0.2px;
line-height: 1.55; line-height: 1.55;
@@ -1018,20 +1019,20 @@
.omni-home-ecommerce-matrix .features { .omni-home-ecommerce-matrix .features {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: clamp(12px, 0.95cqw, 18px); gap: clamp(16px, 1.2cqw, 24px);
} }
.omni-home-ecommerce-matrix .feature-item { .omni-home-ecommerce-matrix .feature-item {
position: relative; position: relative;
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
gap: 12px; gap: 14px;
overflow: hidden; overflow: hidden;
border: 1px solid var(--matrix-border-subtle); border: 1px solid var(--matrix-border-subtle);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
background: var(--matrix-card-surface); background: var(--matrix-card-surface);
min-height: clamp(70px, 4.6cqw, 92px); min-height: clamp(88px, 5.8cqw, 114px);
padding: clamp(16px, 1.2cqw, 24px); padding: clamp(20px, 1.5cqw, 30px);
box-shadow: var(--matrix-shadow-card); box-shadow: var(--matrix-shadow-card);
backdrop-filter: var(--matrix-glass-blur); backdrop-filter: var(--matrix-glass-blur);
-webkit-backdrop-filter: var(--matrix-glass-blur); -webkit-backdrop-filter: var(--matrix-glass-blur);
@@ -1064,15 +1065,15 @@
position: relative; position: relative;
z-index: 1; z-index: 1;
display: flex; display: flex;
flex: 0 0 clamp(44px, 2.8cqw, 56px); flex: 0 0 clamp(50px, 3.4cqw, 64px);
width: clamp(44px, 2.8cqw, 56px); width: clamp(50px, 3.4cqw, 64px);
height: clamp(44px, 2.8cqw, 56px); height: clamp(50px, 3.4cqw, 64px);
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border: 1px solid rgba(0, 255, 136, 0.2); border: 1px solid rgba(0, 255, 136, 0.2);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(168, 85, 247, 0.15)); background: linear-gradient(135deg, rgba(0, 255, 136, 0.15), rgba(168, 85, 247, 0.15));
font-size: clamp(20px, 1.4cqw, 28px); font-size: clamp(24px, 1.6cqw, 32px);
} }
.omni-home-ecommerce-matrix .feature-text { .omni-home-ecommerce-matrix .feature-text {
@@ -1082,15 +1083,15 @@
.omni-home-ecommerce-matrix .feature-text h4 { .omni-home-ecommerce-matrix .feature-text h4 {
color: var(--matrix-text-primary); color: var(--matrix-text-primary);
font-size: clamp(18px, 1.2cqw, 24px); font-size: clamp(20px, 1.4cqw, 26px);
font-weight: 750; font-weight: 750;
line-height: 1.25; line-height: 1.25;
} }
.omni-home-ecommerce-matrix .feature-text p { .omni-home-ecommerce-matrix .feature-text p {
margin-top: 6px; margin-top: 8px;
color: var(--matrix-text-dim); color: var(--matrix-text-dim);
font-size: clamp(13px, 0.9cqw, 17px); font-size: clamp(15px, 1cqw, 19px);
font-weight: 500; font-weight: 500;
letter-spacing: 0.1px; letter-spacing: 0.1px;
line-height: 1.5; line-height: 1.5;
@@ -1100,12 +1101,11 @@
display: flex; display: flex;
align-items: center; align-items: center;
gap: 0; gap: 0;
margin-top: auto;
border: 1px solid var(--matrix-border-subtle); border: 1px solid var(--matrix-border-subtle);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
background: var(--matrix-card-surface); background: var(--matrix-card-surface);
min-height: clamp(72px, 4.6cqw, 92px); min-height: clamp(88px, 5.8cqw, 114px);
padding: clamp(14px, 1.1cqw, 22px) clamp(16px, 1.4cqw, 26px); padding: clamp(18px, 1.4cqw, 28px) clamp(20px, 1.7cqw, 34px);
box-shadow: var(--matrix-shadow-card); box-shadow: var(--matrix-shadow-card);
backdrop-filter: var(--matrix-glass-blur); backdrop-filter: var(--matrix-glass-blur);
-webkit-backdrop-filter: var(--matrix-glass-blur); -webkit-backdrop-filter: var(--matrix-glass-blur);
@@ -1117,18 +1117,18 @@
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
gap: 6px; gap: 8px;
min-width: 0; min-width: 0;
} }
.omni-home-ecommerce-matrix .step-icon { .omni-home-ecommerce-matrix .step-icon {
font-size: clamp(18px, 1.2cqw, 24px); font-size: clamp(22px, 1.4cqw, 28px);
line-height: 1; line-height: 1;
} }
.omni-home-ecommerce-matrix .step-label { .omni-home-ecommerce-matrix .step-label {
color: var(--matrix-text-secondary); color: var(--matrix-text-secondary);
font-size: clamp(12px, 0.82cqw, 16px); font-size: clamp(14px, 0.95cqw, 18px);
font-weight: 650; font-weight: 650;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
@@ -1136,7 +1136,7 @@
.omni-home-ecommerce-matrix .step-sub { .omni-home-ecommerce-matrix .step-sub {
color: var(--matrix-text-dim); color: var(--matrix-text-dim);
font-size: clamp(10px, 0.7cqw, 13px); font-size: clamp(11px, 0.78cqw, 14px);
letter-spacing: 0.5px; letter-spacing: 0.5px;
line-height: 1; line-height: 1;
white-space: nowrap; white-space: nowrap;
@@ -1171,22 +1171,22 @@
.omni-home-ecommerce-matrix .center-panel { .omni-home-ecommerce-matrix .center-panel {
display: flex; display: flex;
flex: 0 0 clamp(310px, 22cqw, 430px); flex: 0 0 clamp(350px, 26cqw, 500px);
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
gap: 16px; gap: 20px;
min-width: 0; min-width: 0;
} }
.omni-home-ecommerce-matrix .input-card { .omni-home-ecommerce-matrix .input-card {
position: relative; position: relative;
z-index: 3; z-index: 3;
width: min(100%, clamp(310px, 21cqw, 420px)); width: min(100%, clamp(350px, 24cqw, 480px));
border: 1px solid var(--matrix-border-default); border: 1px solid var(--matrix-border-default);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
background: var(--matrix-card-elevated); background: var(--matrix-card-elevated);
padding: clamp(20px, 1.45cqw, 30px); padding: clamp(24px, 1.7cqw, 36px);
box-shadow: var(--matrix-shadow-elevated), 0 0 60px rgba(0, 255, 136, 0.08); box-shadow: var(--matrix-shadow-elevated), 0 0 60px rgba(0, 255, 136, 0.08);
backdrop-filter: var(--matrix-glass-blur); backdrop-filter: var(--matrix-glass-blur);
-webkit-backdrop-filter: var(--matrix-glass-blur); -webkit-backdrop-filter: var(--matrix-glass-blur);
@@ -1218,12 +1218,12 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 8px; gap: 8px;
margin-bottom: clamp(16px, 1.1cqw, 24px); margin-bottom: clamp(20px, 1.4cqw, 30px);
} }
.omni-home-ecommerce-matrix .input-card-label { .omni-home-ecommerce-matrix .input-card-label {
color: var(--matrix-cyan); color: var(--matrix-cyan);
font-size: clamp(14px, 1cqw, 18px); font-size: clamp(16px, 1.15cqw, 22px);
font-weight: 800; font-weight: 800;
letter-spacing: 1.2px; letter-spacing: 1.2px;
text-transform: uppercase; text-transform: uppercase;
@@ -1235,7 +1235,7 @@
border-radius: 6px; border-radius: 6px;
background: rgba(255, 255, 255, 0.04); background: rgba(255, 255, 255, 0.04);
color: var(--matrix-text-dim); color: var(--matrix-text-dim);
font-size: clamp(12px, 0.9cqw, 16px); font-size: clamp(13px, 0.95cqw, 17px);
letter-spacing: 0.5px; letter-spacing: 0.5px;
padding: 6px 12px; padding: 6px 12px;
white-space: nowrap; white-space: nowrap;
@@ -1408,9 +1408,9 @@
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
gap: clamp(16px, 1.35cqw, 28px); gap: clamp(22px, 1.6cqw, 34px);
min-width: 0; min-width: 0;
padding-left: clamp(34px, 3.4cqw, 78px); padding-left: clamp(8px, 0.8cqw, 24px);
} }
.omni-home-ecommerce-matrix .ai-node { .omni-home-ecommerce-matrix .ai-node {
@@ -1418,13 +1418,13 @@
z-index: 4; z-index: 4;
display: flex; display: flex;
align-items: center; align-items: center;
gap: clamp(12px, 1cqw, 18px); gap: clamp(14px, 1.15cqw, 22px);
width: 100%; width: 100%;
border: 1px solid var(--matrix-border-default); border: 1px solid var(--matrix-border-default);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
background: var(--matrix-card-highlight); background: var(--matrix-card-highlight);
min-height: clamp(54px, 3.8cqw, 72px); min-height: clamp(62px, 4.4cqw, 82px);
padding: 12px clamp(16px, 1.4cqw, 26px); padding: 14px clamp(18px, 1.6cqw, 30px);
box-shadow: var(--matrix-shadow-card), var(--matrix-shadow-glow-purple); box-shadow: var(--matrix-shadow-card), var(--matrix-shadow-glow-purple);
backdrop-filter: var(--matrix-glass-blur); backdrop-filter: var(--matrix-glass-blur);
-webkit-backdrop-filter: var(--matrix-glass-blur); -webkit-backdrop-filter: var(--matrix-glass-blur);
@@ -1443,7 +1443,7 @@
.omni-home-ecommerce-matrix .ai-node-title { .omni-home-ecommerce-matrix .ai-node-title {
flex-shrink: 0; flex-shrink: 0;
color: var(--matrix-cyan); color: var(--matrix-cyan);
font-size: clamp(12px, 0.82cqw, 16px); font-size: clamp(14px, 0.95cqw, 18px);
font-weight: 850; font-weight: 850;
letter-spacing: 1.6px; letter-spacing: 1.6px;
text-transform: uppercase; text-transform: uppercase;
@@ -1457,7 +1457,7 @@
.omni-home-ecommerce-matrix .ai-node-list { .omni-home-ecommerce-matrix .ai-node-list {
display: flex; display: flex;
flex: 1; flex: 1;
gap: clamp(8px, 0.75cqw, 14px); gap: clamp(10px, 0.85cqw, 16px);
min-width: 0; min-width: 0;
} }
@@ -1467,10 +1467,10 @@
border-radius: 4px; border-radius: 4px;
background: rgba(255, 255, 255, 0.03); background: rgba(255, 255, 255, 0.03);
color: var(--matrix-text-secondary); color: var(--matrix-text-secondary);
font-size: clamp(11px, 0.78cqw, 15px); font-size: clamp(12px, 0.85cqw, 16px);
letter-spacing: 0.2px; letter-spacing: 0.2px;
line-height: 1.3; line-height: 1.3;
padding: 7px clamp(10px, 0.9cqw, 16px); padding: 8px clamp(12px, 1cqw, 18px);
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
@@ -1478,28 +1478,28 @@
.omni-home-ecommerce-matrix .output-group { .omni-home-ecommerce-matrix .output-group {
display: flex; display: flex;
align-items: center; align-items: center;
gap: clamp(14px, 1.1cqw, 22px); gap: clamp(16px, 1.3cqw, 26px);
min-width: 0; min-width: 0;
} }
.omni-home-ecommerce-matrix .output-label { .omni-home-ecommerce-matrix .output-label {
flex: 0 0 clamp(96px, 6.5cqw, 132px); flex: 0 0 clamp(72px, 5cqw, 100px);
padding-right: 4px; padding-right: 4px;
text-align: right; text-align: right;
} }
.omni-home-ecommerce-matrix .output-label h4 { .omni-home-ecommerce-matrix .output-label h4 {
color: var(--matrix-text-primary); color: var(--matrix-text-primary);
font-size: clamp(18px, 1.3cqw, 25px); font-size: clamp(20px, 1.45cqw, 28px);
font-weight: 850; font-weight: 850;
letter-spacing: 0.3px; letter-spacing: 0.3px;
line-height: 1.2; line-height: 1.2;
} }
.omni-home-ecommerce-matrix .output-label p { .omni-home-ecommerce-matrix .output-label p {
margin-top: 6px; margin-top: 8px;
color: var(--matrix-text-dim); color: var(--matrix-text-dim);
font-size: clamp(11px, 0.82cqw, 15px); font-size: clamp(12px, 0.9cqw, 16px);
letter-spacing: 0.8px; letter-spacing: 0.8px;
line-height: 1.2; line-height: 1.2;
text-transform: uppercase; text-transform: uppercase;
@@ -1516,14 +1516,14 @@
.omni-home-ecommerce-matrix .output-cards { .omni-home-ecommerce-matrix .output-cards {
display: flex; display: flex;
flex: 1; flex: 1;
gap: clamp(14px, 1.15cqw, 24px); gap: clamp(10px, 0.85cqw, 18px);
min-width: 0; min-width: 0;
} }
.omni-home-ecommerce-matrix .output-card { .omni-home-ecommerce-matrix .output-card {
position: relative; position: relative;
flex: 1; flex: 1;
min-width: 0; min-width: clamp(80px, 7cqw, 140px);
overflow: hidden; overflow: hidden;
border: 1px solid var(--matrix-border-subtle); border: 1px solid var(--matrix-border-subtle);
border-radius: var(--matrix-radius); border-radius: var(--matrix-radius);
+15
View File
@@ -11915,6 +11915,21 @@
gap: 6px; gap: 6px;
} }
.wb-composer__billing-estimate {
max-width: 138px;
padding: 6px 9px;
border: 2px solid #111;
background: #fffbe8;
color: #111;
font-size: 12px;
font-weight: 800;
line-height: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
box-shadow: 2px 2px 0 #111;
}
.wb-composer__send-primary { .wb-composer__send-primary {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
+314 -99
View File
@@ -1,6 +1,11 @@
.more-page-v2 { .more-page-v2 {
--more-card-shadow: 0 18px 48px rgba(0, 0, 0, 0.24); --more-card-shadow: 0 22px 54px rgba(0, 0, 0, 0.3);
--more-card-glow: 0 0 0 1px rgba(255, 255, 255, 0.025), 0 18px 38px rgba(0, 0, 0, 0.16); --more-card-glow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 16px 34px rgba(0, 0, 0, 0.18);
--more-card-surface: rgba(19, 23, 24, 0.86);
--more-card-surface-strong: rgba(22, 27, 28, 0.94);
--more-card-border: rgba(255, 255, 255, 0.105);
--more-card-border-strong: rgba(var(--accent-rgb), 0.3);
--more-page-pad-x: clamp(18px, 2.3vw, 32px);
position: relative; position: relative;
display: grid; display: grid;
@@ -158,24 +163,24 @@
.more-page-v2__scroll { .more-page-v2__scroll {
overflow-y: auto; overflow-y: auto;
padding: 26px 28px 68px; padding: 28px var(--more-page-pad-x) 72px;
scrollbar-color: rgba(var(--accent-rgb), 0.26) transparent; scrollbar-color: rgba(var(--accent-rgb), 0.26) transparent;
} }
.more-page-v2__section { .more-page-v2__section {
margin-bottom: 30px; margin-bottom: 34px;
} }
.more-page-v2__section-title { .more-page-v2__section-title {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 8px;
margin: 0 0 15px; margin: 0 0 14px;
color: var(--fg-muted); color: color-mix(in srgb, var(--fg-muted) 86%, var(--fg-body));
font-size: 12px; font-size: 12px;
font-weight: 800; font-weight: 850;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.04em; letter-spacing: 0.055em;
} }
.more-page-v2__section-title .anticon { .more-page-v2__section-title .anticon {
@@ -199,27 +204,31 @@
.more-page-v2__recent-row { .more-page-v2__recent-row {
display: flex; display: flex;
gap: 12px; gap: 10px;
flex-wrap: wrap; flex-wrap: wrap;
} }
.more-page-v2__featured-grid { .more-page-v2__featured-grid {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px; gap: 16px;
} }
.more-card--featured { .more-card--featured {
display: flex; display: grid;
align-items: flex-start; grid-template-columns: 54px minmax(0, 1fr);
gap: 18px; align-items: start;
justify-items: stretch;
gap: 16px;
min-height: 336px;
padding: 20px; padding: 20px;
border-color: rgba(var(--accent-rgb), 0.18); border-color: rgba(var(--accent-rgb), 0.2);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: background:
var(--card-gradient), var(--card-gradient),
linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012)), radial-gradient(circle at 14% 4%, rgba(var(--accent-rgb), 0.12), transparent 36%),
var(--bg-panel); linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.016)),
var(--more-card-surface-strong);
box-shadow: var(--more-card-glow); box-shadow: var(--more-card-glow);
position: relative; position: relative;
overflow: hidden; overflow: hidden;
@@ -230,27 +239,27 @@
position: absolute; position: absolute;
inset: 0; inset: 0;
background: background:
linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent), linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.038), transparent),
linear-gradient(180deg, rgba(255, 255, 255, 0.045), transparent 34%); linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 34%);
opacity: 0.5; opacity: 0.62;
pointer-events: none; pointer-events: none;
} }
.more-card--featured:hover { .more-card--featured:hover {
border-color: rgba(var(--accent-rgb), 0.45); border-color: rgba(var(--accent-rgb), 0.46);
transform: translateY(-3px); transform: translateY(-2px);
box-shadow: var(--more-card-shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.1); box-shadow: var(--more-card-shadow), 0 0 0 1px rgba(var(--accent-rgb), 0.12);
} }
.more-card__featured-icon { .more-card__featured-icon {
display: grid; display: grid;
place-items: center; place-items: center;
width: 52px; width: 54px;
height: 52px; height: 54px;
border: 1px solid rgba(var(--accent-rgb), 0.22); border: 1px solid rgba(var(--accent-rgb), 0.24);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: background:
linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.08)), linear-gradient(180deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.08)),
var(--bg-inset); var(--bg-inset);
color: var(--accent); color: var(--accent);
font-size: 24px; font-size: 24px;
@@ -261,11 +270,32 @@
.more-card__featured-body { .more-card__featured-body {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 9px; gap: 10px;
justify-self: stretch;
width: 100%;
height: 100%;
min-width: 0; min-width: 0;
text-align: left; text-align: left;
} }
.more-card--featured .more-card__preview {
width: 100%;
min-height: 0;
aspect-ratio: 16 / 9;
}
.more-card--featured.more-card--no-preview {
min-height: 0;
}
.more-card--featured.more-card--no-preview .more-card__featured-body {
justify-content: flex-start;
}
.more-card--featured.more-card--no-preview .more-card__outcome {
margin-top: 4px;
}
.more-card__featured-kicker { .more-card__featured-kicker {
width: fit-content; width: fit-content;
color: var(--accent); color: var(--accent);
@@ -277,14 +307,14 @@
.more-card__featured-body strong { .more-card__featured-body strong {
color: var(--fg-body); color: var(--fg-body);
font-size: 18px; font-size: 20px;
font-weight: 800; font-weight: 850;
line-height: 1.25; line-height: 1.25;
} }
.more-card__featured-desc { .more-card__featured-desc {
font-size: 13px; font-size: 13px;
color: var(--fg-muted); color: color-mix(in srgb, var(--fg-muted) 88%, var(--fg-body));
line-height: 1.5; line-height: 1.5;
} }
@@ -327,20 +357,23 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
width: fit-content; width: fit-content;
min-height: 28px; min-height: 32px;
margin-top: 0; margin-top: auto;
padding: 0 10px; padding: 0 12px;
border: 1px solid rgba(var(--accent-rgb), 0.28); border: 1px solid rgba(var(--accent-rgb), 0.34);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: rgba(var(--accent-rgb), 0.08); background:
linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.08)),
rgba(var(--accent-rgb), 0.06);
font-size: 12px; font-size: 12px;
font-weight: 800; font-weight: 850;
color: var(--accent) !important; color: var(--accent) !important;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
} }
.more-page-v2__grid { .more-page-v2__grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 16px; gap: 16px;
} }
@@ -350,18 +383,22 @@
align-content: start; align-content: start;
justify-items: start; justify-items: start;
min-width: 0; min-width: 0;
gap: 10px; min-height: 392px;
gap: 12px;
padding: 18px; padding: 18px;
border: 1px solid var(--border-weak); border: 1px solid var(--more-card-border);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: background:
linear-gradient(180deg, rgba(255, 255, 255, 0.032), transparent 42%), radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.055), transparent 34%),
var(--bg-panel); linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
var(--more-card-surface);
color: var(--fg-body); color: var(--fg-body);
font: inherit; font: inherit;
text-align: left; text-align: left;
cursor: pointer; cursor: pointer;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025); box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.035),
0 1px 0 rgba(255, 255, 255, 0.02);
transition: transition:
border-color 160ms ease, border-color 160ms ease,
background 160ms ease, background 160ms ease,
@@ -370,12 +407,19 @@
} }
.more-card:hover { .more-card:hover {
border-color: rgba(var(--accent-rgb), 0.38); border-color: var(--more-card-border-strong);
background: background:
linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 46%), radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.085), transparent 36%),
var(--bg-hover, rgba(255, 255, 255, 0.03)); linear-gradient(180deg, rgba(255, 255, 255, 0.052), transparent 46%),
rgba(24, 29, 30, 0.94);
transform: translateY(-2px); transform: translateY(-2px);
box-shadow: var(--more-card-glow), 0 10px 26px rgba(0, 0, 0, 0.16); box-shadow: var(--more-card-glow), 0 14px 30px rgba(0, 0, 0, 0.18);
}
.more-card:active,
.more-page-v2__filters button:active,
.more-page-v2__empty-action:active {
transform: translateY(0);
} }
.more-card--pending { .more-card--pending {
@@ -395,17 +439,20 @@
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 10px;
min-width: 150px; min-width: 164px;
min-height: 54px; min-height: 58px;
padding: 10px 14px; padding: 11px 14px;
border-color: rgba(var(--accent-rgb), 0.14); border-color: rgba(var(--accent-rgb), 0.16);
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.016)),
rgba(18, 23, 24, 0.88);
} }
.more-card__icon { .more-card__icon {
display: grid; display: grid;
place-items: center; place-items: center;
width: 40px; width: 38px;
height: 40px; height: 38px;
border: 1px solid rgba(var(--accent-rgb), 0.16); border: 1px solid rgba(var(--accent-rgb), 0.16);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: background:
@@ -437,15 +484,15 @@
.more-card strong { .more-card strong {
max-width: 100%; max-width: 100%;
color: var(--fg-body); color: var(--fg-body);
font-size: 14px; font-size: 16px;
font-weight: 800; font-weight: 850;
line-height: 1.35; line-height: 1.28;
} }
.more-card__topline { .more-card__topline {
position: absolute; position: absolute;
top: 14px; top: 18px;
right: 14px; right: 18px;
display: inline-flex; display: inline-flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: flex-end; justify-content: flex-end;
@@ -472,9 +519,9 @@
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
min-height: 92px; min-height: 104px;
overflow: hidden; overflow: hidden;
border: 1px solid rgba(var(--accent-rgb), 0.28); border: 1px solid rgba(var(--accent-rgb), 0.24);
border-radius: 10px; border-radius: 10px;
background: background:
linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), transparent 34%), linear-gradient(135deg, rgba(var(--accent-rgb), 0.1), transparent 34%),
@@ -483,8 +530,7 @@
box-shadow: box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08),
inset 0 -1px 0 rgba(0, 0, 0, 0.34), inset 0 -1px 0 rgba(0, 0, 0, 0.34),
0 0 20px rgba(var(--accent-rgb), 0.08); 0 0 18px rgba(var(--accent-rgb), 0.07);
clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
isolation: isolate; isolation: isolate;
} }
@@ -506,7 +552,6 @@
inset: 5px; inset: 5px;
z-index: 3; z-index: 3;
border: 1px solid rgba(var(--accent-rgb), 0.16); border: 1px solid rgba(var(--accent-rgb), 0.16);
clip-path: polygon(0 8px, 8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
content: ""; content: "";
pointer-events: none; pointer-events: none;
} }
@@ -880,15 +925,102 @@
border-radius: 8px; border-radius: 8px;
} }
.more-card__preview {
position: relative;
display: block;
width: 100%;
aspect-ratio: 1.42 / 1;
overflow: visible;
isolation: isolate;
}
.more-card__preview-frame {
position: absolute;
inset: 0;
display: block;
overflow: hidden;
border: 1px solid rgba(var(--accent-rgb), 0.22);
border-radius: var(--radius-xs, 8px);
background:
radial-gradient(circle at 50% 42%, rgba(var(--accent-rgb), 0.12), transparent 56%),
linear-gradient(135deg, rgba(var(--accent-rgb), 0.08), transparent 34%),
var(--bg-inset);
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.07),
0 0 18px rgba(var(--accent-rgb), 0.06);
}
.more-card__preview-frame::after {
position: absolute;
inset: 0;
z-index: 1;
background:
linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%, rgba(0, 0, 0, 0.18)),
linear-gradient(90deg, rgba(255, 255, 255, 0.045), transparent 38%, rgba(255, 255, 255, 0.025));
content: "";
pointer-events: none;
}
.more-card__preview-frame img,
.more-card__preview-popover {
display: block;
width: 100%;
height: 100%;
object-fit: contain;
padding: 6px;
transform: none;
transition:
filter 220ms ease;
}
.more-card:hover .more-card__preview-frame img {
filter: saturate(1.05) contrast(1.02);
}
.more-card__preview-popover {
position: absolute;
left: 50%;
bottom: calc(100% + 12px);
z-index: 20;
width: min(420px, calc(100vw - 48px));
height: auto;
max-height: min(360px, 58vh);
padding: 10px;
border: 1px solid rgba(var(--accent-rgb), 0.34);
border-radius: var(--radius-xs, 8px);
background:
radial-gradient(circle at 50% 20%, rgba(var(--accent-rgb), 0.12), transparent 52%),
rgba(10, 14, 14, 0.96);
box-shadow:
0 28px 68px rgba(0, 0, 0, 0.46),
0 0 0 1px rgba(255, 255, 255, 0.04);
opacity: 0;
pointer-events: none;
transform: translate(-50%, 8px) scale(0.96);
transform-origin: 50% 100%;
transition:
opacity 160ms ease,
transform 160ms ease;
}
.more-card__preview:hover .more-card__preview-popover {
opacity: 1;
transform: translate(-50%, 0) scale(1);
}
.more-card--featured .more-card__preview-popover {
display: none;
}
.more-card__desc { .more-card__desc {
color: var(--fg-muted); color: color-mix(in srgb, var(--fg-muted) 88%, var(--fg-body));
font-size: 12.5px; font-size: 12.5px;
line-height: 1.5; line-height: 1.55;
} }
.more-card__use-case { .more-card__use-case {
display: block; display: block;
min-height: 38px; min-height: 50px;
color: color-mix(in srgb, var(--fg-muted) 78%, var(--fg-body)); color: color-mix(in srgb, var(--fg-muted) 78%, var(--fg-body));
font-size: 12px; font-size: 12px;
line-height: 1.55; line-height: 1.55;
@@ -898,15 +1030,15 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
width: fit-content; width: fit-content;
min-height: 26px; min-height: 30px;
margin-top: 2px; margin-top: auto;
padding: 0 9px; padding: 0 10px;
border: 1px solid rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.09);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: rgba(255, 255, 255, 0.035); background: rgba(255, 255, 255, 0.035);
color: var(--fg-body); color: var(--fg-body);
font-size: 11px; font-size: 11px;
font-weight: 800; font-weight: 850;
transition: transition:
border-color 160ms ease, border-color 160ms ease,
background 160ms ease, background 160ms ease,
@@ -915,8 +1047,8 @@
} }
.more-card:hover .more-card__action { .more-card:hover .more-card__action {
border-color: rgba(var(--accent-rgb), 0.28); border-color: rgba(var(--accent-rgb), 0.32);
background: rgba(var(--accent-rgb), 0.08); background: rgba(var(--accent-rgb), 0.1);
color: var(--accent); color: var(--accent);
transform: translateX(2px); transform: translateX(2px);
} }
@@ -936,14 +1068,15 @@
.more-page-v2__empty { .more-page-v2__empty {
display: grid; display: grid;
justify-items: center; justify-items: center;
gap: 10px; gap: 12px;
min-height: 220px; min-height: 238px;
padding: 34px 20px; padding: 38px 22px;
border: 1px solid var(--border-weak); border: 1px solid var(--more-card-border);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: background:
linear-gradient(180deg, rgba(var(--accent-rgb), 0.065), transparent 64%), radial-gradient(circle at 50% 0%, rgba(var(--accent-rgb), 0.1), transparent 42%),
var(--bg-panel); linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 64%),
var(--more-card-surface);
color: var(--fg-muted); color: var(--fg-muted);
text-align: center; text-align: center;
} }
@@ -951,11 +1084,13 @@
.more-page-v2__empty-icon { .more-page-v2__empty-icon {
display: grid; display: grid;
place-items: center; place-items: center;
width: 48px; width: 52px;
height: 48px; height: 52px;
border: 1px solid rgba(var(--accent-rgb), 0.22); border: 1px solid rgba(var(--accent-rgb), 0.22);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: rgba(var(--accent-rgb), 0.1); background:
linear-gradient(180deg, rgba(var(--accent-rgb), 0.16), rgba(var(--accent-rgb), 0.08)),
rgba(var(--accent-rgb), 0.08);
color: var(--accent); color: var(--accent);
font-size: 20px; font-size: 20px;
} }
@@ -978,12 +1113,14 @@
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
min-height: 34px; min-height: 36px;
margin-top: 4px; margin-top: 4px;
padding: 0 12px; padding: 0 14px;
border: 1px solid rgba(var(--accent-rgb), 0.32); border: 1px solid rgba(var(--accent-rgb), 0.36);
border-radius: var(--radius-xs, 8px); border-radius: var(--radius-xs, 8px);
background: rgba(var(--accent-rgb), 0.08); background:
linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), rgba(var(--accent-rgb), 0.08)),
rgba(var(--accent-rgb), 0.06);
color: var(--accent); color: var(--accent);
font: inherit; font: inherit;
font-size: 12px; font-size: 12px;
@@ -1013,6 +1150,7 @@
.more-page-v2__header { .more-page-v2__header {
grid-template-columns: minmax(180px, auto) minmax(0, 1fr); grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
gap: 14px;
} }
.more-page-v2__filters { .more-page-v2__filters {
@@ -1023,15 +1161,21 @@
@media (max-width: 860px) { @media (max-width: 860px) {
.more-page-v2 { .more-page-v2 {
--more-page-pad-x: 16px;
padding-left: 0; padding-left: 0;
} }
.more-page-v2__header { .more-page-v2__header {
grid-template-columns: minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
padding: 14px 16px 12px; padding: 16px 16px 14px;
gap: 12px; gap: 12px;
} }
.more-page-v2__header h1 {
font-size: 24px;
}
.more-page-v2__header-meta { .more-page-v2__header-meta {
gap: 6px; gap: 6px;
} }
@@ -1047,13 +1191,22 @@
padding-right: 16px; padding-right: 16px;
} }
.more-page-v2__filters button {
min-height: 31px;
padding: 0 10px;
}
.more-page-v2__scroll { .more-page-v2__scroll {
padding: 16px 16px 48px; padding: 18px 16px 52px;
}
.more-page-v2__section {
margin-bottom: 26px;
} }
.more-page-v2__grid { .more-page-v2__grid {
grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 12px; gap: 14px;
} }
.more-page-v2__recent-row { .more-page-v2__recent-row {
@@ -1063,11 +1216,13 @@
} }
.more-page-v2__featured-grid { .more-page-v2__featured-grid {
grid-template-columns: 1fr; grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 12px; gap: 12px;
} }
.more-card--featured { .more-card--featured {
grid-template-columns: 44px minmax(0, 1fr);
min-height: 0;
padding: 16px; padding: 16px;
gap: 12px; gap: 12px;
} }
@@ -1079,7 +1234,12 @@
} }
.more-card__featured-body strong { .more-card__featured-body strong {
font-size: 15px; font-size: 16px;
}
.more-card--featured .more-card__preview {
width: 100%;
min-height: 176px;
} }
.more-card__featured-kicker, .more-card__featured-kicker,
@@ -1097,8 +1257,13 @@
font-size: 10px; font-size: 10px;
} }
.more-card__compare { .more-card__preview {
min-height: 82px; min-height: 190px;
}
.more-card {
min-height: 394px;
padding: 16px;
} }
.more-card__topline { .more-card__topline {
@@ -1108,24 +1273,74 @@
} }
.more-card__use-case { .more-card__use-case {
min-height: 54px; min-height: 46px;
} }
} }
@media (max-width: 520px) { @media (max-width: 520px) {
.more-page-v2__header {
gap: 10px;
padding-top: 14px;
}
.more-page-v2__header-meta {
overflow-x: auto;
flex-wrap: nowrap;
margin-right: -16px;
padding-right: 16px;
scrollbar-width: none;
}
.more-page-v2__header-meta::-webkit-scrollbar {
display: none;
}
.more-page-v2__grid { .more-page-v2__grid {
grid-template-columns: 1fr; grid-template-columns: 1fr;
} }
.more-card { .more-page-v2__featured-grid {
gap: 9px; grid-template-columns: 1fr;
} }
.more-card__compare { .more-page-v2__section-title {
min-height: 94px; margin-bottom: 12px;
}
.more-card--featured {
grid-template-columns: 1fr;
padding: 15px;
}
.more-card__featured-icon {
width: 40px;
height: 40px;
}
.more-card {
gap: 10px;
min-height: 0;
padding: 15px;
}
.more-card__preview {
min-height: 190px;
} }
.more-card__use-case { .more-card__use-case {
min-height: 0; min-height: 0;
} }
.more-card__action,
.more-card__cta {
min-height: 32px;
width: 100%;
justify-content: center;
}
}
@media (hover: none) {
.more-card__preview-popover {
display: none;
}
} }
File diff suppressed because it is too large Load Diff
+37
View File
@@ -248,6 +248,43 @@
color: var(--accent); color: var(--accent);
} }
.beta-apply-button {
position: relative;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
min-width: 0;
height: 36px;
padding: 0 14px;
border: 1px solid rgba(var(--accent-rgb), 0.3);
border-radius: 12px;
background: rgba(var(--accent-rgb), 0.1);
color: var(--accent);
font-size: 12px;
font-weight: 850;
cursor: pointer;
transition:
transform 160ms ease,
border-color 160ms ease,
background 160ms ease;
animation: beta-pulse 2.5s ease-in-out infinite;
}
.beta-apply-button:hover {
border-color: var(--accent);
background: rgba(var(--accent-rgb), 0.18);
}
.beta-apply-button:active {
transform: scale(0.96);
}
@keyframes beta-pulse {
0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.25); }
50% { box-shadow: 0 0 0 6px rgba(var(--accent-rgb), 0); }
}
.member-button { .member-button {
color: var(--accent); color: var(--accent);
font-weight: 600; font-weight: 600;
+44
View File
@@ -1794,6 +1794,14 @@
box-shadow: none; box-shadow: none;
} }
.web-shell[data-ui-theme="dark-green"] .wb-composer__billing-estimate {
border: 1px solid var(--border-default);
border-radius: 999px;
background: var(--bg-elevated);
color: var(--fg-body);
box-shadow: none;
}
.web-shell[data-ui-theme="dark-green"] .wb-composer__send-primary:hover:not(:disabled) { .web-shell[data-ui-theme="dark-green"] .wb-composer__send-primary:hover:not(:disabled) {
background: var(--accent-hover); background: var(--accent-hover);
color: var(--dg-button-text); color: var(--dg-button-text);
@@ -10837,8 +10845,44 @@
} }
@media (max-width: 900px) { @media (max-width: 900px) {
.web-shell[data-ui-theme="dark-green"] {
--dg-mobile-nav-height: 58px;
--dg-mobile-nav-gap: 12px;
--dg-mobile-nav-space: calc(var(--dg-mobile-nav-height) + var(--dg-mobile-nav-gap));
}
.web-shell[data-ui-theme="dark-green"] .web-topbar {
z-index: 72;
}
.web-shell[data-ui-theme="dark-green"] .web-shell__content,
.web-shell[data-ui-theme="dark-green"] .web-shell__page {
min-height: 0;
padding-bottom: 0;
}
.web-shell[data-ui-theme="dark-green"] .web-shell__page {
overflow: auto;
}
.web-shell[data-ui-theme="dark-green"]:not([data-view="home"]):not([data-view="login"]):not([data-view="workbench"]):not([data-view="agent"]):not([data-view="avatarConsole"]) .web-shell__page {
padding-top: var(--dg-mobile-nav-space);
}
.web-shell[data-ui-theme="dark-green"] .profile-popover {
position: fixed;
top: calc(56px + var(--dg-mobile-nav-space) + env(safe-area-inset-top, 0px));
right: 12px;
z-index: 120;
width: min(288px, calc(100vw - 24px));
max-height: calc(100svh - 56px - var(--dg-mobile-nav-space) - 24px);
overflow-y: auto;
transform-origin: top right;
}
.web-shell[data-ui-theme="dark-green"] .floating-nav { .web-shell[data-ui-theme="dark-green"] .floating-nav {
top: calc(56px + env(safe-area-inset-top, 0px)); top: calc(56px + env(safe-area-inset-top, 0px));
z-index: 50;
right: 12px; right: 12px;
bottom: auto; bottom: auto;
left: 12px; left: 12px;
+1
View File
@@ -25,6 +25,7 @@ export type WebViewKey =
| "dialogGenerator" | "dialogGenerator"
| "communityReview" | "communityReview"
| "communityCaseAdd" | "communityCaseAdd"
| "betaApplications"
| "report" | "report"
| "providerHealth" | "providerHealth"
| "userAgreement" | "userAgreement"
+4 -3
View File
@@ -40,6 +40,7 @@ export const ENTERPRISE_VIDEO_RESOLUTION_OPTIONS = [
export const ENTERPRISE_DEFAULT_VIDEO_MODEL = HAPPY_HORSE_UI_MODEL; export const ENTERPRISE_DEFAULT_VIDEO_MODEL = HAPPY_HORSE_UI_MODEL;
export const ENTERPRISE_DEFAULT_VIDEO_RESOLUTION = "1080P"; export const ENTERPRISE_DEFAULT_VIDEO_RESOLUTION = "1080P";
const CREDITS_PER_CNY = 100;
export interface EnterpriseVideoPricingInput { export interface EnterpriseVideoPricingInput {
model: string; model: string;
@@ -74,11 +75,11 @@ export function getEnterpriseVideoCreditRate(input: EnterpriseVideoPricingInput)
} }
if (model.includes("vidu")) { if (model.includes("vidu")) {
return resolution === "720P" ? 0.4 : 0.8; return resolution === "720P" ? 0.6 : 1.0;
} }
if (model.includes("pixverse")) { if (model.includes("pixverse")) {
return resolution === "720P" ? 0.4 : 0.8; return resolution === "720P" ? 0.6 : 1.0;
} }
if (model.includes("kling")) { if (model.includes("kling")) {
@@ -94,5 +95,5 @@ export function getEnterpriseVideoCreditRate(input: EnterpriseVideoPricingInput)
export function calculateEnterpriseVideoCredits(input: EnterpriseVideoPricingInput): number { export function calculateEnterpriseVideoCredits(input: EnterpriseVideoPricingInput): number {
const duration = Math.max(1, Math.ceil(Number(input.durationSeconds) || 1)); const duration = Math.max(1, Math.ceil(Number(input.durationSeconds) || 1));
return Number((getEnterpriseVideoCreditRate(input) * duration).toFixed(2)); return Number((getEnterpriseVideoCreditRate(input) * duration * CREDITS_PER_CNY).toFixed(2));
} }
+19
View File
@@ -25,11 +25,30 @@ export function getImageQualityOptions(model: string): CanvasOption[] {
: imageQualityOptions.filter((option) => option.value !== "4K"); : imageQualityOptions.filter((option) => option.value !== "4K");
} }
export function getImageQualityOptionsForContext(
model: string,
context?: { hasReferenceImages?: boolean; isGridMode?: boolean },
): CanvasOption[] {
const options = getImageQualityOptions(model);
const shouldLimitTo2K =
String(model || "").toLowerCase() === "wan2.7-image-pro" &&
(context?.hasReferenceImages || context?.isGridMode);
return shouldLimitTo2K ? options.filter((option) => option.value !== "4K") : options;
}
export function getDefaultImageQuality(model: string): string { export function getDefaultImageQuality(model: string): string {
const options = getImageQualityOptions(model); const options = getImageQualityOptions(model);
return options.some((option) => option.value === "2K") ? "2K" : options[0]?.value || "1K"; return options.some((option) => option.value === "2K") ? "2K" : options[0]?.value || "1K";
} }
export function getDefaultImageQualityForContext(
model: string,
context?: { hasReferenceImages?: boolean; isGridMode?: boolean },
): string {
const options = getImageQualityOptionsForContext(model, context);
return options.some((option) => option.value === "2K") ? "2K" : options[0]?.value || "1K";
}
// ─── Video quality ──────────────────────────────────────────────────────────── // ─── Video quality ────────────────────────────────────────────────────────────
function normalizeVideoModel(model: string): string { function normalizeVideoModel(model: string): string {
+5 -3
View File
@@ -32,8 +32,10 @@ export interface TextTokenUsage {
totalTokens?: number; totalTokens?: number;
} }
export const TEXT_INPUT_CREDITS_PER_MILLION = 2; const CREDITS_PER_CNY = 100;
export const TEXT_OUTPUT_CREDITS_PER_MILLION = 5;
export const TEXT_INPUT_CREDITS_PER_MILLION = 2 * CREDITS_PER_CNY;
export const TEXT_OUTPUT_CREDITS_PER_MILLION = 5 * CREDITS_PER_CNY;
const IMAGE_TIMEOUT_POLICY: TaskTimeoutPolicy = { const IMAGE_TIMEOUT_POLICY: TaskTimeoutPolicy = {
submitTimeoutMs: 90_000, submitTimeoutMs: 90_000,
@@ -151,7 +153,7 @@ export function estimateTextTokenCredits(usage: TextTokenUsage): number {
} }
export function formatTextTokenUsage(usage?: TextTokenUsage | null): string { export function formatTextTokenUsage(usage?: TextTokenUsage | null): string {
const rule = "文本计费规则:输入 Token 每百万 2 积分,输出 Token 每百万 5 积分,实际以服务端结算为准。"; const rule = "文本计费规则:输入 Token 每百万 200 积分,输出 Token 每百万 500 积分,实际以服务端结算为准。";
if (!usage) return rule; if (!usage) return rule;
const promptTokens = Math.max(0, Number(usage.promptTokens || 0)); const promptTokens = Math.max(0, Number(usage.promptTokens || 0));
const completionTokens = Math.max(0, Number(usage.completionTokens || 0)); const completionTokens = Math.max(0, Number(usage.completionTokens || 0));