feat(profiles): add setting to toggle project switcher on main page

Add a show/hide toggle for the header project profile switcher under
the Homepage Display section in settings. Defaults to visible so
existing users keep the current behavior.
This commit is contained in:
Jason
2026-07-10 11:04:59 +08:00
parent 7479d10db7
commit 442799879d
8 changed files with 40 additions and 12 deletions
@@ -1,5 +1,7 @@
import { useTranslation } from "react-i18next";
import { FolderOpen } from "lucide-react";
import { Button } from "@/components/ui/button";
import { ToggleRow } from "@/components/ui/toggle-row";
import { cn } from "@/lib/utils";
import { ProviderIcon } from "@/components/ProviderIcon";
import type { SettingsFormState } from "@/hooks/useSettings";
@@ -91,6 +93,13 @@ export function AppVisibilitySettings({
);
})}
</div>
<ToggleRow
icon={<FolderOpen className="h-4 w-4 text-emerald-500" />}
title={t("settings.appVisibility.showProfileSwitcher")}
description={t("settings.appVisibility.showProfileSwitcherDescription")}
checked={settings.showProfileSwitcher ?? true}
onCheckedChange={(value) => onChange({ showProfileSwitcher: value })}
/>
</section>
);
}