mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Backport of #6694 to `core/1.32` Automatically created by backport workflow. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6770-backport-core-1-32-feat-Add-Civitai-model-upload-wizard-2b16d73d365081f8a732f69713f95b61) by [Unito](https://www.unito.io) Co-authored-by: Luke Mino-Altherr <luke@comfy.org> Co-authored-by: Claude <noreply@anthropic.com>
59 lines
1.6 KiB
Vue
59 lines
1.6 KiB
Vue
<template>
|
|
<div class="flex flex-col gap-4">
|
|
<!-- Model Info Section -->
|
|
<div class="flex flex-col gap-2">
|
|
<p class="text-sm text-muted m-0">
|
|
{{ $t('assetBrowser.modelAssociatedWithLink') }}
|
|
</p>
|
|
<p class="text-sm mt-0">
|
|
{{ metadata?.name || metadata?.filename }}
|
|
</p>
|
|
</div>
|
|
|
|
<!-- Model Type Selection -->
|
|
<div class="flex flex-col gap-2">
|
|
<label class="text-sm text-muted">
|
|
{{ $t('assetBrowser.modelTypeSelectorLabel') }}
|
|
</label>
|
|
<SingleSelect
|
|
v-model="selectedModelType"
|
|
:label="
|
|
isLoading
|
|
? $t('g.loading')
|
|
: $t('assetBrowser.modelTypeSelectorPlaceholder')
|
|
"
|
|
:options="modelTypes"
|
|
:disabled="isLoading"
|
|
/>
|
|
<div class="flex items-center gap-2 text-sm text-muted">
|
|
<i class="icon-[lucide--info]" />
|
|
<span>{{ $t('assetBrowser.notSureLeaveAsIs') }}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { computed } from 'vue'
|
|
|
|
import SingleSelect from '@/components/input/SingleSelect.vue'
|
|
import { useModelTypes } from '@/platform/assets/composables/useModelTypes'
|
|
import type { AssetMetadata } from '@/platform/assets/schemas/assetSchema'
|
|
|
|
const props = defineProps<{
|
|
modelValue: string | undefined
|
|
metadata: AssetMetadata | null
|
|
}>()
|
|
|
|
const emit = defineEmits<{
|
|
'update:modelValue': [value: string | undefined]
|
|
}>()
|
|
|
|
const { modelTypes, isLoading } = useModelTypes()
|
|
|
|
const selectedModelType = computed({
|
|
get: () => props.modelValue ?? null,
|
|
set: (value: string | null) => emit('update:modelValue', value ?? undefined)
|
|
})
|
|
</script>
|