1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-01 08:31:59 +00:00

feat(web): hide face from detail page (#4098)

This commit is contained in:
martin 2023-09-15 17:58:14 +02:00 committed by GitHub
parent 9cec6aaf46
commit 7fcc5a5417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,24 @@
}
});
const hideFace = async () => {
try {
await api.personApi.updatePerson({
id: data.person.id,
personUpdateDto: { isHidden: true },
});
notificationController.show({
message: 'Changed visibility succesfully',
type: NotificationType.Info,
});
goto(AppRoute.EXPLORE, { replaceState: true });
} catch (error) {
handleError(error, 'Unable to hide person');
}
};
const handleSelectFeaturePhoto = async (asset: AssetResponseDto) => {
if (viewMode !== ViewMode.SELECT_FACE) {
return;
@ -246,6 +264,7 @@
<MenuOption text="Change feature photo" on:click={() => (viewMode = ViewMode.SELECT_FACE)} />
<MenuOption text="Set date of birth" on:click={() => (viewMode = ViewMode.BIRTH_DATE)} />
<MenuOption text="Merge face" on:click={() => (viewMode = ViewMode.MERGE_FACES)} />
<MenuOption text="Hide face" on:click={() => hideFace()} />
</AssetSelectContextMenu>
</svelte:fragment>
</ControlAppBar>