fix(app): improve iOS PWA shell
This commit is contained in:
parent
f33cc80f48
commit
27371cfb2b
4 changed files with 17 additions and 9 deletions
|
|
@ -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"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue