fix updating max_workers in UI
This commit is contained in:
parent
448a145ed0
commit
0359eafbec
1 changed files with 3 additions and 4 deletions
|
|
@ -8,28 +8,27 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
const config = useConfigStore()
|
const config = useConfigStore()
|
||||||
const stateStore = useStateStore()
|
const stateStore = useStateStore()
|
||||||
const maxWorkers = config.app.max_workers
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
useHead({ title: 'YTPTube' })
|
useHead({ title: 'YTPTube' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${config.app.max_workers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(() => stateStore.history, () => {
|
watch(() => stateStore.history, () => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${config.app.max_workers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
watch(() => stateStore.queue, () => {
|
watch(() => stateStore.queue, () => {
|
||||||
if (!config.app.ui_update_title) {
|
if (!config.app.ui_update_title) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${maxWorkers} | ${Object.keys(stateStore.history).length || 0} )` })
|
useHead({ title: `YTPTube: ( ${Object.keys(stateStore.queue).length || 0}/${config.app.max_workers} | ${Object.keys(stateStore.history).length || 0} )` })
|
||||||
}, { deep: true })
|
}, { deep: true })
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue