mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 09:13:14 +03:00
feat: toasts (#23298)
This commit is contained in:
@@ -16,12 +16,11 @@
|
||||
import { handleError } from '$lib/utils/handle-error';
|
||||
import { toTimelineAsset } from '$lib/utils/timeline-util';
|
||||
import { addSharedLinkAssets, getAssetInfo, type SharedLinkResponseDto } from '@immich/sdk';
|
||||
import { IconButton } from '@immich/ui';
|
||||
import { IconButton, toastManager } from '@immich/ui';
|
||||
import { mdiArrowLeft, mdiDownload, mdiFileImagePlusOutline, mdiSelectAll } from '@mdi/js';
|
||||
import { t } from 'svelte-i18n';
|
||||
import ControlAppBar from '../shared-components/control-app-bar.svelte';
|
||||
import GalleryViewer from '../shared-components/gallery-viewer/gallery-viewer.svelte';
|
||||
import { NotificationType, notificationController } from '../shared-components/notification/notification';
|
||||
|
||||
interface Props {
|
||||
sharedLink: SharedLinkResponseDto;
|
||||
@@ -62,10 +61,7 @@
|
||||
|
||||
const added = data.filter((item) => item.success).length;
|
||||
|
||||
notificationController.show({
|
||||
message: $t('assets_added_count', { values: { count: added } }),
|
||||
type: NotificationType.Info,
|
||||
});
|
||||
toastManager.success($t('assets_added_count', { values: { count: added } }));
|
||||
} catch (error) {
|
||||
handleError(error, $t('errors.unable_to_add_assets_to_shared_link'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user