Roadmap #3: Calendar home screen #104
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The home screen at /days currently shows a flat chronological list of dates with footage. This is hard to scan at a glance — it gives no visual sense of which days have a lot of activity vs quiet days, or where today falls in the retention window. A calendar grid view would make it much easier to get a quick overview of NVR coverage and motion activity.
Plan of attack
Rewrote the
GET /daysroute to render a two-month calendar grid instead of a flat list. The view defaults to the current month and accepts?month=YYYY-MMfor navigation. ◀/▶ links shift one month at a time.Key files:
src/cang/db.py— newlist_motion_snapshots_for_rangequery returning motion-flagged snapshots for a date range, used to compute accurate per-day event counts via the existinggroup_into_eventsgroupersrc/cang/web/routes/clips.py— rewrotedays_list; added calendar helper functions (_parse_month,_build_calendar_month,_prev_month,_next_month)src/cang/web/templates/days.html— complete rewrite to a two-column (desktop) / one-column (mobile) CSS grid of month tables; each day cell shows motion event count and snapshot count on separate lines and links to/days/YYYY-MM-DDsrc/cang/web/templates/base.html— calendar CSS added