新增pwa

This commit is contained in:
eoao
2025-08-30 07:36:38 +08:00
parent 45994c24e3
commit 562528e968
10 changed files with 4545 additions and 88 deletions

View File

@@ -219,6 +219,9 @@ function openDark(e) {
function switchDark(nextIsDark, root) {
root.setAttribute('class', nextIsDark ? 'dark' : '')
const metaTag = document.getElementById('theme-color-meta');
const isMobile = !window.matchMedia("(pointer: fine) and (hover: hover)").matches;
metaTag.setAttribute('content', nextIsDark ? (isMobile ? '#141414' : '#000000') : (isMobile ? '#FFFFFF' : '#D3E3FD'));
uiStore.dark = nextIsDark
}