diff --git a/resource/interface/client/notify.lua b/resource/interface/client/notify.lua index 55db59e..2cfb826 100644 --- a/resource/interface/client/notify.lua +++ b/resource/interface/client/notify.lua @@ -1,5 +1,5 @@ ---@alias NotificationPosition 'top' | 'top-right' | 'top-left' | 'bottom' | 'bottom-right' | 'bottom-left' | 'center-right' | 'center-left' ----@alias NotificationType 'inform' | 'error' | 'success' +---@alias NotificationType 'info' | 'warning' | 'success' | 'error' ---@class NotifyProps ---@field id? string @@ -32,7 +32,7 @@ end function lib.defaultNotify(data) -- Backwards compat for v3 data.type = data.status - if data.type == 'info' or data.type == 'warning' then data.type = 'inform' end + if data.type == 'inform' then data.type = 'info' end return lib.notify(data) end diff --git a/web/src/features/notifications/NotificationWrapper.tsx b/web/src/features/notifications/NotificationWrapper.tsx index b64ad86..c63cc57 100644 --- a/web/src/features/notifications/NotificationWrapper.tsx +++ b/web/src/features/notifications/NotificationWrapper.tsx @@ -118,9 +118,21 @@ const Notifications: React.FC = () => { break; } if (!data.icon) { - data.icon = data.type === 'error' ? 'xmark' : data.type === 'success' ? 'check' : 'info'; - } - + switch (data.type) { + case 'error': + data.icon = 'circle-xmark'; + break; + case 'success': + data.icon = 'circle-check'; + break; + case 'warning': + data.icon = 'circle-exclamation'; + break; + default: + data.icon = 'circle-info'; + break; + } + } toast.custom( (t) => ( { <> {!data.iconColor ? (