File tree Expand file tree Collapse file tree 3 files changed +57
-2
lines changed Expand file tree Collapse file tree 3 files changed +57
-2
lines changed Original file line number Diff line number Diff line change 1+ <template >
2+ <div >
3+ <Button
4+ v-tooltip =" { value: $t('g.moreWorkflows'), showDelay: 300 }"
5+ class =" rounded-none"
6+ icon =" pi pi-ellipsis-h"
7+ text
8+ severity =" secondary"
9+ :aria-label =" $t('g.moreWorkflows')"
10+ @click =" menu?.toggle($event)"
11+ />
12+ <Menu
13+ ref =" menu"
14+ :model =" menuItems"
15+ :popup =" true"
16+ class =" max-h-[40vh] overflow-auto"
17+ />
18+ </div >
19+ </template >
20+
21+ <script setup lang="ts">
22+ import Button from ' primevue/button'
23+ import Menu from ' primevue/menu'
24+ import { computed , ref } from ' vue'
25+
26+ import { useWorkflowService } from ' @/services/workflowService'
27+ import type { ComfyWorkflow } from ' @/stores/workflowStore'
28+
29+ const props = defineProps <{
30+ workflows: ComfyWorkflow []
31+ activeWorkflow: ComfyWorkflow | null
32+ }>()
33+
34+ const menu = ref <InstanceType <typeof Menu > | null >(null )
35+ const workflowService = useWorkflowService ()
36+
37+ const menuItems = computed (() =>
38+ props .workflows .map ((workflow : ComfyWorkflow ) => ({
39+ label: workflow .filename ,
40+ icon:
41+ props .activeWorkflow ?.key === workflow .key ? ' pi pi-check' : undefined ,
42+ command : () => {
43+ void workflowService .openWorkflow (workflow )
44+ }
45+ }))
46+ )
47+ </script >
Original file line number Diff line number Diff line change 1616 ref =" scrollPanelRef"
1717 class =" overflow-hidden no-drag"
1818 :pt:content =" {
19- class: 'p-0 w-full',
19+ class: 'p-0 w-full flex ',
2020 onwheel: handleWheel
2121 }"
2222 pt:bar-x =" h-1"
4848 :disabled =" !rightArrowEnabled"
4949 @mousedown =" whileMouseDown($event, () => scroll(1))"
5050 />
51+ <WorkflowOverflowMenu
52+ v-if =" showOverflowArrows"
53+ :workflows =" workflowStore.openWorkflows"
54+ :active-workflow =" workflowStore.activeWorkflow"
55+ />
5156 <Button
5257 v-tooltip =" { value: $t('sideToolbar.newBlankWorkflow'), showDelay: 300 }"
5358 class =" new-blank-workflow-button flex-shrink-0 no-drag rounded-none"
@@ -85,6 +90,8 @@ import { useWorkspaceStore } from '@/stores/workspaceStore'
8590import { isElectron } from ' @/utils/envUtil'
8691import { whileMouseDown } from ' @/utils/mouseDownUtil'
8792
93+ import WorkflowOverflowMenu from ' ./WorkflowOverflowMenu.vue'
94+
8895interface WorkflowOption {
8996 value: string
9097 workflow: ComfyWorkflow
Original file line number Diff line number Diff line change 148148 "micPermissionDenied" : " Microphone permission denied" ,
149149 "noAudioRecorded" : " No audio recorded" ,
150150 "nodesRunning" : " nodes running" ,
151- "duplicate" : " Duplicate"
151+ "duplicate" : " Duplicate" ,
152+ "moreWorkflows" : " More workflows"
152153 },
153154 "manager" : {
154155 "title" : " Custom Nodes Manager" ,
You can’t perform that action at this time.
0 commit comments