Parental controls: approvals lift bedtime, bedtime follows the child's clock, urgent push + banner + reminders for requests, reward cap raised to 60
build-container / build (push) Successful in 4m3s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-29 08:29:47 -04:00
1 parent d0e4e82e0a
commit 0a33119807
11 files changed
+59 -19

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ const alerted = new Map(); // child + kind -> when a parent was last told, so a
function alertParents(kid, kind, text) {
const key = kid.id + ':' + kind + ':' + text; if (Date.now() - (alerted.get(key) || 0) < 30 * 60e3) return; alerted.set(key, Date.now()); if (alerted.size > 500) alerted.clear();
if (kind === 'blocked') log(kid.id, 'blocked', text);
for (const a of users.all()) if (!a.disabled && a.role === 'admin') inbox.add(a.id, { kind: 'kid', title: kid.name, body: text, url: kind === 'limit' ? '#/settings/family' : '#/settings', tag: 'kid:' + kid.id + ':' + kind });
for (const a of users.all()) if (!a.disabled && a.role === 'admin') { inbox.add(a.id, { kind: 'kid', title: kid.name, body: text, url: kind === 'limit' ? '#/settings/family' : '#/settings', tag: 'kid:' + kid.id + ':' + kind }); if (kind === 'limit') { try { require('./push').notifyUrgent(a.id, { title: kid.name, body: text, url: '#/settings/family', tag: 'kid:' + kid.id + ':limit' }).catch(() => {}); } catch {} } }
}
/** Once a week (Monday morning) every parent gets a short summary of each child's week in their Notifications. */