attempt to fix title update
This commit is contained in:
parent
aca10d328f
commit
2528d3df25
1 changed files with 13 additions and 10 deletions
|
|
@ -7,19 +7,22 @@
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
const config = useConfigStore()
|
const config = useConfigStore()
|
||||||
useHead({ title: 'YTPTube' })
|
const stateStore = useStateStore()
|
||||||
|
|
||||||
watch(() => config.app.ui_update_title, value => {
|
onMounted(() => {
|
||||||
if (true !== value) {
|
if (!config.app.ui_update_title) {
|
||||||
|
useHead({ title: 'YTPTube' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
|
})
|
||||||
|
|
||||||
const s = useStateStore()
|
watch([stateStore.queue, stateStore.history], () => {
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(s.queue).length || 0} | ${Object.keys(s.history).length || 0} )` })
|
if (!config.app.ui_update_title) {
|
||||||
watch([s.queue, s.history], () => {
|
return
|
||||||
const title = `YTPTube: ( ${Object.keys(s.queue).length || 0} | ${Object.keys(s.history).length || 0} )`
|
}
|
||||||
useHead({ title })
|
console.log('logging watch event')
|
||||||
})
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
|
}, { deep: true })
|
||||||
|
|
||||||
}, { immediate: true })
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue