From b06623d0cedf03ee7f71b3c09cd761233444648c Mon Sep 17 00:00:00 2001 From: npc0-hue Date: Tue, 21 Jul 2026 13:44:23 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=89=8D=E7=AB=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform_web/components/AppShell.test.tsx | 15 ++ .../components/MagicalParticleLayer.tsx | 38 +++- platform_web/pages/ConsolePages.test.tsx | 2 + platform_web/pages/ServersPage.tsx | 12 +- platform_web/public/theme/magical-circle.svg | 15 ++ .../public/theme/stellar-megastructure.svg | 20 ++ platform_web/theme/base-css.test.js | 213 ++++++++++-------- platform_web/theme/base.css | 95 +++++--- platform_web/theme/tokens.test.ts | 14 ++ platform_web/theme/tokens.ts | 31 ++- scripts/local-debug-smoke.sh | 80 ++++++- 11 files changed, 386 insertions(+), 149 deletions(-) create mode 100644 platform_web/public/theme/magical-circle.svg create mode 100644 platform_web/public/theme/stellar-megastructure.svg diff --git a/platform_web/components/AppShell.test.tsx b/platform_web/components/AppShell.test.tsx index c049ac6..5dfb39e 100644 --- a/platform_web/components/AppShell.test.tsx +++ b/platform_web/components/AppShell.test.tsx @@ -37,6 +37,21 @@ describe("AppShell mobile navigation", () => { expect(html).toContain("关闭导航菜单"); }); + it("renders the animation layer above the workspace background", () => { + const html = renderToStaticMarkup( + undefined}> +

页面内容

+
+ ); + + expect(html.indexOf("workspace-background-layer")).toBeLessThan(html.indexOf("global-particle-layer")); + expect(html).toContain("global-orbital-construct"); + expect(html).toContain("global-particle-lightfall"); + expect(html).toContain("global-particle-side-ray"); + expect(html).not.toContain("global-particle-orbit"); + expect(html).not.toContain("global-particle-frame"); + }); + it("uses bounded edge-swipe thresholds and accessible dismissal", () => { expect(appShellSource).toContain("start.x <= 28 && deltaX >= 56"); expect(appShellSource).toContain("deltaX <= -56"); diff --git a/platform_web/components/MagicalParticleLayer.tsx b/platform_web/components/MagicalParticleLayer.tsx index 9776235..9f4e4ee 100644 --- a/platform_web/components/MagicalParticleLayer.tsx +++ b/platform_web/components/MagicalParticleLayer.tsx @@ -11,23 +11,53 @@ const particleSlots = [ { x: "92%", y: "86%" } ]; +const orbitalConstructSlots = [ + { x: "76%", y: "82%", size: "min(54vw, 680px)", drift: "-6deg" }, + { x: "14%", y: "58%", size: "min(34vw, 420px)", drift: "18deg" }, + { x: "94%", y: "22%", size: "min(24vw, 300px)", drift: "-26deg" } +]; + type ParticleStyle = CSSProperties & { "--particle-index": string; "--particle-x": string; "--particle-y": string; }; +type OrbitalConstructStyle = CSSProperties & { + "--construct-index": string; + "--construct-x": string; + "--construct-y": string; + "--construct-size": string; + "--construct-drift": string; +}; + export function MagicalParticleLayer() { return ( <>