Add weekend open skip, expiry force-close, and Chinese trade labels.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 10:28:33 +08:00
parent 826362b556
commit b50c134f5b
19 changed files with 525 additions and 52 deletions
+15 -2
View File
@@ -1,5 +1,6 @@
import { useEffect, useState } from "react";
import { apiFetch } from "../api/client";
import { closeReasonZh } from "../labels";
type Summary = {
groups: number;
@@ -22,6 +23,10 @@ export default function StatsPage() {
.catch((e) => setErr(e instanceof Error ? e.message : String(e)));
}, []);
const reasonEntries = s
? Object.entries(s.close_reasons).sort((a, b) => b[1] - a[1])
: [];
return (
<div className="card">
<h2 style={{ marginTop: 0 }}></h2>
@@ -46,9 +51,17 @@ export default function StatsPage() {
{s.total_fees.toFixed(2)} / {s.total_slip.toFixed(2)}
</span>
</div>
<div className="kv">
<div className="kv" style={{ alignItems: "flex-start" }}>
<span></span>
<span className="mono">{JSON.stringify(s.close_reasons)}</span>
<span className="mono" style={{ textAlign: "right" }}>
{reasonEntries.length === 0
? "—"
: reasonEntries.map(([k, n]) => (
<div key={k}>
{closeReasonZh(k)} × {n}
</div>
))}
</span>
</div>
<h3></h3>
{s.equity_curve.map((x) => (