diff --git a/packages/app/index.html b/packages/app/index.html index ad49b2553..d71535182 100644 --- a/packages/app/index.html +++ b/packages/app/index.html @@ -1,5 +1,5 @@ - +
- + + + + - + - + diff --git a/packages/app/public/oc-theme-preload.js b/packages/app/public/oc-theme-preload.js index 18846fceb..11c9b39ec 100644 --- a/packages/app/public/oc-theme-preload.js +++ b/packages/app/public/oc-theme-preload.js @@ -15,10 +15,11 @@ document.documentElement.dataset.theme = themeId document.documentElement.dataset.colorScheme = mode + document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa" // Update theme-color meta tag to match app color scheme var metas = document.querySelectorAll("meta[name='theme-color']") - if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#131010" : "#F8F7F7") + if (metas.length > 0) metas[0].setAttribute("content", isDark ? "#080808" : "#fafafa") if (themeId === "oc-2") return diff --git a/packages/ui/src/assets/favicon/site.webmanifest b/packages/ui/src/assets/favicon/site.webmanifest index 41290e840..427c3adf4 100644 --- a/packages/ui/src/assets/favicon/site.webmanifest +++ b/packages/ui/src/assets/favicon/site.webmanifest @@ -1,6 +1,9 @@ { "name": "OpenCode", "short_name": "OpenCode", + "id": "/", + "start_url": "/", + "scope": "/", "icons": [ { "src": "/web-app-manifest-192x192.png", @@ -15,7 +18,7 @@ "purpose": "maskable" } ], - "theme_color": "#ffffff", - "background_color": "#ffffff", + "theme_color": "#080808", + "background_color": "#080808", "display": "standalone" } diff --git a/packages/ui/src/theme/context.tsx b/packages/ui/src/theme/context.tsx index a1505a0e3..1051345fb 100644 --- a/packages/ui/src/theme/context.tsx +++ b/packages/ui/src/theme/context.tsx @@ -152,10 +152,11 @@ function applyThemeCss(theme: DesktopTheme, themeId: string, mode: "light" | "da ensureThemeStyleElement().textContent = fullCss document.documentElement.dataset.theme = themeId document.documentElement.dataset.colorScheme = mode + document.documentElement.style.backgroundColor = isDark ? "#080808" : "#fafafa" // Update theme-color meta tag to match light/dark mode const meta = document.querySelector('meta[name="theme-color"]') - if (meta) meta.setAttribute("content", isDark ? "#131010" : "#F8F7F7") + if (meta) meta.setAttribute("content", isDark ? "#080808" : "#fafafa") } function cacheThemeVariants(theme: DesktopTheme, themeId: string) {