mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-26 01:34:07 +00:00
* Initial move to sidebar Remove broken CSS Move action buttons Migrate open workflows Add basic browse WIP Add insert support Remove legacy workflow manager Remove unused CSS Reorder Remove legacy workflow UI nit * Support bookmark Add workflow bookmark store nit Add back bookmark functionality Correctly load bookmarks nit Fix many other issues Fix this binding style divider * Extract tree leaf component * Hide bookmark section when no bookmarks * nit * Fix save * Add workflows searchbox * Add search support * Show total opened * Add basic test * Add more tests * Fix redo/undo test * Temporarily disable browser tab title test
49 lines
1.5 KiB
Vue
49 lines
1.5 KiB
Vue
<template>
|
|
<div>
|
|
<!-- This component does not render anything visible. -->
|
|
</div>
|
|
</template>
|
|
|
|
<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'
|
|
|
|
const DEFAULT_TITLE = 'ComfyUI'
|
|
const executionStore = useExecutionStore()
|
|
const executionText = computed(() =>
|
|
executionStore.isIdle ? '' : `[${executionStore.executionProgress}%]`
|
|
)
|
|
|
|
const settingStore = useSettingStore()
|
|
const betaMenuEnabled = computed(
|
|
() => settingStore.get('Comfy.UseNewMenu') !== 'Disabled'
|
|
)
|
|
|
|
const workflowStore = useWorkflowStore()
|
|
const isUnsavedText = computed(() =>
|
|
workflowStore.activeWorkflow?.unsaved ? ' *' : ''
|
|
)
|
|
const workflowNameText = computed(() => {
|
|
const workflowName = workflowStore.activeWorkflow?.name
|
|
return workflowName ? isUnsavedText.value + workflowName : DEFAULT_TITLE
|
|
})
|
|
|
|
const nodeExecutionTitle = computed(() =>
|
|
executionStore.executingNode && executionStore.executingNodeProgress
|
|
? `${executionText.value}[${executionStore.executingNodeProgress}%] ${executionStore.executingNode.type}`
|
|
: ''
|
|
)
|
|
|
|
const workflowTitle = computed(
|
|
() =>
|
|
executionText.value +
|
|
(betaMenuEnabled.value ? workflowNameText.value : DEFAULT_TITLE)
|
|
)
|
|
|
|
const title = computed(() => nodeExecutionTitle.value || workflowTitle.value)
|
|
useTitle(title)
|
|
</script>
|