mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-05 05:32:02 +00:00
fix: open previewable assets from list preview click/double-click (#9077)
## Summary - emit `preview-click` from `AssetsListItem` when clicking the preview tile - wire assets sidebar rows and queue job-history rows so preview-tile click and row double-click open the viewer/gallery - gate job-history preview opening by `taskRef.previewOutput` (not `iconImageUrl`) and use preview output URL/type so video previews are supported - add/extend tests for preview click and double-click behavior in assets list and job history ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-9077-fix-open-previewable-assets-from-list-preview-click-double-click-30f6d73d3650810a873cfa2dc085bf97) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -56,6 +56,8 @@
|
||||
@mouseleave="onAssetLeave(item.asset.id)"
|
||||
@contextmenu.prevent.stop="emit('context-menu', $event, item.asset)"
|
||||
@click.stop="emit('select-asset', item.asset, selectableAssets)"
|
||||
@dblclick.stop="emit('preview-asset', item.asset)"
|
||||
@preview-click="emit('preview-asset', item.asset)"
|
||||
@stack-toggle="void toggleStack(item.asset)"
|
||||
>
|
||||
<template v-if="hoveredAssetId === item.asset.id" #actions>
|
||||
@@ -116,6 +118,7 @@ const assetsStore = useAssetsStore()
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'select-asset', asset: AssetItem, assets?: AssetItem[]): void
|
||||
(e: 'preview-asset', asset: AssetItem): void
|
||||
(e: 'context-menu', event: MouseEvent, asset: AssetItem): void
|
||||
(e: 'approach-end'): void
|
||||
}>()
|
||||
|
||||
Reference in New Issue
Block a user