mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-18 14:18:21 +03:00
fix buttons
This commit is contained in:
parent
13cdab5071
commit
2c2ae970cd
@ -1240,7 +1240,8 @@
|
|||||||
"keyRequired": "Detector name is required.",
|
"keyRequired": "Detector name is required.",
|
||||||
"keyDuplicate": "Detector name already exists.",
|
"keyDuplicate": "Detector name already exists.",
|
||||||
"noSchema": "No detector schemas are available.",
|
"noSchema": "No detector schemas are available.",
|
||||||
"none": "No detector instances configured."
|
"none": "No detector instances configured.",
|
||||||
|
"add": "Add detector"
|
||||||
},
|
},
|
||||||
"record": {
|
"record": {
|
||||||
"title": "Recording Settings"
|
"title": "Recording Settings"
|
||||||
|
|||||||
@ -25,12 +25,7 @@ import { useSectionSchema } from "@/hooks/use-config-schema";
|
|||||||
import type { FrigateConfig } from "@/types/frigateConfig";
|
import type { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import { Badge } from "@/components/ui/badge";
|
import { Badge } from "@/components/ui/badge";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import { LuChevronDown, LuChevronRight } from "react-icons/lu";
|
||||||
LuRotateCcw,
|
|
||||||
LuSave,
|
|
||||||
LuChevronDown,
|
|
||||||
LuChevronRight,
|
|
||||||
} from "react-icons/lu";
|
|
||||||
import Heading from "@/components/ui/heading";
|
import Heading from "@/components/ui/heading";
|
||||||
import get from "lodash/get";
|
import get from "lodash/get";
|
||||||
import unset from "lodash/unset";
|
import unset from "lodash/unset";
|
||||||
@ -874,7 +869,6 @@ export function ConfigSection({
|
|||||||
disabled={isSaving || disabled}
|
disabled={isSaving || disabled}
|
||||||
className="flex flex-1 gap-2"
|
className="flex flex-1 gap-2"
|
||||||
>
|
>
|
||||||
<LuRotateCcw className="h-4 w-4" />
|
|
||||||
{level === "global"
|
{level === "global"
|
||||||
? t("button.resetToDefault", {
|
? t("button.resetToDefault", {
|
||||||
ns: "common",
|
ns: "common",
|
||||||
@ -911,10 +905,7 @@ export function ConfigSection({
|
|||||||
})}
|
})}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>{t("button.save", { ns: "common", defaultValue: "Save" })}</>
|
||||||
<LuSave className="h-4 w-4" />
|
|
||||||
{t("button.save", { ns: "common", defaultValue: "Save" })}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -628,13 +628,6 @@ export function DetectorHardwareField(props: FieldProps) {
|
|||||||
|
|
||||||
const detectorEntries = Object.entries(detectors);
|
const detectorEntries = Object.entries(detectors);
|
||||||
const isDisabled = Boolean(disabled || readonly);
|
const isDisabled = Boolean(disabled || readonly);
|
||||||
const addLabel = `${t("button.add", {
|
|
||||||
ns: "common",
|
|
||||||
defaultValue: "Add",
|
|
||||||
})} ${t("detectors.label", {
|
|
||||||
ns: configNamespace,
|
|
||||||
defaultValue: "Detector hardware",
|
|
||||||
})}`;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
@ -806,10 +799,13 @@ export function DetectorHardwareField(props: FieldProps) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className="flex justify-start">
|
<div className="flex justify-start pt-5">
|
||||||
<div className="w-full max-w-md rounded-lg border bg-card p-4">
|
<div className="w-full max-w-lg rounded-lg border bg-card p-4">
|
||||||
<div className="text-sm font-medium text-muted-foreground">
|
<div className="text-sm font-medium text-muted-foreground">
|
||||||
{addLabel}
|
{t("configForm.detectors.add", {
|
||||||
|
ns: "views/settings",
|
||||||
|
defaultValue: "Add detector",
|
||||||
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-3 flex flex-col gap-3 md:flex-row md:items-end">
|
<div className="mt-3 flex flex-col gap-3 md:flex-row md:items-end">
|
||||||
<div className="flex-1 space-y-2">
|
<div className="flex-1 space-y-2">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user