fix(ui): default to large corner style

This commit is contained in:
t8y2 2026-07-24 00:40:12 +08:00
parent fa62037862
commit 132ac8a2ec
4 changed files with 9 additions and 8 deletions

View File

@ -42,7 +42,7 @@
}
root.classList.toggle("dark", dark);
root.dataset.cornerStyle = cornerStyle === "none" || cornerStyle === "large" ? cornerStyle : "small";
root.dataset.cornerStyle = cornerStyle === "none" || cornerStyle === "small" ? cornerStyle : "large";
root.style.colorScheme = dark ? "dark" : "light";
})();
</script>

View File

@ -3,9 +3,9 @@ import { normalizeAppCornerStyle } from "@/lib/app/appTheme";
describe("app corner style", () => {
it.each([
[null, "small"],
["", "small"],
["invalid", "small"],
[null, "large"],
["", "large"],
["invalid", "large"],
["none", "none"],
["small", "small"],
["large", "large"],

View File

@ -66,8 +66,8 @@ describe("startup theme", () => {
});
it.each([
[null, "small"],
["invalid", "small"],
[null, "large"],
["invalid", "large"],
["none", "none"],
["small", "small"],
["large", "large"],
@ -82,6 +82,7 @@ describe("startup theme", () => {
expect(toggle).toHaveBeenCalledWith("dark", false);
expect(root.style.colorScheme).toBe("light");
expect(root.dataset.cornerStyle).toBe("large");
});
it("falls back to light for an invalid persisted mode", () => {

View File

@ -48,8 +48,8 @@ export function normalizeAppThemePalette(value: string | null): AppThemePalette
}
export function normalizeAppCornerStyle(value: string | null): AppCornerStyle {
if (value === "none" || value === "large") return value;
return "small";
if (value === "none" || value === "small") return value;
return "large";
}
export function getAppThemePaletteClass(palette: AppThemePalette): string | null {