mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-10 21:01:10 +03:00
fix overflowing model names in settings genai widget
This commit is contained in:
@@ -227,16 +227,18 @@ export function GenAIModelWidget(props: WidgetProps) {
|
|||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
disabled={disabled || readonly}
|
disabled={disabled || readonly}
|
||||||
className={cn(
|
className={cn(
|
||||||
"justify-between font-normal",
|
"min-w-0 justify-between font-normal",
|
||||||
!currentLabel && "text-muted-foreground",
|
!currentLabel && "text-muted-foreground",
|
||||||
fieldClassName,
|
fieldClassName,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
|
<span className="truncate">
|
||||||
{currentLabel ??
|
{currentLabel ??
|
||||||
t("configForm.genaiModel.placeholder", {
|
t("configForm.genaiModel.placeholder", {
|
||||||
ns: "views/settings",
|
ns: "views/settings",
|
||||||
defaultValue: "Select or enter a model…",
|
defaultValue: "Select or enter a model…",
|
||||||
})}
|
})}
|
||||||
|
</span>
|
||||||
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
<ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
|
||||||
</Button>
|
</Button>
|
||||||
</PopoverTrigger>
|
</PopoverTrigger>
|
||||||
@@ -263,12 +265,14 @@ export function GenAIModelWidget(props: WidgetProps) {
|
|||||||
value={trimmedSearch}
|
value={trimmedSearch}
|
||||||
onSelect={() => commit(trimmedSearch)}
|
onSelect={() => commit(trimmedSearch)}
|
||||||
>
|
>
|
||||||
<Plus className="mr-2 h-4 w-4" />
|
<Plus className="mr-2 h-4 w-4 shrink-0" />
|
||||||
|
<span className="truncate">
|
||||||
{t("configForm.genaiModel.useCustom", {
|
{t("configForm.genaiModel.useCustom", {
|
||||||
ns: "views/settings",
|
ns: "views/settings",
|
||||||
value: trimmedSearch,
|
value: trimmedSearch,
|
||||||
defaultValue: 'Use "{{value}}"',
|
defaultValue: 'Use "{{value}}"',
|
||||||
})}
|
})}
|
||||||
|
</span>
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
</CommandGroup>
|
</CommandGroup>
|
||||||
)}
|
)}
|
||||||
@@ -287,11 +291,11 @@ export function GenAIModelWidget(props: WidgetProps) {
|
|||||||
>
|
>
|
||||||
<Check
|
<Check
|
||||||
className={cn(
|
className={cn(
|
||||||
"mr-2 h-4 w-4",
|
"mr-2 h-4 w-4 shrink-0",
|
||||||
value === model ? "opacity-100" : "opacity-0",
|
value === model ? "opacity-100" : "opacity-0",
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{model}
|
<span className="truncate">{model}</span>
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
))}
|
))}
|
||||||
</CommandGroup>
|
</CommandGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user