chore(web): toggle hide face in context menu (#5440)

This commit is contained in:
Alex 2023-12-02 09:23:11 -06:00 committed by GitHub
parent 8a2b36ad55
commit 36ba48b8ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,11 +155,11 @@
}
});
const hideFace = async () => {
const toggleHideFace = async () => {
try {
await api.personApi.updatePerson({
id: data.person.id,
personUpdateDto: { isHidden: true },
personUpdateDto: { isHidden: !data.person.isHidden },
});
notificationController.show({
@ -382,7 +382,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()} />
<MenuOption text={data.person.isHidden ? 'Unhide face' : 'Hide face'} on:click={() => toggleHideFace()} />
</AssetSelectContextMenu>
</svelte:fragment>
</ControlAppBar>