add profiles enable toggle and improve empty state

This commit is contained in:
Josh Hawkins
2026-03-11 11:05:18 -05:00
parent 096a13bce9
commit a0849b104c
4 changed files with 96 additions and 53 deletions
+4 -1
View File
@@ -659,6 +659,7 @@ export default function Settings() {
Record<string, string | null>
>({});
const [newProfiles, setNewProfiles] = useState<string[]>([]);
const [profilesUIEnabled, setProfilesUIEnabled] = useState(false);
const allProfileNames = useMemo(() => {
if (!config) return [];
@@ -1127,7 +1128,7 @@ export default function Settings() {
const showProfileDropdown =
PROFILE_DROPDOWN_PAGES.has(pageToggle) &&
!!selectedCamera &&
allProfileNames.length > 0;
(allProfileNames.length > 0 || profilesUIEnabled);
const headerHasProfileData = useCallback(
(profileName: string): boolean => {
@@ -1527,6 +1528,8 @@ export default function Settings() {
pendingDataBySection={pendingDataBySection}
onPendingDataChange={handlePendingDataChange}
profileState={profileState}
profilesUIEnabled={profilesUIEnabled}
setProfilesUIEnabled={setProfilesUIEnabled}
/>
);
})()}