import React from 'react'; import { Bell, Check, Loader2, Plus, RefreshCw, X } from 'lucide-react'; import { NotificationChannelList } from '../app/features/notifications/components/NotificationChannelList'; import { NotificationChannelModal } from '../app/features/notifications/components/NotificationChannelModal'; import { NotificationSmtpSettings } from '../app/features/notifications/components/NotificationSmtpSettings'; import { useNotifications } from '../app/features/notifications/hooks'; // NotificationsProps 描述通知页面接收的权限上下文。 interface NotificationsProps { // isAdmin 表示当前用户是否可以查看和保存系统 SMTP 配置。 isAdmin?: boolean; } // Notifications 渲染通知渠道列表、SMTP 配置和渠道编辑边界。 const Notifications: React.FC = ({ isAdmin = false }) => { // notificationState 统一提供通知页面的数据、表单和异步动作。 const notificationState = useNotifications(isAdmin); return (

通知设置

配置通知渠道,账号异常时主动推送告警

配置通知渠道并在「账号管理 → 编辑」里绑定后,以下事件会主动推送到该账号绑定的渠道:
  • • 账号 session 失效:系统正在尝试自动恢复(警告)
  • • 自动恢复失败:账号已停止,需人工处理(严重)
  • • 触发风控验证:可能需要扫码完成验证(警告)
{notificationState.loading ?
: } {isAdmin && } {notificationState.toast &&
{notificationState.toast.type === 'success' ? : }{notificationState.toast.text}
}
); }; export default Notifications;