fix(web): new feature photo (#9443)

* fix: new feature photo

* fix: use updatedAt
This commit is contained in:
martin
2024-06-28 02:16:26 +02:00
committed by GitHub
parent 325aa1d392
commit 37b5d92110
18 changed files with 89 additions and 31 deletions
+1 -1
View File
@@ -61,7 +61,7 @@
<ImageThumbnail
circle
shadow
url={getPeopleThumbnailUrl(person.id)}
url={getPeopleThumbnailUrl(person)}
altText={person.name}
widthStyle="100%"
/>
+1 -1
View File
@@ -508,7 +508,7 @@
preload={searchName !== '' || index < 20}
bind:hidden={person.isHidden}
shadow
url={getPeopleThumbnailUrl(person.id)}
url={getPeopleThumbnailUrl(person)}
altText={person.name}
widthStyle="100%"
bind:eyeColor={eyeColorMap[person.id]}
@@ -91,7 +91,7 @@
let refreshAssetGrid = false;
let personName = '';
$: thumbnailData = getPeopleThumbnailUrl(data.person.id);
$: thumbnailData = getPeopleThumbnailUrl(data.person);
let name: string = data.person.name;
let suggestedPeople: PersonResponseDto[] = [];
@@ -121,7 +121,7 @@
return websocketEvents.on('on_person_thumbnail', (personId: string) => {
if (data.person.id === personId) {
thumbnailData = getPeopleThumbnailUrl(data.person.id) + `?now=${Date.now()}`;
thumbnailData = getPeopleThumbnailUrl(data.person, Date.now().toString());
}
});
});
@@ -206,10 +206,13 @@
if (viewMode !== ViewMode.SELECT_PERSON) {
return;
}
try {
await updatePerson({ id: data.person.id, personUpdateDto: { featureFaceAssetId: asset.id } });
notificationController.show({ message: $t('feature_photo_updated'), type: NotificationType.Info });
} catch (error) {
handleError(error, $t('errors.unable_to_set_feature_photo'));
}
await updatePerson({ id: data.person.id, personUpdateDto: { featureFaceAssetId: asset.id } });
notificationController.show({ message: $t('feature_photo_updated'), type: NotificationType.Info });
assetInteractionStore.clearMultiselect();
viewMode = ViewMode.VIEW_ASSETS;
@@ -525,7 +528,7 @@
<ImageThumbnail
circle
shadow
url={getPeopleThumbnailUrl(person.id)}
url={getPeopleThumbnailUrl(person)}
altText={person.name}
widthStyle="2rem"
heightStyle="2rem"