mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
* fix(web): show warning on duplicate uploads #2557 * Prettier fix * color --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
57a7103d75
commit
66b2ad7939
5 changed files with 33 additions and 1 deletions
|
|
@ -15,6 +15,7 @@
|
|||
|
||||
let infoPrimaryColor = '#4250AF';
|
||||
let errorPrimaryColor = '#E64132';
|
||||
let warningPrimaryColor = '#D08613';
|
||||
|
||||
$: icon = notificationInfo.type === NotificationType.Error ? CloseCircleOutline : InformationOutline;
|
||||
|
||||
|
|
@ -26,6 +27,10 @@
|
|||
if (notificationInfo.type === NotificationType.Error) {
|
||||
return '#FBE8E6';
|
||||
}
|
||||
|
||||
if (notificationInfo.type === NotificationType.Warning) {
|
||||
return '#FFF6DC';
|
||||
}
|
||||
};
|
||||
|
||||
$: borderStyle = () => {
|
||||
|
|
@ -36,6 +41,10 @@
|
|||
if (notificationInfo.type === NotificationType.Error) {
|
||||
return '1px solid #F0E8E7';
|
||||
}
|
||||
|
||||
if (notificationInfo.type === NotificationType.Warning) {
|
||||
return '1px solid #FFE6A5';
|
||||
}
|
||||
};
|
||||
|
||||
$: primaryColor = () => {
|
||||
|
|
@ -46,6 +55,10 @@
|
|||
if (notificationInfo.type === NotificationType.Error) {
|
||||
return errorPrimaryColor;
|
||||
}
|
||||
|
||||
if (notificationInfo.type === NotificationType.Warning) {
|
||||
return warningPrimaryColor;
|
||||
}
|
||||
};
|
||||
|
||||
let removeNotificationTimeout: NodeJS.Timeout | undefined = undefined;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@ import { writable } from 'svelte/store';
|
|||
export enum NotificationType {
|
||||
Info = 'Info',
|
||||
Error = 'Error',
|
||||
Warning = 'Warning',
|
||||
}
|
||||
|
||||
export class ImmichNotification {
|
||||
id = new Date().getTime();
|
||||
id = new Date().getTime() + Math.random();
|
||||
type!: NotificationType;
|
||||
message!: string;
|
||||
action!: NotificationAction;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue