feat: switch theme color on theme toggling (#454)

Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
This commit is contained in:
Joaquín Sánchez 2022-12-19 23:37:23 +01:00 committed by GitHub
parent 6eef0fe25a
commit db8c2adaec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 35 additions and 101 deletions

View file

@ -3,6 +3,10 @@ import { useRegisterSW } from 'virtual:pwa-register/vue'
export const usePWA = () => {
const online = useOnline()
useHead({
meta: [{ id: 'theme-color', name: 'theme-color', content: computed(() => isDark.value ? '#111111' : '#ffffff') }],
})
const {
needRefresh,
updateServiceWorker,