fix(webui): keep iOS PWA controls inside safe area (#5477)

* fix(webui): keep iOS PWA controls inside safe area

* fix(webui): blend iOS PWA chrome into dark canvas

* fix(webui): sync PWA chrome with app theme
This commit is contained in:
chengyongru
2026-08-22 01:11:20 +08:00
committed by GitHub
parent 9ae3ae17da
commit 7604dc47f9
5 changed files with 107 additions and 8 deletions
+7
View File
@@ -25,6 +25,13 @@ function applyTheme(theme: Theme): void {
const root = document.documentElement;
if (theme === "dark") root.classList.add("dark");
else root.classList.remove("dark");
const themeColor = document.querySelector<HTMLMetaElement>('meta[name="theme-color"]');
const color =
theme === "dark"
? themeColor?.dataset.themeColorDark
: themeColor?.dataset.themeColorLight;
if (themeColor && color) themeColor.content = color;
}
export function useTheme(): {