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:
parent
9cec6aaf46
commit
7fcc5a5417
1 changed files with 19 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue