feat: 添加 WebUI 静态资源包提示和相关错误处理逻辑

This commit is contained in:
DrSmoothl
2026-04-05 12:05:30 +08:00
parent 56d1071c01
commit ead90cbdf3
7 changed files with 56 additions and 279 deletions

View File

@@ -80,6 +80,7 @@
"startup.webui_auto_build_tool_missing": "❌ 未找到可用的前端构建工具,无法自动构建 WebUI",
"startup.webui_cors_configured": "✅ CORS 中间件已配置",
"startup.webui_dashboard_source_missing": "❌ 未找到 WebUI 前端源码目录: {dashboard_root}",
"startup.webui_dashboard_package_hint": "💡 请安装预构建的 WebUI 静态资源包,例如: {command}",
"startup.webui_disabled": "WebUI 已禁用",
"startup.webui_index_missing": "❌ 未找到 index.html: {index_path}",
"startup.webui_manual_build_hint": "💡 自动恢复未能修复前端资源,请在 dashboard 目录安装依赖并手动构建: {command}",
@@ -87,6 +88,7 @@
"startup.webui_robots_route_register_failed": "❌ 注册 robots.txt 路由失败: {error}",
"startup.webui_robots_route_registered": "✅ robots.txt 路由已注册",
"startup.webui_server_init_failed": "初始化 WebUI 服务器失败: {error}",
"startup.webui_static_assets_unavailable": "❌ 未找到可用的 WebUI 静态资源(已安装的 maibot-dashboard 包或本地 dashboard/dist",
"startup.webui_static_assets_try_auto_build": "⚠️ WebUI 静态资源不可用,尝试自动构建前端...",
"startup.webui_static_dir_missing": "❌ WebUI 静态文件目录不存在",
"startup.webui_static_dir_missing_with_path": "❌ WebUI 静态文件目录不存在: {static_path}",