mirror of
https://github.com/immich-app/immich.git
synced 2026-02-14 12:58:17 +03:00
pr feedback
This commit is contained in:
@@ -218,7 +218,7 @@
|
||||
<div class="flex h-10 w-full items-center justify-between">
|
||||
<h2>PEOPLE</h2>
|
||||
<div class="flex gap-2 items-center">
|
||||
{#if people.faces.some((person) => person.isHidden)}
|
||||
{#if people.visiblePeople.some((person) => person.isHidden)}
|
||||
<CircleIconButton
|
||||
title="Show hidden people"
|
||||
icon={showingHiddenPeople ? mdiEyeOff : mdiEye}
|
||||
@@ -239,7 +239,7 @@
|
||||
</div>
|
||||
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
{#each people.faces as person (person.id)}
|
||||
{#each people.visiblePeople as person (person.id)}
|
||||
{#if showingHiddenPeople || !person.isHidden}
|
||||
<a
|
||||
class="w-[90px]"
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
let loaderLoadingDoneTimeout: ReturnType<typeof setTimeout>;
|
||||
let automaticRefreshTimeout: ReturnType<typeof setTimeout>;
|
||||
|
||||
$: mapFacesToBeCreated = Object.entries(selectedPersonToAdd)
|
||||
.filter(([_, value]) => value.person === null)
|
||||
.map(([key, _]) => key);
|
||||
|
||||
const thumbnailWidth = '90px';
|
||||
|
||||
const generatePeopleWithoutFaces = async () => {
|
||||
@@ -94,9 +98,23 @@
|
||||
isShowLoadingPeople = false;
|
||||
}
|
||||
|
||||
/*
|
||||
* we wait for the server to create the feature photo for:
|
||||
* - people which has been reassigned to a new person
|
||||
* - faces removed assigned to a new person
|
||||
*
|
||||
* if after 15 seconds the server has not generated the feature photos,
|
||||
* we go back to the detail-panel
|
||||
*/
|
||||
const onPersonThumbnail = (personId: string) => {
|
||||
assetFaceGenerated.push(personId);
|
||||
if (isEqual(assetFaceGenerated, peopleToCreate) && loaderLoadingDoneTimeout && automaticRefreshTimeout) {
|
||||
|
||||
if (
|
||||
isEqual(assetFaceGenerated, peopleToCreate) &&
|
||||
isEqual(assetFaceGenerated, mapFacesToBeCreated) &&
|
||||
loaderLoadingDoneTimeout &&
|
||||
automaticRefreshTimeout
|
||||
) {
|
||||
clearTimeout(loaderLoadingDoneTimeout);
|
||||
clearTimeout(automaticRefreshTimeout);
|
||||
onRefresh();
|
||||
|
||||
@@ -45,7 +45,7 @@ export function getAltText(asset: AssetResponseDto) {
|
||||
altText += ` in ${asset.exifInfo.city}, ${asset.exifInfo.country}`;
|
||||
}
|
||||
|
||||
const names = asset.people?.faces.filter((p) => p.name).map((p) => p.name) ?? [];
|
||||
const names = asset.people?.visiblePeople.filter((p) => p.name).map((p) => p.name) ?? [];
|
||||
if (names.length == 1) {
|
||||
altText += ` with ${names[0]}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user