diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte index aa6905a4d6..334b406bb0 100644 --- a/web/src/lib/components/asset-viewer/detail-panel.svelte +++ b/web/src/lib/components/asset-viewer/detail-panel.svelte @@ -258,62 +258,58 @@
{#each people as person, index (person.id)} {#if showingHiddenPeople || !person.isHidden} -
($boundingBoxesArray = people[index].faces)} + on:blur={() => ($boundingBoxesArray = [])} on:mouseover={() => ($boundingBoxesArray = people[index].faces)} on:mouseleave={() => ($boundingBoxesArray = [])} + on:click={() => dispatch('closeViewer')} > - dispatch('closeViewer')} - > -
-
-

{person.name}

- {#if person.birthDate} - {@const personBirthDate = DateTime.fromISO(person.birthDate)} - {@const age = Math.floor(DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'years').years)} - {@const ageInMonths = Math.floor( - DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'months').months, - )} - {#if age >= 0} -

- {#if ageInMonths <= 11} - Age {ageInMonths} months - {:else} - Age {age} - {/if} -

- {/if} +
+
+

{person.name}

+ {#if person.birthDate} + {@const personBirthDate = DateTime.fromISO(person.birthDate)} + {@const age = Math.floor(DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'years').years)} + {@const ageInMonths = Math.floor( + DateTime.fromISO(asset.fileCreatedAt).diff(personBirthDate, 'months').months, + )} + {#if age >= 0} +

+ {#if ageInMonths <= 11} + Age {ageInMonths} months + {:else} + Age {age} + {/if} +

{/if} -
-
+ {/if} + {/if} {/each}
@@ -341,12 +337,10 @@ {@const assetDateTimeOriginal = DateTime.fromISO(asset.exifInfo.dateTimeOriginal, { zone: asset.exifInfo.timeZone ?? undefined, })} -
(isOwner ? (isShowChangeDate = true) : null)} - on:keydown={(event) => (isOwner ? event.key === 'Enter' && (isShowChangeDate = true) : null)} title={isOwner ? 'Edit date' : ''} class:hover:dark:text-immich-dark-primary={isOwner} class:hover:text-immich-primary={isOwner} @@ -384,11 +378,11 @@
{#if isOwner} - + {/if} - + {:else if !asset.exifInfo?.dateTimeOriginal && !asset.isReadOnly && isOwner}
@@ -396,9 +390,9 @@
- + {:else if asset.exifInfo?.dateTimeOriginal && asset.isReadOnly} {@const assetDateTimeOriginal = DateTime.fromISO(asset.exifInfo.dateTimeOriginal, { @@ -517,13 +511,11 @@ {/if} {#if asset.exifInfo?.city && !asset.isReadOnly} -
(isOwner ? (isShowChangeLocation = true) : null)} - on:keydown={(event) => (isOwner ? event.key === 'Enter' && (isShowChangeLocation = true) : null)} - tabindex="0" title={isOwner ? 'Edit location' : ''} - role="button" class:hover:dark:text-immich-dark-primary={isOwner} class:hover:text-immich-primary={isOwner} > @@ -550,14 +542,12 @@
{/if} - + {:else if !asset.exifInfo?.city && !asset.isReadOnly && isOwner} -
(isShowChangeLocation = true)} - on:keydown={(event) => event.key === 'Enter' && (isShowChangeLocation = true)} - tabindex="0" - role="button" title="Add location" >
@@ -570,7 +560,7 @@
-
+ {:else if asset.exifInfo?.city && asset.isReadOnly}
diff --git a/web/src/lib/components/sharedlinks-page/shared-link-card.svelte b/web/src/lib/components/sharedlinks-page/shared-link-card.svelte index f2d90b6c68..993a052bf6 100644 --- a/web/src/lib/components/sharedlinks-page/shared-link-card.svelte +++ b/web/src/lib/components/sharedlinks-page/shared-link-card.svelte @@ -1,5 +1,4 @@