restore green-wash theme (lost in the Oct 21 rebuild) + PWA band colors

The Oct 19 theming (light = #eaf3ea dashboard green wash, white cards/surfaces,
per approval) was never committed - the Oct 21 pin-migration rebuild from this
repo silently reverted the deployed theme to the older cream iteration.

- custom.css: light block restored to the approved green-wash palette
  (primary #eaf3ea, white secondary/chat cards, green hover/tertiary/border);
  loading screen + bare page background match.
- Dockerfile: manifest theme_color/background_color and the index.html
  theme-color media pair now follow the live palette (#eaf3ea light /
  #22271f deep pine dark).
- custom2.js: sync ONE meta theme-color to the app's resolved theme
  (html.dark class + prefers-color-scheme listener) so Android status/nav
  bands and iOS safe areas track the theme at runtime; the static media
  pair remains as the no-JS fallback.
This commit is contained in:
Nathan Schneider committed 2026-10-21 20:46:45 -06:00
1 parent 7eb13856d7
commit d86483e5a1
4 files changed
+50 -13

No files matched your search

+35
View File
@@ -39,9 +39,44 @@
' · Our AI, governed together';
}
// PWA chrome bands (Android status bar + navigation bar, iOS safe areas):
// LibreChat ships static meta theme-color tags and never updates them, so
// the OS bands keep the install-time colors. Sync ONE meta tag to the app's
// RESOLVED theme (html.dark class — LibreChat applies it from the user's
// theme setting, which defaults to system = the phone's theme). Falls back
// to the light/dark media-query pair in index.html when this script is off.
var COOP_BG = { light: '#eaf3ea', dark: '#22271f' };
function syncThemeColor() {
var dark = document.documentElement.classList.contains('dark');
var metas = document.querySelectorAll('meta[name="theme-color"]');
if (!metas.length) return;
// Replace the media-query pair with a single tag at the resolved color.
metas.forEach(function (m, i) {
if (i === 0) {
m.removeAttribute('media');
m.setAttribute('content', dark ? COOP_BG.dark : COOP_BG.light);
} else {
m.remove();
}
});
}
var themeObserverRunning = false;
function startThemeSync() {
if (themeObserverRunning) return;
themeObserverRunning = true;
syncThemeColor();
new MutationObserver(syncThemeColor).observe(document.documentElement, {
attributes: true,
attributeFilter: ['class'],
});
var mq = window.matchMedia('(prefers-color-scheme: dark)');
if (mq && mq.addEventListener) mq.addEventListener('change', syncThemeColor);
}
function run() {
hideSignupPrompt();
fixFooter();
startThemeSync();
}
function start() {