生成记录改为数据库分页,每页 40 条,默认最近 7 天;可见预览限制为 4 路并发并使用 192px 缩略图,翻页取消旧请求,视频在详情中按需播放。保留精选、分类和原图操作,新增画布任务失败记录,统一时间显示。 模型管理拆分模型、上游和运行健康视图,提供搜索、筛选、分页和完整故障详情;列表使用摘要,编辑按需获取完整配置。后台按当前设置页加载,模型 GET 不再自动修改健康状态,98K 同步先显示变更预览。 验证:600 项现有辅助测试和 3 项新增回归测试通过,TypeScript 和本次 API/组件 lint 通过;浏览器验证请求峰值 4、翻页、搜索、失败重试、详情、模型筛选与 390px 窄屏。只读生产查询:当天页约 29ms,历史视频页 122ms,第 7800 页 739ms。两个并发索引已在生产建成,SQL 随代码保留。 已知检查状态:全仓 lint 存量 1004 项诊断使 check:quality 停在 lint 阶段;日志、品牌、CI、环境、凭据、元数据、测试与制品检查单独通过。
31 lines
857 B
TypeScript
31 lines
857 B
TypeScript
"use client";
|
|
import { useEffect, useRef, type ReactNode } from "react";
|
|
|
|
export function AdminSurface({ children }: { children: ReactNode }) {
|
|
const ref = useRef<HTMLDivElement>(null);
|
|
useEffect(() => {
|
|
if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) return;
|
|
let context: { revert: () => void } | undefined;
|
|
let disposed = false;
|
|
import("gsap").then(({ gsap }) => {
|
|
if (disposed) return;
|
|
context = gsap.context(() => {
|
|
gsap.fromTo(
|
|
ref.current,
|
|
{ y: 6, opacity: 0.85 },
|
|
{ y: 0, opacity: 1, duration: 0.25, ease: "power3.out", clearProps: "transform,opacity" },
|
|
);
|
|
}, ref);
|
|
});
|
|
return () => {
|
|
disposed = true;
|
|
context?.revert();
|
|
};
|
|
}, []);
|
|
return (
|
|
<div ref={ref} className="space-y-6">
|
|
{children}
|
|
</div>
|
|
);
|
|
}
|