diff --git a/frontend-modern/src/components/Alerts/ActivationModal.tsx b/frontend-modern/src/components/Alerts/ActivationModal.tsx index 6a04a3ce4..fe979be59 100644 --- a/frontend-modern/src/components/Alerts/ActivationModal.tsx +++ b/frontend-modern/src/components/Alerts/ActivationModal.tsx @@ -4,7 +4,7 @@ import { useNavigate } from '@solidjs/router'; import type { JSX } from 'solid-js'; import type { Alert } from '@/types/api'; import type { AlertConfig, AlertThresholds, HysteresisThreshold } from '@/types/alerts'; -import { showError, showSuccess } from '@/utils/toast'; +import { notificationStore } from '@/stores/notifications'; import { formatAlertValue, formatAlertThreshold } from '@/utils/alertFormatters'; interface ActivationModalProps { @@ -164,13 +164,13 @@ export function ActivationModal(props: ActivationModalProps): JSX.Element { if (success) { await props.refreshActiveAlerts(); - showSuccess('Notifications activated! You\'ll now receive alerts when issues are detected.'); + notificationStore.success('Notifications activated! You\'ll now receive alerts when issues are detected.'); if (props.onActivated) { await props.onActivated(); } props.onClose(); } else { - showError('Unable to activate notifications. Please try again.'); + notificationStore.error('Unable to activate notifications. Please try again.'); } setIsSubmitting(false); diff --git a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx index 9c248387c..00ad59efb 100644 --- a/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx +++ b/frontend-modern/src/components/Alerts/InvestigateAlertButton.tsx @@ -2,7 +2,7 @@ import { Show, createSignal } from 'solid-js'; import { aiChatStore } from '@/stores/aiChat'; import type { Alert } from '@/types/api'; import { formatAlertValue } from '@/utils/alertFormatters'; -import { showWarning } from '@/utils/toast'; +import { notificationStore } from '@/stores/notifications'; interface InvestigateAlertButtonProps { alert: Alert; @@ -26,7 +26,7 @@ export function InvestigateAlertButton(props: InvestigateAlertButtonProps) { e.stopPropagation(); e.preventDefault(); if (isLocked()) { - showWarning('Pulse Pro required to investigate alerts with AI.'); + notificationStore.warning('Pulse Pro required to investigate alerts with AI.'); return; } diff --git a/frontend-modern/src/components/Settings/APITokenManager.tsx b/frontend-modern/src/components/Settings/APITokenManager.tsx index d09e2e1bd..2e460c9a0 100644 --- a/frontend-modern/src/components/Settings/APITokenManager.tsx +++ b/frontend-modern/src/components/Settings/APITokenManager.tsx @@ -1,6 +1,6 @@ import { Component, For, Show, createEffect, createMemo, createSignal, onCleanup, onMount } from 'solid-js'; import { SecurityAPI, type APITokenRecord } from '@/api/security'; -import { showError, showSuccess } from '@/utils/toast'; +import { notificationStore } from '@/stores/notifications'; import { formatRelativeTime } from '@/utils/format'; import { useWebSocket } from '@/App'; import type { DockerHost, Host } from '@/types/api'; diff --git a/frontend-modern/src/components/Settings/ProLicensePanel.tsx b/frontend-modern/src/components/Settings/ProLicensePanel.tsx index 495f4cf3c..db0e90bc1 100644 --- a/frontend-modern/src/components/Settings/ProLicensePanel.tsx +++ b/frontend-modern/src/components/Settings/ProLicensePanel.tsx @@ -1,7 +1,7 @@ import { Component, Show, createMemo, createSignal, onMount, For } from 'solid-js'; import SettingsPanel from '@/components/shared/SettingsPanel'; import { formField, formHelpText, labelClass, controlClass } from '@/components/shared/Form'; -import { showError, showSuccess } from '@/utils/toast'; +import { notificationStore } from '@/stores/notifications'; import { LicenseAPI, type LicenseStatus } from '@/api/license'; import RefreshCw from 'lucide-solid/icons/refresh-cw';