mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-10 07:30:08 +00:00
Adds a system for selecting the inputs and outputs which should be displayed when inside linear mode. Functions only in litegraph currently. Vue support will require a separate, larger PR. Inputs and outputs can be re-ordered by dragging and dropping on the side panel.  ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8965-Add-App-I-O-selection-system-30b6d73d365081569b36c1682a1fdbc5) by [Unito](https://www.unito.io)
47 lines
1.1 KiB
Vue
47 lines
1.1 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import Popover from '@/components/ui/Popover.vue'
|
|
import Button from '@/components/ui/button/Button.vue'
|
|
|
|
const { t } = useI18n()
|
|
|
|
const { rename, remove } = defineProps<{
|
|
title: string
|
|
subTitle?: string
|
|
rename?: () => void
|
|
remove?: () => void
|
|
}>()
|
|
|
|
const entries = computed(() => {
|
|
const items = []
|
|
if (rename)
|
|
items.push({
|
|
label: t('g.rename'),
|
|
command: rename,
|
|
icon: 'icon-[lucide--pencil]'
|
|
})
|
|
if (remove)
|
|
items.push({
|
|
label: t('g.delete'),
|
|
command: remove,
|
|
icon: 'icon-[lucide--trash-2]'
|
|
})
|
|
return items
|
|
})
|
|
</script>
|
|
<template>
|
|
<div class="p-2 my-2 rounded-lg flex items-center-safe">
|
|
<span class="mr-auto" v-text="title" />
|
|
<span class="text-muted-foreground mr-2 text-end" v-text="subTitle" />
|
|
<Popover :entries>
|
|
<template #button>
|
|
<Button variant="muted-textonly">
|
|
<i class="icon-[lucide--ellipsis]" />
|
|
</Button>
|
|
</template>
|
|
</Popover>
|
|
</div>
|
|
</template>
|