Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f042042
feat: Add Media Assets sidebar tab for file management
viva-jinyi Oct 17, 2025
c20ea26
refactor: Apply PR #6112 review feedback for Media Assets feature
viva-jinyi Oct 20, 2025
fffdae1
chore: unexpected export
viva-jinyi Oct 20, 2025
8765a10
feat: Improve media asset display with file format tags and filename …
viva-jinyi Oct 20, 2025
52b2129
feat: Add includePublic parameter to getAssetsByTag API
viva-jinyi Oct 22, 2025
aa3354a
fix: test code
viva-jinyi Oct 22, 2025
cddd8ea
refactor: useQueueStore
viva-jinyi Oct 22, 2025
ea7e910
refactor: Apply review feedback for media assets implementation
viva-jinyi Oct 23, 2025
02a1810
Extract AssetsSidebarTab template and improve UI structure (#6164)
viva-jinyi Oct 23, 2025
5c01e61
feat: Implement centralized AssetsStore for reactive assets updates
viva-jinyi Oct 24, 2025
38885b7
refactor: Apply formatUtil code review feedback and improve type safety
viva-jinyi Oct 24, 2025
fd953c6
[automated] Update test expectations
invalid-email-address Oct 24, 2025
4e2fc4a
feat: Auto-refresh assets on file upload
viva-jinyi Oct 24, 2025
9d28ec8
fix: Add AssetsStore update trigger to WidgetSelectDropdown uploads
viva-jinyi Oct 24, 2025
cb33c8f
refactor:
viva-jinyi Oct 27, 2025
9125459
fix: Prevent gallery index shift when new outputs are generated
viva-jinyi Oct 27, 2025
993f08f
refactor: delete unused export
viva-jinyi Oct 27, 2025
e0a0d9f
refactor: Simplify asset ID handling and remove UUID extraction, Acce…
viva-jinyi Oct 27, 2025
b778cde
feat: implement asset deletion functionality (#6203)
viva-jinyi Oct 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: Improve media asset display with file format tags and filename …
…truncation

- Add file format tags (PNG, JPG, etc.) for input directory assets
- Truncate long filenames in input assets with originalFilename preservation
- Show file format chip independently from duration chip
- Fix conditional display logic for chips in MediaAssetCard
- Apply consistent filename truncation (20 chars) across cloud assets

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
  • Loading branch information
viva-jinyi and claude committed Oct 29, 2025
commit 8765a10c2ed326516b1a83c75f5cd4dd4d79961b
2 changes: 1 addition & 1 deletion src/components/card/CardTop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const {
}>()

const topStyle = computed(() => {
const baseClasses = 'relative p-0'
const baseClasses = 'relative p-0 overflow-hidden'

const ratioClasses = {
square: 'aspect-square',
Expand Down
16 changes: 14 additions & 2 deletions src/platform/assets/components/MediaAssetCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@
</template>

<!-- Duration/Format chips (bottom-left) - show on hover even when playing -->
<template v-if="showDurationChips" #bottom-left>
<template v-if="showDurationChips || showFileFormatChip" #bottom-left>
<div
class="flex flex-wrap items-center gap-1"
@mouseenter="handleOverlayMouseEnter"
@mouseleave="handleOverlayMouseLeave"
>
<SquareChip variant="light" :label="formattedDuration" />
<SquareChip
v-if="formattedDuration"
variant="light"
:label="formattedDuration"
/>
<SquareChip v-if="fileFormat" variant="light" :label="fileFormat" />
</div>
</template>
Expand Down Expand Up @@ -291,6 +295,14 @@ const showDurationChips = computed(
(!isVideoPlaying.value || isCardOrOverlayHovered.value)
)

const showFileFormatChip = computed(
() =>
!loading &&
!!asset &&
!!fileFormat.value &&
(!isVideoPlaying.value || isCardOrOverlayHovered.value)
)

const showOutputCount = computed(
() => false // Remove output count for simplified version
)
Expand Down
4 changes: 2 additions & 2 deletions src/platform/assets/components/MediaVideoBottom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
{{ fileName }}
</h3>
<div class="flex items-center text-xs text-zinc-400">
<span>{{ asset.dimensions?.width }}x{{ asset.dimensions?.height }}</span>
<span>{{ formatSize(asset.size) }}</span>
</div>
</div>
</template>

<script setup lang="ts">
import { computed } from 'vue'

import { getFilenameDetails } from '@/utils/formatUtil'
import { formatSize, getFilenameDetails } from '@/utils/formatUtil'

import type { AssetContext, AssetMeta } from '../schemas/mediaAssetSchema'

Expand Down
11 changes: 10 additions & 1 deletion src/platform/assets/composables/useMediaAssets/useAssetsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { assetService } from '@/platform/assets/services/assetService'
import type { HistoryTaskItem } from '@/schemas/apiSchema'
import { api } from '@/scripts/api'
import { TaskItemImpl } from '@/stores/queueStore'
import { truncateFilename } from '@/utils/formatUtil'

import { mapTaskOutputToAssetItem } from './assetMappers'

Expand All @@ -31,7 +32,15 @@ export function useAssetsApi() {
// For input directory, just return assets without history
if (directory === 'input') {
const assets = await assetService.getAssetsByTag(directory)
return assets
// Process assets to truncate long filenames for display
return assets.map((asset) => ({
...asset,
name: truncateFilename(asset.name, 20),
user_metadata: {
...asset.user_metadata,
originalFilename: asset.name.length > 20 ? asset.name : undefined
}
}))
}

// For output directory, fetch history data and convert to AssetItem format
Expand Down