From 03681a12bd9ce0a9c213e4170280458aca14d9ea Mon Sep 17 00:00:00 2001
From: Arjan Singh <1598641+arjansingh@users.noreply.github.com>
Date: Thu, 16 Oct 2025 14:46:50 -0700
Subject: [PATCH] feat: AssetCard tweaks (#6085)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
## Summary
1. fix `preview_url` logic
2. design tweaks for border radius, fallback gradient, and name line
clamping (2 lines)
3. handle image error states by showing gradient
4. misc. refactors
## Screenshots
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6085-feat-AssetCard-tweaks-28e6d73d3650818da7a2f4148be48ff7)
by [Unito](https://www.unito.io)
---
.../assets/components/AssetCard.stories.ts | 45 +++++++++++
src/platform/assets/components/AssetCard.vue | 77 +++++++++++++------
2 files changed, 99 insertions(+), 23 deletions(-)
diff --git a/src/platform/assets/components/AssetCard.stories.ts b/src/platform/assets/components/AssetCard.stories.ts
index 2b3532a05..2915a219a 100644
--- a/src/platform/assets/components/AssetCard.stories.ts
+++ b/src/platform/assets/components/AssetCard.stories.ts
@@ -84,6 +84,51 @@ export const NonInteractive: Story = {
}
}
+export const WithPreviewImage: Story = {
+ args: {
+ asset: createAssetData({
+ preview_url: '/assets/images/comfy-logo-single.svg'
+ }),
+ interactive: true
+ },
+ decorators: [
+ () => ({
+ template:
+ '