Showing age at death instead of age from birth on actor tiles.

This commit is contained in:
2025-02-23 17:11:47 +01:00
parent 48331c1c5a
commit 49f1bc9ce2
3 changed files with 21 additions and 3 deletions

View File

@@ -40,13 +40,19 @@
<Gender :gender="actor.gender" />
<span
v-if="actor.ageFromBirth"
v-if="actor.ageAtDeath"
:title="`Passed ${formatDate(actor.ageAtDeath, 'MMMM d, yyyy')}`"
class="age"
>{{ actor.ageAtDeath }} <Icon icon="tombstone" /></span>
<span
v-else-if="actor.ageFromBirth"
:title="`Born ${formatDate(actor.dateOfBirth, 'MMMM d, yyyy')}`"
class="age"
>{{ actor.ageFromBirth }}</span>
<span
v-if="actor.ageThen && actor.ageThen < actor.ageFromBirth"
v-if="actor.ageThen && actor.ageThen < actor.ageFromBirth && (!actor.ageAtDeath || actor.ageThen < actor.ageAtDeath)"
title="Age on date of release"
class="age age-then"
>{{ actor.ageThen }}</span>
@@ -209,7 +215,16 @@ const favorited = ref(props.actor.stashes.some((actorStash) => actorStash.id ===
}
.age {
display: inline-flex;
align-items: center;
margin-right: .25rem;
.icon {
width: .8rem;
height: .8rem;
fill: var(--highlight-weak-10);
margin-left: .25rem;
}
}
.age-then {