mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-30 19:21:54 +00:00
feat: replace double-click with Use button on Asset Cards
This commit is contained in:
@@ -178,6 +178,7 @@
|
|||||||
"source": "Source",
|
"source": "Source",
|
||||||
"filter": "Filter",
|
"filter": "Filter",
|
||||||
"apply": "Apply",
|
"apply": "Apply",
|
||||||
|
"use": "Use",
|
||||||
"enabled": "Enabled",
|
"enabled": "Enabled",
|
||||||
"installed": "Installed",
|
"installed": "Installed",
|
||||||
"restart": "Restart",
|
"restart": "Restart",
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
)
|
)
|
||||||
"
|
"
|
||||||
@click.stop="interactive && $emit('focus', asset)"
|
@click.stop="interactive && $emit('focus', asset)"
|
||||||
@dblclick="interactive && $emit('select', asset)"
|
|
||||||
@keydown.enter.self="interactive && $emit('select', asset)"
|
@keydown.enter.self="interactive && $emit('select', asset)"
|
||||||
>
|
>
|
||||||
<div class="relative aspect-square w-full overflow-hidden rounded-xl">
|
<div class="relative aspect-square w-full overflow-hidden rounded-xl">
|
||||||
@@ -95,19 +94,36 @@
|
|||||||
>
|
>
|
||||||
{{ asset.description }}
|
{{ asset.description }}
|
||||||
</p>
|
</p>
|
||||||
<div class="flex gap-4 text-xs text-muted-foreground mt-auto">
|
<div class="flex items-center justify-between gap-2 mt-auto">
|
||||||
<span v-if="asset.stats.stars" class="flex items-center gap-1">
|
<div class="flex gap-3 text-xs text-muted-foreground">
|
||||||
<i class="icon-[lucide--star] size-3" />
|
<span v-if="asset.stats.stars" class="flex items-center gap-1">
|
||||||
{{ asset.stats.stars }}
|
<i class="icon-[lucide--star] size-3" />
|
||||||
</span>
|
{{ asset.stats.stars }}
|
||||||
<span v-if="asset.stats.downloadCount" class="flex items-center gap-1">
|
</span>
|
||||||
<i class="icon-[lucide--download] size-3" />
|
<span
|
||||||
{{ asset.stats.downloadCount }}
|
v-if="asset.stats.downloadCount"
|
||||||
</span>
|
class="flex items-center gap-1"
|
||||||
<span v-if="asset.stats.formattedDate" class="flex items-center gap-1">
|
>
|
||||||
<i class="icon-[lucide--clock] size-3" />
|
<i class="icon-[lucide--download] size-3" />
|
||||||
{{ asset.stats.formattedDate }}
|
{{ asset.stats.downloadCount }}
|
||||||
</span>
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="asset.stats.formattedDate"
|
||||||
|
class="flex items-center gap-1"
|
||||||
|
>
|
||||||
|
<i class="icon-[lucide--clock] size-3" />
|
||||||
|
{{ asset.stats.formattedDate }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
v-if="interactive"
|
||||||
|
variant="secondary"
|
||||||
|
size="lg"
|
||||||
|
class="shrink-0"
|
||||||
|
@click.stop="$emit('select', asset)"
|
||||||
|
>
|
||||||
|
{{ $t('g.use') }}
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user