mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
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:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user