mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-03 18:41:14 +03:00
* add optional onClick to EmptyCard * show EmptyCard in face rec when face library is empty * add loading indicator * add description to camera management pane * Cleanup when use snapshot but can't load snapshot * Migrate files * fix birdseye color distortion when configured aspect ratio is unsupported * Skip processing end for object descriptions * don't crash if stats is null * fix genai roles in migration * frigate+ pane updates - allow users to select a plus model from the select even when one was not previously loaded - always show model summary card - add model filter popover - add restart button totast * fix frigate+ pane layout and buttons to match other settings panes * match button layout in go2rtc settings view * make audio maintainer respond to dynamic config updates * check correct zone name in publish state * fix nested translation extraction for Optional dict and list fields * mypy --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
import {
|
|
SettingsGroupCard,
|
|
SplitCardRow,
|
|
} from "@/components/card/SettingsGroupCard";
|
|
import type { FrigateConfig } from "@/types/frigateConfig";
|
|
import { useTranslation } from "react-i18next";
|
|
|
|
type FrigatePlusCurrentModelSummaryProps = {
|
|
plusModel: FrigateConfig["model"]["plus"];
|
|
};
|
|
|
|
export default function FrigatePlusCurrentModelSummary({
|
|
plusModel,
|
|
}: FrigatePlusCurrentModelSummaryProps) {
|
|
const { t } = useTranslation("views/settings");
|
|
|
|
return (
|
|
<SettingsGroupCard title={t("frigatePlus.cardTitles.currentModel")}>
|
|
{!plusModel && (
|
|
<p className="text-muted-foreground">
|
|
{t("frigatePlus.modelInfo.noModelLoaded")}
|
|
</p>
|
|
)}
|
|
{plusModel && (
|
|
<div className="space-y-6">
|
|
<SplitCardRow
|
|
label={t("frigatePlus.modelInfo.baseModel")}
|
|
content={
|
|
<p>
|
|
{plusModel.baseModel} (
|
|
{plusModel.isBaseModel
|
|
? t("frigatePlus.modelInfo.plusModelType.baseModel")
|
|
: t("frigatePlus.modelInfo.plusModelType.userModel")}
|
|
)
|
|
</p>
|
|
}
|
|
/>
|
|
<SplitCardRow
|
|
label={t("frigatePlus.modelInfo.trainDate")}
|
|
content={<p>{new Date(plusModel.trainDate).toLocaleString()}</p>}
|
|
/>
|
|
<SplitCardRow
|
|
label={t("frigatePlus.modelInfo.modelType")}
|
|
content={
|
|
<p>
|
|
{plusModel.name} ({plusModel.width + "x" + plusModel.height})
|
|
</p>
|
|
}
|
|
/>
|
|
<SplitCardRow
|
|
label={t("frigatePlus.modelInfo.supportedDetectors")}
|
|
content={<p>{plusModel.supportedDetectors.join(", ")}</p>}
|
|
/>
|
|
</div>
|
|
)}
|
|
</SettingsGroupCard>
|
|
);
|
|
}
|