// settings/Notifications.jsx — per-channel notification controls. // Master allow toggle, then six channels with default-timing pickers, // delivery (immediate vs. scheduled summary), quiet hours, sound + haptic. function SettingsNotifications({ dark = false }) { const Toggle = ({ on = true }) => (
); return ( {/* Hero status */}
Allow notifications
System permission granted
{/* Channels */}
{[ { ic: 'today', c: 'var(--io-red)', t: 'Event alerts', s: '15 min before · per-event override', on: true }, { ic: 'moon', c: 'var(--io-indigo)', t: 'Wind-down reminder', s: '60 min before bedtime', on: true }, { ic: 'bed', c: 'var(--io-purple)', t: 'Bedtime nudge', s: 'At Smart Bedtime time', on: true }, { ic: 'heart', c: 'var(--io-orange)', t: 'High sleep debt', s: 'When debt exceeds 8h', on: true }, { ic: 'sparkles', c: 'var(--io-yellow)', t: 'Goal milestone', s: 'When you tick a milestone', on: false }, { ic: 'share', c: 'var(--io-blue)', t: 'Share link viewed', s: 'Per link · off by default', on: false }, { ic: 'refresh', c: 'var(--io-label-tertiary)', t: 'Sync failures', s: 'After 3 consecutive failures', on: true }, ].map((r, i) => (
{r.t}
{r.s}
))}
{/* Delivery */}
Style
Immediate
Scheduled summary
Bundle non-urgent notifications
Summary times
8:00 AM · 6:30 PM
{/* Quiet hours */}
Mute non-urgent
From
10:30 PM
To
6:15 AM
Event alerts override
Critical events still ring
{/* Sound + haptic */}
Default tone
Slow rise
Bedtime tone
Constellation
Haptics
{/* Lock screen preview */}
How a notification looks on the lock screen
ORDENTUS now
Wind down in 60 minutes
Bedtime tonight is 10:30 PM. First event 7:15 AM.
Per-event alerts can be overridden in the event editor. Channels can be disabled here without revoking system permission.
); } window.SettingsNotifications = SettingsNotifications;