Merge branch 'feature/readonly-sharing' of github.com:mgabor3141/immich; branch 'main' of github.com:immich-app/immich into feature/readonly-sharing

This commit is contained in:
Alex Tran
2024-04-24 02:41:03 -05:00
42 changed files with 1104 additions and 813 deletions

View File

@@ -83,6 +83,7 @@
hoverLabel = new Date(attr).toLocaleString($locale, {
month: 'short',
year: 'numeric',
timeZone: 'UTC',
});
};

View File

@@ -277,4 +277,4 @@ export const handlePromiseError = <T>(promise: Promise<T>): void => {
promise.catch((error) => console.error(`[utils.ts]:handlePromiseError ${error}`, error));
};
export const memoryLaneTitle = (yearsAgo: number) => `${yearsAgo} ${yearsAgo ? 'years' : 'year'} since...`;
export const memoryLaneTitle = (yearsAgo: number) => `${yearsAgo} ${yearsAgo ? 'years' : 'year'} ago`;

View File

@@ -439,10 +439,10 @@
{/if}
</svelte:fragment>
{#if countVisiblePeople > 0}
{#if countVisiblePeople > 0 && (!searchName || searchedPeopleLocal.length > 0)}
<div class="grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 xl:grid-cols-7 2xl:grid-cols-9 gap-1">
{#each people as person, index (person.id)}
{#if !person.isHidden && (searchName ? searchedPeopleLocal.some((searchedPerson) => searchedPerson.id === person.id) : true)}
{#if searchName}
{#each searchedPeopleLocal as person, index (person.id)}
<PeopleCard
{person}
preload={index < 20}
@@ -451,14 +451,29 @@
on:merge-people={() => handleMergePeople(person)}
on:hide-person={() => handleHidePerson(person)}
/>
{/if}
{/each}
{/each}
{:else}
{#each people as person, index (person.id)}
{#if !person.isHidden}
<PeopleCard
{person}
preload={index < 20}
on:change-name={() => handleChangeName(person)}
on:set-birth-date={() => handleSetBirthDate(person)}
on:merge-people={() => handleMergePeople(person)}
on:hide-person={() => handleHidePerson(person)}
/>
{/if}
{/each}
{/if}
</div>
{:else}
<div class="flex min-h-[calc(66vh_-_11rem)] w-full place-content-center items-center dark:text-white">
<div class="flex flex-col content-center items-center text-center">
<Icon path={mdiAccountOff} size="3.5em" />
<p class="mt-5 text-3xl font-medium">No people</p>
<p class="mt-5 text-3xl font-medium max-w-lg line-clamp-2 overflow-hidden">
{`No people${searchName ? ` named "${searchName}"` : ''}`}
</p>
</div>
</div>
{/if}