fix: refine lunar countdown ui semantics and mobile add
ci / docker (push) Successful in 5m13s

This commit is contained in:
2026-09-06 16:53:19 +08:00
parent a06b80604a
commit 5ac771d0cd
6 changed files with 38 additions and 15 deletions
+5 -2
View File
@@ -351,12 +351,15 @@ class CountdownUpdate(BaseModel):
def countdown_dict(row: Countdown, today: date | None = None):
today = today or datetime.now(ZoneInfo("Asia/Shanghai")).date()
if row.calendar_mode == "lunar" and (row.ignore_year or row.repeat_rule != "none"):
# 农历按年重复:忽略年份或指定重复时,都按“每年农历”语义计算下一次
display_date = next_lunar_occurrence(
row.lunar_month, row.lunar_day, row.ignore_year, row.repeat_rule, today
row.lunar_month, row.lunar_day, True, "yearly", today
) or row.event_date
effective_repeat = "yearly"
else:
repeat_rule = "yearly" if row.ignore_year else row.repeat_rule
display_date = countdown_occurrence(row.event_date, repeat_rule, today)
effective_repeat = repeat_rule
days, day_text = countdown_status(display_date, today)
lunar_year = None
lunar_text = None
@@ -377,9 +380,9 @@ def countdown_dict(row: Countdown, today: date | None = None):
"lunar_month": row.lunar_month,
"lunar_day": row.lunar_day,
"ignore_year": row.ignore_year,
"repeat_rule": effective_repeat,
"lunar_text": lunar_text,
"kind": row.kind,
"repeat_rule": row.repeat_rule,
"icon": row.icon,
"pinned": row.pinned,
"archived_at": row.archived_at,
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -1,3 +1,3 @@
<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="theme-color" content="#f15a29"><link rel="manifest" href="/manifest.json"><title>dodo</title> <script type="module" crossorigin src="/assets/index-Ds2Y4RQ7.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DQ5ZvkC6.css">
<!doctype html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,viewport-fit=cover"><meta name="theme-color" content="#f15a29"><link rel="manifest" href="/manifest.json"><title>dodo</title> <script type="module" crossorigin src="/assets/index-DV6C4yNR.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CaNgnksF.css">
</head><body><div id="app"></div></body></html>