Improve options review tabs and multi-timeframe uploads.

Add source-type tabs, open an inline journal form from list rows, and match contract-style 5m/15m/1h/4h screenshot slots.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-17 09:45:44 +08:00
parent 10128d18bc
commit edcc04e88c
5 changed files with 395 additions and 251 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
"""期权复盘截图:独立命名空间,与合约 journal 混用."""
"""期权复盘截图:独立命名空间,与合约同款四周期 5m/15m/1h/4h."""
from __future__ import annotations
import json
@@ -6,11 +6,11 @@ import os
import re
from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence
OPTIONS_REVIEW_UPLOAD_TFS: tuple[str, ...] = ("chart", "entry", "exit", "other")
OPTIONS_REVIEW_UPLOAD_TFS: tuple[str, ...] = ("5m", "15m", "1h", "4h")
OPTIONS_REVIEW_ALLOWED_EXT = frozenset({".png", ".jpg", ".jpeg", ".webp", ".gif", ".bmp"})
_DRAFT_ID_RE = re.compile(r"^[a-f0-9]{32}$")
_SLOT_FILE_RE = re.compile(
r"^options_journal_([a-f0-9]{32})_(chart|entry|exit|other)\.(png|jpg|jpeg|webp|gif|bmp)$",
r"^options_journal_([a-f0-9]{32})_(5m|15m|1h|4h)\.(png|jpg|jpeg|webp|gif|bmp)$",
re.I,
)