feat: toasts (#23298)

This commit is contained in:
Jason Rasmussen
2025-10-28 15:09:11 -04:00
committed by GitHub
parent 106effca2e
commit 52596255c8
80 changed files with 341 additions and 1069 deletions

View File

@@ -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'));
}