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

@@ -1,5 +1,5 @@
import { isHttpError } from '@immich/sdk';
import { notificationController, NotificationType } from '../components/shared-components/notification/notification';
import { toastManager } from '@immich/ui';
export function getServerErrorMessage(error: unknown) {
if (!isHttpError(error)) {
@@ -34,7 +34,7 @@ export function handleError(error: unknown, message: string) {
const errorMessage = serverMessage || message;
notificationController.show({ message: errorMessage, type: NotificationType.Error });
toastManager.danger(errorMessage);
return errorMessage;
} catch (error) {