fix(dashboard): add early check for missing index.html to prevent 404s

This commit is contained in:
LIghtJUNction
2026-03-15 18:01:55 +08:00
parent 342b378de1
commit c9910d4a66
+6
View File
@@ -111,6 +111,12 @@ class AstrBotDashboard:
else:
self.data_path = os.path.abspath(user_dist)
if self.enable_webui and not (Path(self.data_path) / "index.html").exists():
raise RuntimeError(
f"Dashboard static assets not found: index.html is missing in {self.data_path}. "
"Please run the WebUI build step."
)
def _init_app(self):
"""初始化 Quart 应用"""
global APP