Polish: Standardize notifications in remaining components

This commit is contained in:
rcourtman
2025-12-23 12:16:02 +00:00
parent 6ebdc5f465
commit 4ef52cedb6
4 changed files with 7 additions and 7 deletions
@@ -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);
@@ -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;
}
@@ -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';
@@ -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';