diff --git a/components/actors/tile.vue b/components/actors/tile.vue index 6b6248c..3b9833f 100644 --- a/components/actors/tile.vue +++ b/components/actors/tile.vue @@ -40,13 +40,19 @@ {{ actor.ageAtDeath }} + + {{ actor.ageFromBirth }} {{ actor.ageThen }} @@ -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 { diff --git a/src/actors.js b/src/actors.js index 5ab1c52..b4acd09 100644 --- a/src/actors.js +++ b/src/actors.js @@ -74,6 +74,9 @@ export function curateActor(actor, context = {}) { ageFromBirth: actor.date_of_birth && actor.date_of_birth.getFullYear() > 1 ? differenceInYears(Date.now(), actor.date_of_birth) : null, + ageAtDeath: actor.date_of_birth && actor.date_of_death && actor.date_of_birth.getFullYear() > 1 + ? differenceInYears(actor.date_of_death, actor.date_of_birth) + : null, ageThen: context.sceneDate && actor.date_of_birth && actor.date_of_birth.getFullYear() > 1 ? differenceInYears(context.sceneDate, actor.date_of_birth) : null, diff --git a/static b/static index 04c9d21..6534577 160000 --- a/static +++ b/static @@ -1 +1 @@ -Subproject commit 04c9d2175cf66bf3e286da6ffded79848a8d2488 +Subproject commit 6534577c5755df26a90b318a3ea7e653636dfd35