Added limit on total of file upload on web

This commit is contained in:
Alex 2022-08-26 09:36:54 -07:00
parent 87f7b0849a
commit a128833e68
No known key found for this signature in database
GPG key ID: 53CD082B3A5E1082
5 changed files with 31 additions and 14 deletions

View file

@ -12,25 +12,25 @@ export class ImmichNotification {
}
function createNotificationList() {
const { set, update, subscribe } = writable<ImmichNotification[]>([]);
const notificationList = writable<ImmichNotification[]>([]);
const show = ({ message = '', type = NotificationType.Info }) => {
const notification = new ImmichNotification();
notification.message = message;
notification.type = type;
update((currentList) => [...currentList, notification]);
notificationList.update((currentList) => [...currentList, notification]);
};
const removeNotificationById = (id: number) => {
update((currentList) => currentList.filter((n) => n.id != id));
notificationList.update((currentList) => currentList.filter((n) => n.id != id));
};
return {
show,
removeNotificationById,
subscribe
notificationList
};
}
export const notificationList = createNotificationList();
export const notificationController = createNotificationList();