mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-05 03:21:16 +03:00
Use select
This commit is contained in:
parent
51ca0f7ffd
commit
b3fd12ed70
@ -4,7 +4,13 @@ import { isDesktop } from "react-device-detect";
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
import PlatformAwareDialog from "../overlay/dialog/PlatformAwareDialog";
|
import PlatformAwareDialog from "../overlay/dialog/PlatformAwareDialog";
|
||||||
import { FaCog } from "react-icons/fa";
|
import { FaCog } from "react-icons/fa";
|
||||||
import { RadioGroup, RadioGroupItem } from "@/components/ui/radio-group";
|
import {
|
||||||
|
Select,
|
||||||
|
SelectContent,
|
||||||
|
SelectGroup,
|
||||||
|
SelectItem,
|
||||||
|
SelectTrigger,
|
||||||
|
} from "@/components/ui/select";
|
||||||
import { Switch } from "@/components/ui/switch";
|
import { Switch } from "@/components/ui/switch";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { DropdownMenuSeparator } from "@/components/ui/dropdown-menu";
|
import { DropdownMenuSeparator } from "@/components/ui/dropdown-menu";
|
||||||
@ -47,32 +53,26 @@ export default function ChatSettings({
|
|||||||
{t("settings.show_stats.desc")}
|
{t("settings.show_stats.desc")}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<RadioGroup
|
<Select
|
||||||
value={showStats}
|
value={showStats}
|
||||||
onValueChange={(v) => setShowStats(v as ShowStatsMode)}
|
onValueChange={(v) => setShowStats(v as ShowStatsMode)}
|
||||||
>
|
>
|
||||||
<div className="flex items-center gap-2">
|
<SelectTrigger className="w-full">
|
||||||
<RadioGroupItem
|
{showStats === "always"
|
||||||
id="show-stats-while-generating"
|
? t("settings.show_stats.always")
|
||||||
value="while_generating"
|
: t("settings.show_stats.while_generating")}
|
||||||
/>
|
</SelectTrigger>
|
||||||
<Label
|
<SelectContent>
|
||||||
htmlFor="show-stats-while-generating"
|
<SelectGroup>
|
||||||
className="cursor-pointer text-sm"
|
<SelectItem className="cursor-pointer" value="while_generating">
|
||||||
>
|
{t("settings.show_stats.while_generating")}
|
||||||
{t("settings.show_stats.while_generating")}
|
</SelectItem>
|
||||||
</Label>
|
<SelectItem className="cursor-pointer" value="always">
|
||||||
</div>
|
{t("settings.show_stats.always")}
|
||||||
<div className="flex items-center gap-2">
|
</SelectItem>
|
||||||
<RadioGroupItem id="show-stats-always" value="always" />
|
</SelectGroup>
|
||||||
<Label
|
</SelectContent>
|
||||||
htmlFor="show-stats-always"
|
</Select>
|
||||||
className="cursor-pointer text-sm"
|
|
||||||
>
|
|
||||||
{t("settings.show_stats.always")}
|
|
||||||
</Label>
|
|
||||||
</div>
|
|
||||||
</RadioGroup>
|
|
||||||
</div>
|
</div>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<div className="flex items-center justify-between gap-3">
|
<div className="flex items-center justify-between gap-3">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user