feat: 前端界面优化

This commit is contained in:
npc0-hue
2026-07-20 21:03:52 +08:00
parent a0e69417db
commit 0c5e3d2c39
6 changed files with 213 additions and 85 deletions
+7 -5
View File
@@ -239,7 +239,7 @@ describe("first-party console pages", () => {
expect(html).not.toContain("role=\"dialog\"");
});
it("labels uploaded profile backgrounds as active and built-in presets as fallback", () => {
it("keeps profile background controls focused on custom uploads", () => {
const originalWindow = globalThis.window;
Object.defineProperty(globalThis, "window", {
configurable: true,
@@ -265,10 +265,12 @@ describe("first-party console pages", () => {
const html = renderToStaticMarkup(<ProfileSettingsPage {...pageProps()} />);
expect(html).toContain("自定义背景");
expect(html).toContain("机甲格纳库");
expect(html).toContain("备用");
expect(html).toContain("当前显示自定义上传背景;机甲格纳库 仅作为移除上传后的备用桌面。");
expect(html).toContain('aria-pressed="false"');
expect(html).toContain("上传背景");
expect(html).toContain("移除背景");
expect(html).toContain("当前显示自定义上传背景;移除后回到主题配色背景。");
expect(html).not.toContain("机甲格纳库");
expect(html).not.toContain("粉月魔法阵");
expect(html).not.toContain("备用");
} finally {
Object.defineProperty(globalThis, "window", {
configurable: true,