fix(aiui): hide zero-value metadata — no more '★ 0 · 0m' (W1.5)
Node-derived cards have no rating/year/runtime/director; rendering the
defaults read as '★ 0 · 0m' beside an empty string. FilmGrid, FilmDetail
and SongGrid now gate those spans on real values (FilmCard, Book and Place
components already did). Panel empty states were made honest in 9abc1623
('Nothing found'), so this closes the rendering-honesty item.
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -40,10 +40,11 @@
|
||||
<div class="absolute bottom-0 left-0 right-0 p-4">
|
||||
<h2 class="text-lg font-bold text-white">{{ film.title }}</h2>
|
||||
<div class="flex items-center gap-2 mt-1 text-xs text-white/60">
|
||||
<span class="text-accent font-bold">★ {{ film.rating }}</span>
|
||||
<span>{{ film.year }}</span>
|
||||
<span>{{ film.runtime }}m</span>
|
||||
<span>{{ film.director }}</span>
|
||||
<!-- honest rendering: zero/empty metadata is hidden, not "★ 0 · 0m" -->
|
||||
<span v-if="film.rating > 0" class="text-accent font-bold">★ {{ film.rating }}</span>
|
||||
<span v-if="film.year > 0">{{ film.year }}</span>
|
||||
<span v-if="film.runtime > 0">{{ film.runtime }}m</span>
|
||||
<span v-if="film.director">{{ film.director }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -76,8 +76,9 @@
|
||||
{{ film.title }}
|
||||
</p>
|
||||
<div class="flex items-center gap-1 mt-0.5">
|
||||
<span class="text-xs text-accent font-bold">★ {{ film.rating }}</span>
|
||||
<span class="text-xs text-white/40">{{ film.year }}</span>
|
||||
<!-- hide zero-value metadata: "★ 0" tells the operator nothing -->
|
||||
<span v-if="film.rating > 0" class="text-xs text-accent font-bold">★ {{ film.rating }}</span>
|
||||
<span v-if="film.year > 0" class="text-xs text-white/40">{{ film.year }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -86,7 +86,8 @@
|
||||
<p class="text-xs font-semibold text-white/90 leading-tight truncate">
|
||||
{{ song.title }}
|
||||
</p>
|
||||
<p class="text-xs text-white/40 truncate mt-0.5">{{ song.artist }}</p>
|
||||
<!-- filename-derived songs have no artist — don't spend a blank line on it -->
|
||||
<p v-if="song.artist" class="text-xs text-white/40 truncate mt-0.5">{{ song.artist }}</p>
|
||||
</div>
|
||||
|
||||
<div class="absolute top-1.5 right-1.5 flex gap-0.5 flex-wrap justify-end max-w-[60%]">
|
||||
|
||||
Reference in New Issue
Block a user