High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
feat(web): show birthdate on person page (#16772)
Yarosf794c3e0dfd9
diff --git a/i18n/en.json b/i18n/en.jsonindex 9b7ee261f2..5bd0f7d371 100644--- a/i18n/en.json+++ b/i18n/en.json@@ -987,6 +987,7 @@"permanently_deleted_asset": "Permanently deleted asset","permanently_deleted_assets_count": "Permanently deleted {count, plural, one {# asset} other {# assets}}","person": "Person",+ "person_birthdate": "Born on {date}","person_hidden": "{name}{hidden, select, true { (hidden)} other {}}","photo_shared_all_users": "Looks like you shared your photos with all users or you don't have any user to share with.","photos": "Photos",diff --git a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelteindex b591cf1bdb..6cad217377 100644--- a/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/people/[personId]/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -62,6 +62,8 @@import { onDestroy, onMount } from 'svelte';import { t } from 'svelte-i18n';import type { PageData } from './$types';+ import { locale } from '$lib/stores/preferences.store';+ import { DateTime } from 'luxon';interface Props {data: PageData;@@ -539,12 +541,28 @@heightStyle="3.375rem"/><div- class="flex flex-col justify-center text-left px-4 h-14 text-immich-primary dark:text-immich-dark-primary"+ class="flex flex-col justify-center text-left px-4 text-immich-primary dark:text-immich-dark-primary"><p class="w-40 sm:w-72 font-medium truncate">{person.name || $t('add_a_name')}</p>- <p class="absolute w-fit text-sm text-gray-500 dark:text-immich-gray bottom-0">+ <p class="text-sm text-gray-500 dark:text-immich-gray">{$t('assets_count', { values: { count: numberOfAssets } })}</p>+ {#if person.birthDate}+ <p class="text-sm text-gray-500 dark:text-immich-gray">+ {$t('person_birthdate', {+ values: {+ date: DateTime.fromISO(person.birthDate).toLocaleString(+ {+ month: 'numeric',+ day: 'numeric',+ year: 'numeric',+ },+ { locale: $locale },+ ),+ },+ })}+ </p>+ {/if}</div></button></div>