refactor(web): use derived instead of get(t) (#10884)

This commit is contained in:
Michel Heusschen
2024-07-05 15:06:35 +02:00
committed by GitHub
parent 6791af8c2c
commit 3cd187dced
6 changed files with 16 additions and 18 deletions

View File

@@ -109,8 +109,8 @@
curve
shadow
url={getPeopleThumbnailUrl(person)}
altText={getPersonNameWithHiddenValue(person.name, person.isHidden)}
title={getPersonNameWithHiddenValue(person.name, person.isHidden)}
altText={$getPersonNameWithHiddenValue(person.name, person.isHidden)}
title={$getPersonNameWithHiddenValue(person.name, person.isHidden)}
widthStyle="90px"
heightStyle="90px"
thumbhash={null}
@@ -118,7 +118,7 @@
/>
</div>
<p class="mt-1 truncate font-medium" title={getPersonNameWithHiddenValue(person.name, person.isHidden)}>
<p class="mt-1 truncate font-medium" title={$getPersonNameWithHiddenValue(person.name, person.isHidden)}>
{person.name}
</p>
</button>

View File

@@ -236,7 +236,7 @@
shadow
url={getPeopleThumbnailUrl(selectedPersonToReassign[face.id])}
altText={selectedPersonToReassign[face.id].name}
title={getPersonNameWithHiddenValue(
title={$getPersonNameWithHiddenValue(
selectedPersonToReassign[face.id].name,
selectedPersonToReassign[face.id]?.isHidden,
)}
@@ -250,7 +250,7 @@
shadow
url={getPeopleThumbnailUrl(face.person)}
altText={face.person.name}
title={getPersonNameWithHiddenValue(face.person.name, face.person.isHidden)}
title={$getPersonNameWithHiddenValue(face.person.name, face.person.isHidden)}
widthStyle={thumbnailWidth}
heightStyle={thumbnailWidth}
hidden={face.person.isHidden}

View File

@@ -169,7 +169,7 @@
<ControlAppBar on:close={() => goto(AppRoute.PHOTOS)} forceDark>
<svelte:fragment slot="leading">
<p class="text-lg">
{memoryLaneTitle(currentMemory.yearsAgo)}
{$memoryLaneTitle(currentMemory.yearsAgo)}
</p>
</svelte:fragment>
@@ -261,7 +261,7 @@
{#if previousMemory}
<div class="absolute bottom-4 right-4 text-left text-white">
<p class="text-xs font-semibold text-gray-200">{$t('previous').toUpperCase()}</p>
<p class="text-xl">{memoryLaneTitle(previousMemory.yearsAgo)}</p>
<p class="text-xl">{$memoryLaneTitle(previousMemory.yearsAgo)}</p>
</div>
{/if}
</button>
@@ -344,7 +344,7 @@
{#if nextMemory}
<div class="absolute bottom-4 left-4 text-left text-white">
<p class="text-xs font-semibold text-gray-200">{$t('up_next').toUpperCase()}</p>
<p class="text-xl">{memoryLaneTitle(nextMemory.yearsAgo)}</p>
<p class="text-xl">{$memoryLaneTitle(nextMemory.yearsAgo)}</p>
</div>
{/if}
</button>

View File

@@ -80,7 +80,7 @@
draggable="false"
/>
<p class="absolute bottom-2 left-4 z-10 text-lg text-white">
{memoryLaneTitle(memory.yearsAgo)}
{$memoryLaneTitle(memory.yearsAgo)}
</p>
<div
class="absolute left-0 top-0 z-0 h-full w-full rounded-xl bg-gradient-to-t from-black/40 via-transparent to-transparent transition-all hover:bg-black/20"