diff --git a/frontend/src/lib/types.ts b/frontend/src/lib/types.ts index 2581bfe..f8e3884 100644 --- a/frontend/src/lib/types.ts +++ b/frontend/src/lib/types.ts @@ -1,4 +1,4 @@ -export type Theme = 'light' | 'dark' | 'system' | 'neon'; +export type Theme = 'light' | 'dark' | 'neon'; /** Lifecycle of the NIP-46 remote signer. */ export type SignerPhase = 'stopped' | 'connecting' | 'connected'; diff --git a/frontend/src/screens/SettingsScreen.tsx b/frontend/src/screens/SettingsScreen.tsx index 2ea58e1..c5c8ae2 100644 --- a/frontend/src/screens/SettingsScreen.tsx +++ b/frontend/src/screens/SettingsScreen.tsx @@ -104,12 +104,11 @@ export function SettingsScreen() { > -
- “System” follows your desktop's light or dark preference. “Neon” is a pure-black - theme with pink and purple accents. + “Light” and “Dark” follow your manual selection. “Neon” is a pure-black theme with + pink and purple accents.
diff --git a/frontend/src/state/AppProvider.tsx b/frontend/src/state/AppProvider.tsx index 6167031..d910afe 100644 --- a/frontend/src/state/AppProvider.tsx +++ b/frontend/src/state/AppProvider.tsx @@ -335,16 +335,13 @@ export function useApp(): AppContextValue { return context; } -/** Apply the requested theme (respecting system preference for `system`). */ +/** Apply the requested theme. */ export function applyTheme(theme: Theme): void { if (theme === 'neon') { document.documentElement.dataset.theme = 'neon'; return; } - const prefersDark = - theme === 'dark' || - (theme === 'system' && window.matchMedia('(prefers-color-scheme: dark)').matches); - document.documentElement.dataset.theme = prefersDark ? 'dark' : 'light'; + document.documentElement.dataset.theme = theme; } /** Keep the document theme in sync with settings, watching system changes. */ diff --git a/frontend/src/test/FeedScreen.test.tsx b/frontend/src/test/FeedScreen.test.tsx index 09be4c5..bb2a93c 100644 --- a/frontend/src/test/FeedScreen.test.tsx +++ b/frontend/src/test/FeedScreen.test.tsx @@ -24,7 +24,7 @@ describe('FeedScreen', () => { it('disable relays shows an empty state that can navigate to relays', async () => { const settings = { - theme: 'system' as const, + theme: 'light' as const, confirm_before_publish: true, shorten_npub: true, relays: [ diff --git a/frontend/src/test/apiMock.ts b/frontend/src/test/apiMock.ts index c5de46c..21b89ee 100644 --- a/frontend/src/test/apiMock.ts +++ b/frontend/src/test/apiMock.ts @@ -25,7 +25,7 @@ export function makeState(overrides?: Partial