pwa: drop manifest theme_color so Firefox chrome follows the phone theme
Firefox for Android ignores meta theme-color entirely; its PWA window takes toolbar/status from manifest theme_color and the navigation bar (white/black) from background_color, so the cream value framed the dark app with light bands. With theme_color absent Firefox falls back to its own light/dark chrome. Chromium keeps the per-scheme meta tags and custom2.js sync.
This commit is contained in:
1 parent
72c4d7997a
commit
046e97b024
3 files changed
+25
-11
No files matched your search
+11
-10
@@ -75,16 +75,17 @@ RUN python3 /app/code/patch_index.py && \
|
||||
rm -f /app/code/librechat/client/dist/assets/index.*.js.gz /app/code/librechat/client/dist/assets/index.*.js.br && \
|
||||
echo "// coop-build-$(date +%s)" >> /app/code/librechat/client/dist/sw.js
|
||||
|
||||
# PWA chrome colors: LibreChat ships a teal theme_color (#009688) in the web
|
||||
# manifest (the bright green bar Firefox PWAs draw across the top) and black
|
||||
# background_color. Point both at the light page color — CREAM #faf8f5, the
|
||||
# dashboard's page background (the manifest can only hold one value; custom2.js
|
||||
# re-syncs the meta tags to the app's actual theme at runtime). The index.html
|
||||
# meta gets a light + dark pair so browser/PWA chrome matches the phone theme
|
||||
# natively. KEEP THESE THREE IN SYNC: this sed, custom.css's html:not(.dark)
|
||||
# background, and custom2.js COOP_BG.light — the green wash #eaf3ea used to sit
|
||||
# in all three and made the installed app read as green.
|
||||
RUN sed -i 's|"theme_color": *"#009688"|"theme_color":"#faf8f5"|; s|"background_color": *"#000000"|"background_color":"#faf8f5"|' /app/code/librechat/client/dist/manifest.webmanifest && \
|
||||
# PWA chrome colors: background_color set to CREAM #faf8f5 (Chrome's splash
|
||||
# screen). theme_color is REMOVED by patch_index.py, which runs above: Firefox
|
||||
# for Android ignores <meta name=theme-color> and derives its PWA toolbar/status
|
||||
# bar from the manifest theme_color plus a WHITE/BLACK navigation bar from
|
||||
# background_color — a static cream value cannot follow the app's dark theme and
|
||||
# leaves light bands around the dark app. With theme_color absent Firefox uses
|
||||
# its own light/dark chrome. The index.html meta pair (applied below) still
|
||||
# drives Chromium, and custom2.js re-syncs that meta to the resolved theme.
|
||||
# Keep custom.css's html:not(.dark) background and custom2.js COOP_BG.light in
|
||||
# step with this value.
|
||||
RUN sed -i 's|"background_color": *"#000000"|"background_color":"#faf8f5"|' /app/code/librechat/client/dist/manifest.webmanifest && \
|
||||
sed -i 's|<meta name="theme-color" content="#171717" />|<meta name="theme-color" media="(prefers-color-scheme: light)" content="#faf8f5" />\n <meta name="theme-color" media="(prefers-color-scheme: dark)" content="#22271f" />|' /app/code/librechat/client/dist/index.html
|
||||
|
||||
# Log ownership guard: a host-side daily job creates the next day's dated log
|
||||
|
||||
Reference in new issue
Block a user