fix(webui): 修复 Toast 提示信息过长导致 UI 溢出的问题 (#1595)

- 新增路径截断工具函数,支持 Windows/Linux 长路径处理

- 创建 toast 包装器,自动截断错误信息中的长路径

- 为 Toaster 组件添加 maxWidth 和 word-break 样式防止溢出

- 更新插件配置弹窗使用新的 toast 工具
This commit is contained in:
Qiao
2026-02-05 18:22:25 +08:00
committed by GitHub
parent 49b5496406
commit ecbac2b782
4 changed files with 204 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ import { Input } from '@heroui/input';
import { Select, SelectItem } from '@heroui/select';
import { Switch } from '@heroui/switch';
import { useEffect, useState, useRef, useCallback } from 'react';
import toast from 'react-hot-toast';
import toast from '@/utils/toast';
import { EventSourcePolyfill } from 'event-source-polyfill';
import PluginManager, { PluginConfigSchemaItem } from '@/controllers/plugin_manager';
import key from '@/const/key';