mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server,web): add/remove album users (#2681)
* refactor(server,web): add/remove album users * fix(web): bug fixes for multiple users * fix: linting
This commit is contained in:
parent
284edd97d6
commit
eb1225a0a5
15 changed files with 521 additions and 329 deletions
|
|
@ -42,6 +42,7 @@
|
|||
import ShareInfoModal from './share-info-modal.svelte';
|
||||
import ThumbnailSelection from './thumbnail-selection.svelte';
|
||||
import UserSelectionModal from './user-selection-modal.svelte';
|
||||
import { handleError } from '../../utils/handle-error';
|
||||
|
||||
export let album: AlbumResponseDto;
|
||||
export let sharedLink: SharedLinkResponseDto | undefined = undefined;
|
||||
|
|
@ -195,19 +196,16 @@
|
|||
if (userId == 'me') {
|
||||
isShowShareInfoModal = false;
|
||||
goto(backUrl);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const { data } = await api.albumApi.getAlbumInfo({ id: album.id });
|
||||
|
||||
album = data;
|
||||
isShowShareInfoModal = false;
|
||||
isShowShareInfoModal = data.sharedUsers.length >= 1;
|
||||
} catch (e) {
|
||||
console.error('Error [sharedUserDeletedHandler] ', e);
|
||||
notificationController.show({
|
||||
type: NotificationType.Error,
|
||||
message: 'Error deleting share users, check console for more details'
|
||||
});
|
||||
handleError(e, 'Error deleting share users');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue