style(webui): show third-party logos by default

This commit is contained in:
Xubin Ren committed 2026-09-02 16:25:07 +08:00
1 parent 05100b70ad
commit a3e043cf6f
2 files changed
+14 -2

No files matched your search

+12
View File
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it } from "vitest";
import {
DEFAULT_LOCAL_PREFS,
LOCAL_PREFS_STORAGE_KEY,
readLocalPreferences,
writeLocalPreferences,
} from "@/lib/local-preferences";
@@ -9,6 +10,17 @@ import {
describe("local preferences", () => {
beforeEach(() => localStorage.clear());
it("shows third-party brand logos by default while preserving an explicit opt-out", () => {
expect(DEFAULT_LOCAL_PREFS.brandLogos).toBe(true);
expect(readLocalPreferences().brandLogos).toBe(true);
localStorage.setItem(
LOCAL_PREFS_STORAGE_KEY,
JSON.stringify({ brandLogos: false }),
);
expect(readLocalPreferences().brandLogos).toBe(false);
});
it("keeps browser notifications opt-in", () => {
expect(DEFAULT_LOCAL_PREFS.browserNotifications).toBe(false);
expect(readLocalPreferences().browserNotifications).toBe(false);