further UI tweaks

This commit is contained in:
leccelecce 2025-03-23 23:32:37 +00:00 committed by james
parent 53d03934cf
commit 2c15ce27f5
2 changed files with 18 additions and 4 deletions

View File

@ -548,7 +548,7 @@
"loading": "Loading model information...", "loading": "Loading model information...",
"error": "Failed to load model information", "error": "Failed to load model information",
"availableModels": "Available Models", "availableModels": "Available Models",
"modelSelect": "Your available models on Frigate+ can be selected here. Note that only models compatible with your current detector configuration are shown." "modelSelect": "Your available models on Frigate+ can be selected here. Note that only models compatible with your current detector configuration can be selected."
}, },
"toast": { "toast": {
"success": "Frigate+ settings have been saved. Restart Frigate to apply changes.", "success": "Frigate+ settings have been saved. Restart Frigate to apply changes.",

View File

@ -25,7 +25,10 @@ import {
type FrigatePlusModel = { type FrigatePlusModel = {
id: string; id: string;
type: string;
supportedDetectors: string[];
trainDate: string; trainDate: string;
baseModel: string;
}; };
type FrigatePlusSettings = { type FrigatePlusSettings = {
@ -305,7 +308,10 @@ export default function FrigatePlusSettingsView({
} }
> >
<SelectTrigger> <SelectTrigger>
{frigatePlusSettings.model.id} {new Date(
config.model.plus.trainDate,
).toLocaleString()}{" "}
({config.model.plus.baseModel})
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectGroup> <SelectGroup>
@ -314,9 +320,17 @@ export default function FrigatePlusSettingsView({
key={model.id} key={model.id}
className="cursor-pointer" className="cursor-pointer"
value={model.id} value={model.id}
disabled={
model.type != config.model.model_type ||
!model.supportedDetectors.includes(
Object.values(config.detectors)[0].type,
)
}
> >
{new Date(model.trainDate).toLocaleString()} {new Date(model.trainDate).toLocaleString()}{" "}
<div className="text-muted-foreground"> ({model.baseModel}) (
{model.supportedDetectors.join(", ")})
<div className="text-xs text-muted-foreground">
{model.id} {model.id}
</div> </div>
</SelectItem> </SelectItem>