mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
Added limit on total of file upload on web
This commit is contained in:
parent
87f7b0849a
commit
a128833e68
5 changed files with 31 additions and 14 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue