mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-27 17:52:16 +00:00
Add new workflow button in topbar for tab view (#1903)
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<SelectButton
|
<SelectButton
|
||||||
class="workflow-tabs bg-transparent flex flex-wrap"
|
class="workflow-tabs bg-transparent inline"
|
||||||
:class="props.class"
|
:class="props.class"
|
||||||
:modelValue="selectedWorkflow"
|
:modelValue="selectedWorkflow"
|
||||||
@update:modelValue="onWorkflowChange"
|
@update:modelValue="onWorkflowChange"
|
||||||
@@ -41,12 +41,20 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</SelectButton>
|
</SelectButton>
|
||||||
|
<Button
|
||||||
|
class="new-blank-workflow-button"
|
||||||
|
icon="pi pi-plus"
|
||||||
|
text
|
||||||
|
severity="secondary"
|
||||||
|
@click="() => commandStore.execute('Comfy.NewBlankWorkflow')"
|
||||||
|
/>
|
||||||
<ContextMenu ref="menu" :model="contextMenuItems" />
|
<ContextMenu ref="menu" :model="contextMenuItems" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ComfyWorkflow } from '@/stores/workflowStore'
|
import { ComfyWorkflow } from '@/stores/workflowStore'
|
||||||
import { useWorkflowStore } from '@/stores/workflowStore'
|
import { useWorkflowStore } from '@/stores/workflowStore'
|
||||||
|
import { useCommandStore } from '@/stores/commandStore'
|
||||||
import SelectButton from 'primevue/selectbutton'
|
import SelectButton from 'primevue/selectbutton'
|
||||||
import Button from 'primevue/button'
|
import Button from 'primevue/button'
|
||||||
import { computed, ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
@@ -158,6 +166,8 @@ const contextMenuItems = computed(() => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const commandStore = useCommandStore()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
Reference in New Issue
Block a user