From ec86282403ea34704d0faab7b04ca033bd3a0650 Mon Sep 17 00:00:00 2001 From: Hailey Date: Tue, 6 Feb 2024 11:43:51 -0800 Subject: Options for selecting dark theme, fix some white flashes when in dark mode (#2722) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add dark theme selection to settings/schema * use `useThemePrefs` where needed * adjust theme providers to support various themes * update storybook * handle web themes * better themeing for web * dont show dark theme prefs when color mode is light * drop the inverted text change on oled theme * get the color mode inside of `useColorModeTheme` * use `ThemeName` type everywhere * typo * use dim/dark instead of dark/oled * prevent any fickers on web * fix styles * use `dim` for dark default * more cleanup * 🤔 * set system background color * ts --- bskyweb/templates/base.html | 46 +++++++++++-------- src/App.native.tsx | 6 +-- src/App.web.tsx | 6 +-- src/Splash.tsx | 4 +- src/alf/themes.ts | 85 +++++++++--------------------------- src/alf/util/useColorModeTheme.ts | 54 ++++++++++++++++++++--- src/lib/ThemeContext.tsx | 28 +++++++----- src/lib/themes.ts | 13 +++++- src/state/persisted/legacy.ts | 1 + src/state/persisted/schema.ts | 2 + src/state/shell/color-mode.tsx | 70 ++++++++++++++++------------- src/state/shell/index.tsx | 2 +- src/view/screens/Settings.tsx | 36 +++++++++++++-- src/view/screens/Storybook/index.tsx | 24 +++++++--- web/index.html | 46 +++++++++++-------- 15 files changed, 251 insertions(+), 172 deletions(-) diff --git a/bskyweb/templates/base.html b/bskyweb/templates/base.html index 0df5ce944..1f25743aa 100644 --- a/bskyweb/templates/base.html +++ b/bskyweb/templates/base.html @@ -1,13 +1,13 @@ - + - + {%- block head_title -%}Bluesky{%- endblock -%} - +