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": "❌ No supported frontend build tool was found, cannot auto-build WebUI",
"startup.webui_cors_configured": "✅ CORS middleware configured",
"startup.webui_dashboard_source_missing": "❌ WebUI frontend source directory not found: {dashboard_root}",
"startup.webui_dashboard_package_hint": "💡 Install the prebuilt WebUI static asset package first, for example: {command}",
"startup.webui_disabled": "WebUI is disabled",
"startup.webui_index_missing": "❌ index.html not found: {index_path}",
"startup.webui_manual_build_hint": "💡 Automatic recovery could not restore the frontend assets. Install dependencies and build manually in the dashboard directory: {command}",
@@ -87,6 +88,7 @@
"startup.webui_robots_route_register_failed": "❌ Failed to register robots.txt route: {error}",
"startup.webui_robots_route_registered": "✅ robots.txt route registered",
"startup.webui_server_init_failed": "Failed to initialize WebUI server: {error}",
"startup.webui_static_assets_unavailable": "❌ No usable WebUI static assets were found (installed maibot-dashboard package or local dashboard/dist)",
"startup.webui_static_assets_try_auto_build": "⚠️ WebUI static assets are unavailable, attempting to auto-build the frontend...",
"startup.webui_static_dir_missing": "❌ WebUI static directory does not exist",
"startup.webui_static_dir_missing_with_path": "❌ WebUI static directory does not exist: {static_path}",