feat(app): add configurable global background wallpaper

This commit is contained in:
miracle authored and GitHub committed 2026-09-08 11:19:24 +08:00
1 parent 5fb667716f
commit 39aa663ebf
28 files changed
+1240 -1

No files matched your search

@@ -179,6 +179,18 @@ describe("settingsTransfer", () => {
expect(transferCategoryForKey("notARealSetting")).toBeUndefined();
});
it("round-trips the wallpaper settings under the appearance category", () => {
const settings: EditorSettings = {
...DEFAULT_EDITOR_SETTINGS,
backgroundImage: { ...DEFAULT_EDITOR_SETTINGS.backgroundImage, filePath: "/data/background-image.png", fileName: "wall.png", opacity: 0.42 },
};
const result = parseSettingsTransferFile(serializeSettingsTransfer(settings));
expect(result.ok).toBe(true);
if (!result.ok) return;
expect(result.value.editorSettings.backgroundImage).toEqual(settings.backgroundImage);
expect(transferCategoryForKey("backgroundImage")).toBe("appearance");
});
it("collects categories in display order without duplicates", () => {
expect(collectTransferCategories(["snippets", "theme", "shortcuts", "fontFamily"])).toEqual(["appearance", "shortcuts", "snippets"]);
});