mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-19 06:20:10 +00:00
[Beta Menu] Show active workflow name on browser tab title (#857)
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useExecutionStore } from '@/stores/executionStore'
|
||||
import { useSettingStore } from '@/stores/settingStore'
|
||||
import { useWorkflowStore } from '@/stores/workflowStore'
|
||||
import { useTitle } from '@vueuse/core'
|
||||
import { computed } from 'vue'
|
||||
|
||||
@@ -13,6 +15,19 @@ const executionStore = useExecutionStore()
|
||||
const executionText = computed(() =>
|
||||
executionStore.isIdle ? '' : `[${executionStore.executionProgress}%]`
|
||||
)
|
||||
const title = computed(() => executionText.value + 'ComfyUI')
|
||||
|
||||
const settingStore = useSettingStore()
|
||||
const betaMenuEnabled = computed(
|
||||
() => settingStore.get('Comfy.UseNewMenu') !== 'Disabled'
|
||||
)
|
||||
|
||||
const workflowStore = useWorkflowStore()
|
||||
const workflowNameText = computed(
|
||||
() =>
|
||||
(betaMenuEnabled.value ? workflowStore.activeWorkflow?.name : undefined) ??
|
||||
'ComfyUI'
|
||||
)
|
||||
|
||||
const title = computed(() => executionText.value + workflowNameText.value)
|
||||
useTitle(title)
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user