dippoo's picture
Sync all local changes: video routes, pod management, wavespeed, UI updates
e808ae1
raw
history blame
609 Bytes
"""Web UI route — serves the single-page dashboard."""
from __future__ import annotations
from pathlib import Path
from fastapi import APIRouter
from fastapi.responses import HTMLResponse, Response
router = APIRouter(tags=["ui"])
UI_HTML_PATH = Path(__file__).parent / "ui.html"
@router.get("/", response_class=HTMLResponse)
async def dashboard():
"""Serve the main dashboard UI."""
content = UI_HTML_PATH.read_text(encoding="utf-8")
return Response(
content=content,
media_type="text/html",
headers={"Cache-Control": "no-cache, no-store, must-revalidate"},
)