feat: 档案统计独立卡片、共用交易日历与四所统计页日历
内照明心统计表移至顶部卡片,右侧为日历/图表/交易记录;日历样式适配浅深主题,四所统计分析页同步展示按月盈亏日历。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -564,6 +564,8 @@ app = FastAPI(title="复盘系统中控", docs_url=None, redoc_url=None, lifespa
|
||||
STATIC_DIR = DIR / "static"
|
||||
_REPO_STATIC = _REPO_ROOT / "static"
|
||||
_AI_REVIEW_RENDER_JS = _REPO_STATIC / "ai_review_render.js"
|
||||
_TRADE_STATS_CALENDAR_CSS = _REPO_STATIC / "trade_stats_calendar.css"
|
||||
_TRADE_STATS_CALENDAR_JS = _REPO_STATIC / "trade_stats_calendar.js"
|
||||
_ACCOUNT_RISK_BADGE_CSS = _REPO_STATIC / "account_risk_badge.css"
|
||||
_ACCOUNT_RISK_BADGE_JS = _REPO_STATIC / "account_risk_badge.js"
|
||||
|
||||
@@ -601,6 +603,26 @@ def hub_ai_review_render_js():
|
||||
)
|
||||
|
||||
|
||||
@app.get("/assets/trade_stats_calendar.css")
|
||||
def hub_trade_stats_calendar_css():
|
||||
if not _TRADE_STATS_CALENDAR_CSS.is_file():
|
||||
raise HTTPException(status_code=404, detail="trade_stats_calendar.css not found")
|
||||
return FileResponse(
|
||||
str(_TRADE_STATS_CALENDAR_CSS),
|
||||
media_type="text/css; charset=utf-8",
|
||||
)
|
||||
|
||||
|
||||
@app.get("/assets/trade_stats_calendar.js")
|
||||
def hub_trade_stats_calendar_js():
|
||||
if not _TRADE_STATS_CALENDAR_JS.is_file():
|
||||
raise HTTPException(status_code=404, detail="trade_stats_calendar.js not found")
|
||||
return FileResponse(
|
||||
str(_TRADE_STATS_CALENDAR_JS),
|
||||
media_type="application/javascript; charset=utf-8",
|
||||
)
|
||||
|
||||
|
||||
if STATIC_DIR.is_dir():
|
||||
app.mount("/assets", StaticFiles(directory=str(STATIC_DIR)), name="assets")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user