mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-04 23:20:07 +00:00
## Summary Tested these changes and confirmed that: 1. Feedback button shows. 2. You can run workflows and switch out models. 3. You can use the mask editor. (thank you @ric-yu for helping me verify). ## Changes A lot, please see commits. Gets us up to date with `main` as of 10-11-2025. --------- Co-authored-by: Simula_r <18093452+simula-r@users.noreply.github.com> Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: snomiao <snomiao@gmail.com> Co-authored-by: Christian Byrne <cbyrne@comfy.org> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: DrJKL <DrJKL@users.noreply.github.com> Co-authored-by: Alexander Brown <drjkl@comfy.org> Co-authored-by: Marwan Ahmed <155799754+marawan206@users.noreply.github.com> Co-authored-by: DrJKL <DrJKL0424@gmail.com> Co-authored-by: Rizumu Ayaka <rizumu@ayaka.moe> Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com> Co-authored-by: AustinMroz <4284322+AustinMroz@users.noreply.github.com> Co-authored-by: Austin Mroz <austin@comfy.org> Co-authored-by: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Co-authored-by: GitHub Action <action@github.com> Co-authored-by: filtered <176114999+webfiltered@users.noreply.github.com> Co-authored-by: Benjamin Lu <benceruleanlu@proton.me> Co-authored-by: Jin Yi <jin12cc@gmail.com> Co-authored-by: Robin Huang <robin.j.huang@gmail.com>
74 lines
1.8 KiB
Vue
74 lines
1.8 KiB
Vue
<!-- A file download button with a label and a size hint -->
|
|
<template>
|
|
<div class="flex flex-row items-center gap-2">
|
|
<div>
|
|
<div>
|
|
<span :title="hint">{{ label }}</span>
|
|
</div>
|
|
<Message
|
|
v-if="props.error"
|
|
severity="error"
|
|
icon="pi pi-exclamation-triangle"
|
|
size="small"
|
|
variant="outlined"
|
|
class="my-2 h-min max-w-xs px-1"
|
|
:title="props.error"
|
|
:pt="{
|
|
text: { class: 'overflow-hidden text-ellipsis' }
|
|
}"
|
|
>
|
|
{{ props.error }}
|
|
</Message>
|
|
</div>
|
|
<div>
|
|
<Button
|
|
:label="$t('g.download') + ' (' + fileSize + ')'"
|
|
size="small"
|
|
outlined
|
|
:disabled="!!props.error"
|
|
:title="props.url"
|
|
@click="download.triggerBrowserDownload"
|
|
/>
|
|
</div>
|
|
<div>
|
|
<Button
|
|
:label="$t('g.copyURL')"
|
|
size="small"
|
|
outlined
|
|
:disabled="!!props.error"
|
|
@click="copyURL"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import Button from 'primevue/button'
|
|
import Message from 'primevue/message'
|
|
import { computed } from 'vue'
|
|
|
|
import { useCopyToClipboard } from '@/composables/useCopyToClipboard'
|
|
import { useDownload } from '@/composables/useDownload'
|
|
import { formatSize } from '@/utils/formatUtil'
|
|
|
|
const props = defineProps<{
|
|
url: string
|
|
hint?: string
|
|
label?: string
|
|
error?: string
|
|
}>()
|
|
|
|
const label = computed(() => props.label || props.url.split('/').pop())
|
|
|
|
const hint = computed(() => props.hint || props.url)
|
|
const download = useDownload(props.url)
|
|
const fileSize = computed(() =>
|
|
download.fileSize.value ? formatSize(download.fileSize.value) : '?'
|
|
)
|
|
const copyURL = async () => {
|
|
await copyToClipboard(props.url)
|
|
}
|
|
|
|
const { copyToClipboard } = useCopyToClipboard()
|
|
</script>
|