From 5ab48f5d971953c9170a1091123ca93f2b51d924 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 19 Dec 2025 12:27:07 -0800 Subject: [PATCH] add character tags and proficiency labels to list view --- .../collection/CollectionCharacterRow.svelte | 85 ++++++++----------- 1 file changed, 34 insertions(+), 51 deletions(-) diff --git a/src/lib/components/collection/CollectionCharacterRow.svelte b/src/lib/components/collection/CollectionCharacterRow.svelte index 150acb6f..96ba6267 100644 --- a/src/lib/components/collection/CollectionCharacterRow.svelte +++ b/src/lib/components/collection/CollectionCharacterRow.svelte @@ -3,6 +3,8 @@ import { getCharacterImageWithPose } from '$lib/utils/images' import UncapIndicator from '$lib/components/uncap/UncapIndicator.svelte' import ElementLabel from '$lib/components/labels/ElementLabel.svelte' + import ProficiencyLabel from '$lib/components/labels/ProficiencyLabel.svelte' + import CharacterTags from '$lib/components/tags/CharacterTags.svelte' import perpetuityFilled from '$src/assets/icons/perpetuity/filled.svg' interface Props { @@ -29,24 +31,7 @@ }) const element = $derived(character.character?.element) - - const awakeningDisplay = $derived.by(() => { - if (!character.awakening) return null - const type = character.awakening.type?.name?.en || 'Balanced' - const level = character.awakening.level || 1 - // Abbreviate type names - const abbrev = - type === 'Balanced' - ? 'BAL' - : type === 'Attack' - ? 'ATK' - : type === 'Defense' - ? 'DEF' - : type === 'Multiattack' - ? 'DA/TA' - : type.slice(0, 3).toUpperCase() - return `${abbrev} ${level}` - }) + const proficiencies = $derived(character.character?.proficiency ?? []) @@ -147,6 +135,12 @@ .name-cell { flex: 1; min-width: 0; + display: flex; + flex-direction: column; + gap: $unit-half; + } + + .name-row { display: flex; align-items: center; gap: $unit; @@ -159,13 +153,13 @@ overflow: hidden; text-overflow: ellipsis; } - } - } - .perpetuity-badge { - width: 16px; - height: 16px; - flex-shrink: 0; + .perpetuity-badge { + width: 16px; + height: 16px; + flex-shrink: 0; + } + } } .uncap-cell { @@ -175,20 +169,9 @@ flex-shrink: 0; } - .awakening-cell { - width: 64px; + .proficiency-cell { display: flex; - justify-content: flex-end; + gap: $unit-half; flex-shrink: 0; } - - .awakening { - font-size: $font-small; - color: var(--text-secondary); - font-weight: $medium; - } - - .awakening-placeholder { - color: var(--text-secondary); - }