mirror of
https://github.com/immich-app/immich.git
synced 2025-03-01 15:11:21 +01: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) => {
|
const handleSelectFeaturePhoto = async (asset: AssetResponseDto) => {
|
||||||
if (viewMode !== ViewMode.SELECT_FACE) {
|
if (viewMode !== ViewMode.SELECT_FACE) {
|
||||||
return;
|
return;
|
||||||
|
@ -246,6 +264,7 @@
|
||||||
<MenuOption text="Change feature photo" on:click={() => (viewMode = ViewMode.SELECT_FACE)} />
|
<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="Set date of birth" on:click={() => (viewMode = ViewMode.BIRTH_DATE)} />
|
||||||
<MenuOption text="Merge face" on:click={() => (viewMode = ViewMode.MERGE_FACES)} />
|
<MenuOption text="Merge face" on:click={() => (viewMode = ViewMode.MERGE_FACES)} />
|
||||||
|
<MenuOption text="Hide face" on:click={() => hideFace()} />
|
||||||
</AssetSelectContextMenu>
|
</AssetSelectContextMenu>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
</ControlAppBar>
|
</ControlAppBar>
|
||||||
|
|
Loading…
Add table
Reference in a new issue