Skip to content

feat(calendar): festival jump, countdown shortcut, year/month picker + bug fix#7

Merged
DeaglePC merged 6 commits into
mainfrom
feat/calendar-jump-countdown
Jun 10, 2026
Merged

feat(calendar): festival jump, countdown shortcut, year/month picker + bug fix#7
DeaglePC merged 6 commits into
mainfrom
feat/calendar-jump-countdown

Conversation

@DeaglePC

@DeaglePC DeaglePC commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

三项日历详情弹窗增强 + 一个 bug 修复:

  • 节日跳转:右侧"本月节日 / 近期节日 / 国外节日"三个列表的每一行改为可点击按钮,点击直接跳转日历到对应日期(年月自动切换、日期高亮)
  • 倒计时快捷添加:当天详情卡片底部新增"添加倒计时"按钮,一键在桌面创建以选中日期为目标的倒计时小组件,事件名自动取当天第一个节日名称
  • 年月快速筛选:日历标题(如"2026年6月")改为下拉触发器,点击弹出选择面板,支持按月网格直接跳转,点击年份标题切换到 12 年网格(可翻页);Escape 和外部点击关闭面板
  • Bug 修复:修复"本月节日"列表点击节日后消失的问题——原因是列表按"≥ 选中日期"过滤,点击后选中日期前移导致之前条目被裁剪;修复后列表始终显示整月节日,天数标签也改为相对真实今天计算(支持"X天前")

Changes

  • frontend/src/components/CalendarDetailModal.tsx — 主要改动
  • frontend/src/utils/calendar.ts — 导出 MIN_CALENDAR_YEAR / MAX_CALENDAR_YEAR 供 UI 限制年份范围
  • frontend/src/changelog.json — 新增 1.0.3 双语更新日志条目
  • .claude/launch.json — 添加本地开发服务器配置
  • .claude/skills/changelog/SKILL.md — 新增 /changelog 技能,发版前自动从 git 历史起草双语更新日志

Test plan

  • 打开日历详情弹窗,点击右侧任意节日条目,确认日历跳转到对应日期,列表不消失
  • 选中一个有节日的日期,点"添加倒计时",确认桌面新增对应倒计时小组件
  • 点击日历标题,确认月份网格弹出;点年份切换年份网格,点某年回到月份,点某月日历跳转
  • 快速筛选面板:Escape 关闭、点面板外关闭均正常
  • 点击历史上的节日(已过去),确认"X天前"标签正确

DeaglePC and others added 6 commits June 10, 2026 22:53
…rtcut

- Festival entries in the calendar detail sidebar are now clickable and
  navigate the calendar to the corresponding date
- New "Add countdown" button in the selected-day card creates a desktop
  countdown widget targeting the selected date, named after the day's
  festival when one exists

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The month title in the header is now a dropdown trigger. The panel offers
a 12-month grid plus a paged 12-year grid (toggled by clicking the year),
clamped to the 1900-2050 range covered by the lunar data. Picking a month
jumps the view and keeps the selected day-of-month clamped, matching the
existing prev/next month behavior. Escape and outside clicks close the
panel before closing the modal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ival

Clicking a festival in the "This Month" sidebar moved the selected date
forward, and the list — filtered to festivals on or after the selection —
dropped every earlier entry. The clicked entry was also mislabeled "Today"
because days-away was computed relative to the selection.

The month list now always shows every festival of the viewed month, and
all days-away labels (month + upcoming sections) are computed against the
real today, with new "yesterday" / "N days ago" wording for past dates.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Defines the two local dev servers (Vite frontend on 5173 and Go backend
on 8080) so Claude Code's preview_start can launch them directly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeaglePC
DeaglePC merged commit 1d19589 into main Jun 10, 2026
2 checks passed
@DeaglePC
DeaglePC deleted the feat/calendar-jump-countdown branch June 11, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant