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>
|
||||
const config = useConfigStore()
|
||||
const stateStore = useStateStore()
|
||||
const maxWorkers = config.app.max_workers
|
||||
|
||||
onMounted(() => {
|
||||
if (!config.app.ui_update_title) {
|
||||
useHead({ title: 'YTPTube' })
|
||||
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, () => {
|
||||
if (!config.app.ui_update_title) {
|
||||
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 })
|
||||
|
||||
watch(() => stateStore.queue, () => {
|
||||
if (!config.app.ui_update_title) {
|
||||
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 })
|
||||
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue