mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
* [refactor] move workflow domain to its own folder * [refactor] Fix workflow platform architecture organization - Move workflow rendering functionality to renderer/thumbnail domain - Rename ui folder to management for better semantic clarity - Update all import paths to reflect proper domain boundaries - Fix test imports to use new structure Architecture improvements: - rendering → renderer/thumbnail (belongs with other rendering logic) - ui → management (better name for state management and UI integration) This ensures proper separation of concerns and domain boundaries. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * [fix] Resolve circular dependency between nodeDefStore and subgraphStore * [fix] Update browser test imports to use new workflow platform paths --------- Co-authored-by: Claude <noreply@anthropic.com>
48 lines
1.2 KiB
Vue
48 lines
1.2 KiB
Vue
<template>
|
|
<div>
|
|
<Button
|
|
v-tooltip="{ value: $t('g.moreWorkflows'), showDelay: 300 }"
|
|
class="rounded-none"
|
|
icon="pi pi-ellipsis-h"
|
|
text
|
|
severity="secondary"
|
|
:aria-label="$t('g.moreWorkflows')"
|
|
@click="menu?.toggle($event)"
|
|
/>
|
|
<Menu
|
|
ref="menu"
|
|
:model="menuItems"
|
|
:popup="true"
|
|
class="max-h-[40vh] overflow-auto"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from 'primevue/button'
|
|
import Menu from 'primevue/menu'
|
|
import { computed, ref } from 'vue'
|
|
|
|
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
|
|
import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
|
|
|
|
const props = defineProps<{
|
|
workflows: ComfyWorkflow[]
|
|
activeWorkflow: ComfyWorkflow | null
|
|
}>()
|
|
|
|
const menu = ref<InstanceType<typeof Menu> | null>(null)
|
|
const workflowService = useWorkflowService()
|
|
|
|
const menuItems = computed(() =>
|
|
props.workflows.map((workflow: ComfyWorkflow) => ({
|
|
label: workflow.filename,
|
|
icon:
|
|
props.activeWorkflow?.key === workflow.key ? 'pi pi-check' : undefined,
|
|
command: () => {
|
|
void workflowService.openWorkflow(workflow)
|
|
}
|
|
}))
|
|
)
|
|
</script>
|