From 0e1ba97187fecfb0794b515f18e3f635a296ae6c Mon Sep 17 00:00:00 2001 From: Stephanie Gredell Date: Thu, 11 Dec 2025 14:36:08 -0800 Subject: [PATCH] fix checkboxes --- frontend/src/pages/SettingsProfilesAdminPage.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/SettingsProfilesAdminPage.tsx b/frontend/src/pages/SettingsProfilesAdminPage.tsx index c84c43d..03ff1ef 100644 --- a/frontend/src/pages/SettingsProfilesAdminPage.tsx +++ b/frontend/src/pages/SettingsProfilesAdminPage.tsx @@ -260,7 +260,9 @@ function SettingsProfileFormModal({ const [name, setName] = useState(profile?.name || ''); const [description, setDescription] = useState(profile?.description || ''); const [dailyTimeLimit, setDailyTimeLimit] = useState(profile?.dailyTimeLimit?.toString() || '30'); - const [enabledApps, setEnabledApps] = useState(profile?.enabledApps || []); + // Default enabled apps: speechsounds and tictactoe (videos is disabled by default) + const defaultEnabledApps = APPS.filter(app => !app.disabled && app.id !== 'videos').map(app => app.id); + const [enabledApps, setEnabledApps] = useState(profile?.enabledApps ?? defaultEnabledApps); const [loading, setLoading] = useState(false); const [error, setError] = useState(null); @@ -321,7 +323,7 @@ function SettingsProfileFormModal({ type="text" value={name} onChange={(e) => setName(e.target.value)} - placeholder="e.g., Emma's iPad" + placeholder="e.g., Kid 1's iPad" className="w-full px-4 py-2 border border-border rounded-lg bg-background text-foreground focus:outline-none focus:ring-2 focus:ring-primary" required /> @@ -381,12 +383,7 @@ function SettingsProfileFormModal({ ))} - {enabledApps.length === 0 && ( -

- All apps will be enabled (including videos) -

- )} - + {profile && (