Move workflow dropdown to sidebar tab (#893)

* 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
This commit is contained in:
Chenlei Hu
2024-09-21 18:19:36 +09:00
parent 4ae066c57d
commit f4d4cc3439
17 changed files with 767 additions and 1348 deletions

View File

@@ -0,0 +1,31 @@
<template>
<TreeExplorerTreeNode :node="node">
<template #actions="{ node }">
<Button
:icon="isBookmarked ? 'pi pi-bookmark-fill' : 'pi pi-bookmark'"
text
severity="secondary"
size="small"
@click.stop="workflowBookmarkStore.toggleBookmarked(node.data.path)"
/>
</template>
</TreeExplorerTreeNode>
</template>
<script setup lang="ts">
import TreeExplorerTreeNode from '@/components/common/TreeExplorerTreeNode.vue'
import Button from 'primevue/button'
import { useWorkflowBookmarkStore } from '@/stores/workflowStore'
import { ComfyWorkflow } from '@/scripts/workflows'
import type { RenderedTreeExplorerNode } from '@/types/treeExplorerTypes'
import { computed } from 'vue'
const props = defineProps<{
node: RenderedTreeExplorerNode<ComfyWorkflow>
}>()
const workflowBookmarkStore = useWorkflowBookmarkStore()
const isBookmarked = computed(() =>
workflowBookmarkStore.isBookmarked(props.node.data.path)
)
</script>