Commit Graph

18 Commits

Author SHA1 Message Date
timeTable2 dev
51461ff5f2 fix: use JSON clone instead of structuredClone for Vue reactive proxies
structuredClone cannot clone Vue reactive Proxy objects (DataCloneError).
EventModel contains only plain data, so JSON round-trip is safe and
lossless. Verified: organize, toggle, undo, download all work correctly.
2026-07-13 20:13:19 +08:00
timeTable2 dev
b352c4e116 refactor: high-cohesion low-coupling cleanup across store and components
ical-io.js:
- Import pad2/parseISODate from date.js (remove local duplicates)
- Rename ICAL.Time helpers to icalTimeTo* for clarity

useCalendar.js:
- Delegate addEvent to createEvent() factory
- Delegate splitEvent to splitRecurringEvent() pure function
- Use cloneEvent() instead of JSON.parse(JSON.stringify())
- Add selectEvent() action (components no longer mutate state.selectedUid directly)

Components:
- EventList: use selectEvent action + toDate() from date.js
- HeaderBar: destructure loadFile at top level (was re-calling useCalendar in handler)
- EventDetail: import DOW from weekday.js (was inlining the array)
- OccurrenceGrid: use toDate() from date.js
2026-07-13 20:06:00 +08:00
timeTable2 dev
02cfdda900 refactor: extract date.js, event-factory.js, split.js; use shared date helpers in recur/organize
- date.js: single source of truth for ISO date formatting/arithmetic
  (toISODate, parseISODate, addDays, daysBetween, todayISO, nowCompactTimestamp)
- event-factory.js: createEvent/cloneEvent (structuredClone with JSON fallback)
- split.js: splitRecurringEvent pure function using intervalDays from recur.js
- recur.js: replaced local toISO() and inline Date math with date.js helpers
- organize.js: replaced inline date formatting and gap math with date.js helpers,
  extracted buildGrid() helper and byDate comparator
2026-07-13 20:01:10 +08:00
timeTable2 dev
e4f549f848 docs: add README 2026-07-13 18:53:39 +08:00
timeTable2 dev
3af6b856e3 fix: store VTIMEZONEs as raw jCal arrays for Vue reactivity safety
ICAL.Component instances break when wrapped by Vue's reactive proxy
(the .jCal getter returns undefined through the proxy, causing
serializeICS to crash with 'Cannot read properties of undefined').
Storing vtz.jCal (plain arrays) instead makes meta fully serializable
for both reactivity and JSON snapshot cloning.
2026-07-13 18:53:01 +08:00
timeTable2 dev
15b6f30896 feat: add EventDetail with edit form, occurrence grid, split 2026-07-13 18:43:28 +08:00
timeTable2 dev
8a1d547001 feat: add OccurrenceGrid component 2026-07-13 18:41:51 +08:00
timeTable2 dev
f52f5315e6 feat: add EventList and HeaderBar with organize/undo/download 2026-07-13 18:40:44 +08:00
timeTable2 dev
906679fc11 feat: add DropZone and App layout skeleton 2026-07-13 18:39:15 +08:00
timeTable2 dev
361cc38384 feat: add central store with snapshot undo/redo 2026-07-13 18:37:58 +08:00
timeTable2 dev
dc70a04b54 feat: port GCD dedup algorithm from ical_organizer.py 2026-07-13 18:36:29 +08:00
timeTable2 dev
e187337127 feat: add recurrence grid expansion 2026-07-13 18:32:46 +08:00
timeTable2 dev
7e708932b1 feat: implement serializeICS with round-trip support 2026-07-13 18:30:52 +08:00
timeTable2 dev
138b89e3bf feat: implement parseICS with ical.js 2026-07-13 18:26:14 +08:00
timeTable2 dev
76e08d67d8 feat: add weekday constants and helpers 2026-07-13 18:22:57 +08:00
timeTable2 dev
f64c0a2a10 feat: scaffold Vite + Vue3 project with npmmirror 2026-07-13 18:21:17 +08:00
timeTable2 dev
1affa0b021 docs: add implementation plan 2026-07-13 18:18:23 +08:00
timeTable2 dev
64dd8c5cd1 docs: add timeTable2 design spec 2026-07-13 17:31:43 +08:00