Placeholder support for text output

Since text outputs are not currently exposed in history, there's not way
to test this and the label doesn't actually exist
This commit is contained in:
Austin Mroz
2025-12-30 19:14:44 -08:00
parent b145566a7f
commit cdb422fefc

View File

@@ -246,10 +246,18 @@ function formatDuration(durationSeconds?: number) {
type StatItem = { content?: string; iconClass?: string }
const mediaTypes: Record<string, StatItem> = {
audio: {
content: t('sideToolbar.mediaAssets.filterAudio'),
iconClass: 'icon-[lucide--audio-lines]'
},
images: {
content: t('sideToolbar.mediaAssets.filterImage'),
iconClass: 'icon-[lucide--image]'
},
text: {
content: t('sideToolbar.mediaAssets.filterText'),
iconClass: 'icon-[lucide--text]'
},
video: {
content: t('sideToolbar.mediaAssets.filterVideo'),
iconClass: 'icon-[lucide--video]'
@@ -257,10 +265,6 @@ const mediaTypes: Record<string, StatItem> = {
gifs: {
content: t('sideToolbar.mediaAssets.filterVideo'),
iconClass: 'icon-[lucide--video]'
},
audio: {
content: t('sideToolbar.mediaAssets.filterAudio'),
iconClass: 'icon-[lucide--audio-lines]'
}
}
const itemStats = computed<StatItem[]>(() => {
@@ -511,6 +515,12 @@ function handleCenterWheel(e: WheelEvent) {
controls
:src="preview.url"
/>
<article
v-else-if="preview?.mediaType === 'text'"
class="w-full max-w-128 m-auto my-12 overflow-y-auto"
controls
v-text="preview.url"
/>
<img
v-else
class="pointer-events-none object-contain flex-1 max-h-full brightness-50 opacity-10"