Add /v2 static mount for new UX
This commit is contained in:
@@ -329,6 +329,12 @@ class WebServer:
|
|||||||
logger.info("Mounting React UI from %s at /ui", UI_DIST_DIR)
|
logger.info("Mounting React UI from %s at /ui", UI_DIST_DIR)
|
||||||
app.mount("/ui", StaticFiles(directory=str(UI_DIST_DIR), html=True), name="ui")
|
app.mount("/ui", StaticFiles(directory=str(UI_DIST_DIR), html=True), name="ui")
|
||||||
|
|
||||||
|
# Mount V2 React UI (if dist exists)
|
||||||
|
V2_DIST_DIR = Path(__file__).resolve().parent / "ui-v2-dist"
|
||||||
|
if V2_DIST_DIR.is_dir():
|
||||||
|
logger.info("Mounting V2 React UI from %s at /v2", V2_DIST_DIR)
|
||||||
|
app.mount("/v2", StaticFiles(directory=str(V2_DIST_DIR), html=True), name="ui-v2")
|
||||||
|
|
||||||
# ── HTML pages ──────────────────────────────────────────────
|
# ── HTML pages ──────────────────────────────────────────────
|
||||||
|
|
||||||
@app.get("/", response_class=HTMLResponse)
|
@app.get("/", response_class=HTMLResponse)
|
||||||
|
|||||||
Reference in New Issue
Block a user