Skip to content

Commit

Permalink
Add new workflow button in topbar for tab view (#1903)
Browse files Browse the repository at this point in the history
  • Loading branch information
fahdarafat authored Dec 13, 2024
1 parent 618b451 commit c7303ea
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/components/topbar/WorkflowTabs.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<SelectButton
class="workflow-tabs bg-transparent flex flex-wrap"
class="workflow-tabs bg-transparent inline"
:class="props.class"
:modelValue="selectedWorkflow"
@update:modelValue="onWorkflowChange"
Expand Down Expand Up @@ -41,12 +41,20 @@
</div>
</template>
</SelectButton>
<Button
class="new-blank-workflow-button"
icon="pi pi-plus"
text
severity="secondary"
@click="() => commandStore.execute('Comfy.NewBlankWorkflow')"
/>
<ContextMenu ref="menu" :model="contextMenuItems" />
</template>

<script setup lang="ts">
import { ComfyWorkflow } from '@/stores/workflowStore'
import { useWorkflowStore } from '@/stores/workflowStore'
import { useCommandStore } from '@/stores/commandStore'
import SelectButton from 'primevue/selectbutton'
import Button from 'primevue/button'
import { computed, ref } from 'vue'
Expand Down Expand Up @@ -158,6 +166,8 @@ const contextMenuItems = computed(() => {
}
]
})
const commandStore = useCommandStore()
</script>

<style scoped>
Expand Down

0 comments on commit c7303ea

Please sign in to comment.