File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script setup>
2- import {onMounted , ref , computed } from ' vue'
2+ import {onMounted , ref , computed , watch } from ' vue'
33import {useRoute , useRouter } from ' vue-router'
44import {useTheme } from ' vuetify'
55import {useSQLite } from " @/composables/useSQLite.js" ;
@@ -48,6 +48,21 @@ onMounted(async () => {
4848 await router .replace (' /' )
4949})
5050
51+ const updateAddressBar = () => {
52+ const primaryColor = appTheme .current .value .colors .primary
53+ console .log (primaryColor)
54+ let metaTag = document .querySelector (' meta[name="theme-color"]' )
55+ if (! metaTag) {
56+ metaTag = document .createElement (' meta' )
57+ metaTag .name = ' theme-color'
58+ document .head .appendChild (metaTag)
59+ }
60+
61+ metaTag .setAttribute (' content' , primaryColor)
62+ }
63+
64+ watch (() => appTheme .global .name .value , updateAddressBar)
65+
5166const collectionSettings = ref ({})
5267
5368const fieldIds = {
You can’t perform that action at this time.
0 commit comments