mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: auth manager (#27638)
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
<script lang="ts">
|
||||
import UserAvatar from '$lib/components/shared-components/user-avatar.svelte';
|
||||
import { authManager } from '$lib/managers/auth-manager.svelte';
|
||||
import { getPartners, PartnerDirection, searchUsers, type UserResponseDto } from '@immich/sdk';
|
||||
import { Button, ListButton, LoadingSpinner, Modal, ModalBody, ModalFooter, Text } from '@immich/ui';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
user: UserResponseDto;
|
||||
onClose: (users?: UserResponseDto[]) => void;
|
||||
}
|
||||
|
||||
let { user, onClose }: Props = $props();
|
||||
let { onClose }: Props = $props();
|
||||
|
||||
let availableUsers: UserResponseDto[] = $state([]);
|
||||
let selectedUsers: UserResponseDto[] = $state([]);
|
||||
@@ -18,7 +18,7 @@
|
||||
let users = await searchUsers();
|
||||
|
||||
// remove current user
|
||||
users = users.filter((_user) => _user.id !== user.id);
|
||||
users = users.filter(({ id }) => id !== authManager.user.id);
|
||||
|
||||
// exclude partners from the list of users available for selection
|
||||
const partners = await getPartners({ direction: PartnerDirection.SharedBy });
|
||||
|
||||
Reference in New Issue
Block a user