diff --git a/web/src/lib/components/faces-page/assign-face-side-panel.svelte b/web/src/lib/components/faces-page/assign-face-side-panel.svelte index fe6a454307f3c..5512fde09507b 100644 --- a/web/src/lib/components/faces-page/assign-face-side-panel.svelte +++ b/web/src/lib/components/faces-page/assign-face-side-panel.svelte @@ -15,6 +15,7 @@ import { t } from 'svelte-i18n'; import { handleError } from '$lib/utils/handle-error'; import { onMount } from 'svelte'; + import SettingSwitch from '$lib/components/shared-components/settings/setting-switch.svelte'; interface Props { editedFace: AssetFaceResponseDto; @@ -34,7 +35,10 @@ async function loadPeople() { const timeout = setTimeout(() => (isShowLoadingPeople = true), timeBeforeShowLoadingSpinner); try { - const { people } = await getAllPeople({ withHidden: true, closestAssetId: editedFace.id }); + const { people } = await getAllPeople({ + withHidden: true, + closestAssetId: sortFaces ? editedFace.id : undefined, + }); allPeople = people; } catch (error) { handleError(error, $t('errors.cant_get_faces')); @@ -52,6 +56,7 @@ let searchedPeople: PersonResponseDto[] = $state([]); let searchFaces = $state(false); let searchName = $state(''); + let sortFaces = $state(true); let showPeople = $derived(searchName ? searchedPeople : allPeople.filter((person) => !person.isHidden)); @@ -116,6 +121,9 @@ (searchFaces = false)} /> {/if} +
+ +

{$t('all_people')}

{#if isShowLoadingPeople}