feat(canvas): 画布外观 - 默认使用黑色点网格并保留自定义配置

This commit is contained in:
ddCat committed 2026-09-22 15:47:49 +08:00
1 parent 2cd30b9951
commit da24992afe
8 files changed
+56 -13

No files matched your search

+5
View File
@@ -10,6 +10,11 @@ afterEach(() => {
});
describe("canvas theme ownership", () => {
test("defaults to black while allowing an explicit light theme", () => {
expect(useCanvasThemeStore.getInitialState().theme).toBe("dark");
useCanvasThemeStore.getState().setTheme("light");
expect(useCanvasThemeStore.getState().theme).toBe("light");
});
test("editing the canvas theme never mutates the workspace preference", () => {
useThemeStore.setState({ theme: "light" });
useCanvasThemeStore.setState({ active: true });