fix(app): improve iOS PWA shell

This commit is contained in:
Brendan Allan 2026-06-18 09:47:53 +02:00
commit 27371cfb2b
No known key found for this signature in database
GPG key ID: 41E835AEA046A32E
4 changed files with 17 additions and 9 deletions

View file

@ -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",
"display": "standalone"
"theme_color": "#080808",
"background_color": "#080808",
"display": "fullscreen"
}

View file

@ -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) {