1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/backend/model/NotifocationManager.ts

30 lines
799 B
TypeScript
Raw Normal View History

2018-03-30 15:30:30 -04:00
import {NotificationDTO, NotificationType} from '../../common/entities/NotificationDTO';
2017-07-09 14:23:50 +02:00
export class NotificationManager {
public static notifications: NotificationDTO[] = [];
public static HasNotification: NotificationDTO[] =
[
{
type: NotificationType.info,
2018-03-30 15:30:30 -04:00
message: 'There are unhandled server notification. Login as Administrator to handle them.'
2017-07-09 14:23:50 +02:00
}
];
public static error(message: string, details?: any) {
NotificationManager.notifications.push({
type: NotificationType.error,
message: message,
details: details
});
}
public static warning(message: string, details?: any) {
NotificationManager.notifications.push({
type: NotificationType.warning,
message: message,
details: details
});
}
}