mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-06-21 03:41:55 +03:00
add optional action slot to current Frigate+ model summary
This commit is contained in:
parent
f9600cafe3
commit
529645415f
@ -1,3 +1,4 @@
|
||||
import { ReactNode } from "react";
|
||||
import {
|
||||
SettingsGroupCard,
|
||||
SplitCardRow,
|
||||
@ -7,15 +8,26 @@ import { useTranslation } from "react-i18next";
|
||||
|
||||
type FrigatePlusCurrentModelSummaryProps = {
|
||||
plusModel: FrigateConfig["model"]["plus"];
|
||||
action?: ReactNode;
|
||||
};
|
||||
|
||||
export default function FrigatePlusCurrentModelSummary({
|
||||
plusModel,
|
||||
action,
|
||||
}: FrigatePlusCurrentModelSummaryProps) {
|
||||
const { t } = useTranslation("views/settings");
|
||||
|
||||
const title = action ? (
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<span>{t("frigatePlus.cardTitles.currentModel")}</span>
|
||||
{action}
|
||||
</div>
|
||||
) : (
|
||||
t("frigatePlus.cardTitles.currentModel")
|
||||
);
|
||||
|
||||
return (
|
||||
<SettingsGroupCard title={t("frigatePlus.cardTitles.currentModel")}>
|
||||
<SettingsGroupCard title={title}>
|
||||
{!plusModel && (
|
||||
<p className="text-muted-foreground">
|
||||
{t("frigatePlus.modelInfo.noModelLoaded")}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user