Added error handling notification (#536)

This commit is contained in:
Alex 2022-08-26 10:36:41 -07:00 committed by GitHub
parent 33b810de74
commit 4be9aa091b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 118 additions and 26 deletions

View file

@ -27,7 +27,7 @@ export class ImmichNotificationDto {
/**
* Timeout in miliseconds
*/
timeout = 3000;
timeout?: number;
}
function createNotificationList() {
const notificationList = writable<ImmichNotification[]>([]);
@ -36,7 +36,7 @@ function createNotificationList() {
const newNotification = new ImmichNotification();
newNotification.message = notificationInfo.message;
newNotification.type = notificationInfo.type;
newNotification.timeout = notificationInfo.timeout;
newNotification.timeout = notificationInfo.timeout || 3000;
notificationList.update((currentList) => [...currentList, newNotification]);
};