fix: 升级说明改为内嵌背景的独立页面
This commit is contained in:
@@ -679,10 +679,10 @@ _dist = Path(__file__).resolve().parents[2] / "web" / "dist"
|
||||
@app.get("/tool-upgrade", include_in_schema=False)
|
||||
@app.get("/tool-upgrade/", include_in_schema=False)
|
||||
def tool_upgrade_page() -> FileResponse:
|
||||
index = _dist / "index.html"
|
||||
if not index.is_file():
|
||||
page = _dist / "tool-upgrade" / "index.html"
|
||||
if not page.is_file():
|
||||
raise HTTPException(status_code=404, detail="页面不存在")
|
||||
return FileResponse(index, headers={"Cache-Control": "no-cache"})
|
||||
return FileResponse(page, headers={"Cache-Control": "no-cache"})
|
||||
|
||||
|
||||
if _dist.is_dir():
|
||||
|
||||
Reference in New Issue
Block a user