Add email digest schedule controls to Alert Settings #5

Merged
matt merged 1 commit from flotilla-fc1-email-digests-let-users-choose-delivery--f63 into email-notifications 2026-09-23 20:37:16 +00:00

1 commit

Author SHA1 Message Date
Agent
f9878fdff1 feat(settings): merge email digest schedule controls onto email-notifications
All checks were successful
CI / lint-check-build (pull_request) Successful in 3m19s
Resolves PR #5 conflict resolution: rebased the digest-schedule work (from
flotilla-fc1, built against dev) onto the email-notifications branch.

- settings.ts: add emailHour/emailMinute/emailDayOfWeek/emailTimezone to
  SettingsValues + defaults (17:00, device timezone, dayOfWeek undefined)
- alerts/+page.svelte: keep the email-notifications card (gated on
  EMAIL_NOTIFICATION_SERVER, communities warning, error state, NIP-98
  register/enable flow); add HH:MM time input + weekly day-of-week picker;
  weekly select defaults dayOfWeek to Monday; publish schedule fields via
  AppData publishSettings
- mail/index.ts: register() accepts hour/minute/dayOfWeek/timezone and PUTs
  them to mailship; enable()/sync() pass stored schedule through

Dropped dev-based duplicates: src/app/mail.ts, VITE_MAILSHIP_URL (.env +
env.ts) — the email-notifications mail adapter and
VITE_EMAIL_NOTIFICATION_SERVER are canonical. PUT contract matches mailship
PR #28: {email, frequency, hour, minute, dayOfWeek, timezone}.
2026-09-23 14:09:39 -04:00