feat(webui): add reading text size preferences (#6325)

* feat(webui): add reading text size preferences

* fix(webui): align loading skeletons with reading typography
This commit is contained in:
chengyongru authored and GitHub committed 2026-10-20 16:33:05 +08:00
1 parent 816c9221a0
commit 282839cc65
48 files changed
+662 -120

No files matched your search

+21
View File
@@ -26,6 +26,27 @@ describe("local preferences", () => {
expect(readLocalPreferences().brandLogos).toBe(false);
});
it.each([undefined, "obsolete", 24])("defaults missing or invalid reading sizes without resetting other preferences: %s", (readingTextSize) => {
localStorage.setItem(LOCAL_PREFS_STORAGE_KEY, JSON.stringify({
schemaVersion: 1,
readingTextSize,
activityMode: "expanded",
codeWrap: false,
brandLogos: false,
notificationSound: true,
fileEditDisplayMode: "diff",
}));
expect(readLocalPreferences()).toEqual({
...DEFAULT_LOCAL_PREFS,
readingTextSize: "standard",
activityMode: "expanded",
codeWrap: false,
brandLogos: false,
notificationSound: true,
fileEditDisplayMode: "diff",
});
});
it("keeps browser notifications opt-in", () => {
expect(DEFAULT_LOCAL_PREFS.browserNotifications).toBe(false);
expect(readLocalPreferences().browserNotifications).toBe(false);