mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-24 04:39:02 +03:00
clean up now obsolete namespaces
This commit is contained in:
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const AudioSection = createConfigSection({
|
||||
sectionPath: "audio",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const AudioTranscriptionSection = createConfigSection({
|
||||
sectionPath: "audio_transcription",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["enabled", "language", "device", "model_size", "live_enabled"],
|
||||
hiddenFields: ["enabled_in_config"],
|
||||
|
||||
@@ -81,8 +81,6 @@ export interface BaseSectionProps {
|
||||
export interface CreateSectionOptions {
|
||||
/** The config path for this section (e.g., "detect", "record") */
|
||||
sectionPath: string;
|
||||
/** i18n namespace for this section (e.g., "config/detect") */
|
||||
i18nNamespace: string;
|
||||
/** Default section configuration */
|
||||
defaultConfig: SectionConfig;
|
||||
}
|
||||
@@ -92,7 +90,6 @@ export interface CreateSectionOptions {
|
||||
*/
|
||||
export function createConfigSection({
|
||||
sectionPath,
|
||||
i18nNamespace,
|
||||
defaultConfig,
|
||||
}: CreateSectionOptions) {
|
||||
const cameraUpdateTopicMap: Record<string, string> = {
|
||||
@@ -131,7 +128,7 @@ export function createConfigSection({
|
||||
showTitle,
|
||||
}: BaseSectionProps) {
|
||||
const { t, i18n } = useTranslation([
|
||||
i18nNamespace,
|
||||
level === "camera" ? "config/cameras" : "config/global",
|
||||
"config/cameras",
|
||||
"views/settings",
|
||||
"common",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const BirdseyeSection = createConfigSection({
|
||||
sectionPath: "birdseye",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["enabled", "mode", "order"],
|
||||
hiddenFields: [],
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const CameraMqttSection = createConfigSection({
|
||||
sectionPath: "mqtt",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const CameraUiSection = createConfigSection({
|
||||
sectionPath: "ui",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["dashboard", "order"],
|
||||
hiddenFields: [],
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const DetectSection = createConfigSection({
|
||||
sectionPath: "detect",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const FaceRecognitionSection = createConfigSection({
|
||||
sectionPath: "face_recognition",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["enabled", "min_area"],
|
||||
hiddenFields: [],
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const FfmpegSection = createConfigSection({
|
||||
sectionPath: "ffmpeg",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"inputs",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const LiveSection = createConfigSection({
|
||||
sectionPath: "live",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["stream_name", "height", "quality"],
|
||||
fieldGroups: {},
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const LprSection = createConfigSection({
|
||||
sectionPath: "lpr",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["enabled", "expire_time", "min_area", "enhancement"],
|
||||
hiddenFields: [],
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const MotionSection = createConfigSection({
|
||||
sectionPath: "motion",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const NotificationsSection = createConfigSection({
|
||||
sectionPath: "notifications",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["enabled", "email"],
|
||||
fieldGroups: {},
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const ObjectsSection = createConfigSection({
|
||||
sectionPath: "objects",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["track", "alert", "detect", "filters"],
|
||||
fieldGroups: {
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const OnvifSection = createConfigSection({
|
||||
sectionPath: "onvif",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"host",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const RecordSection = createConfigSection({
|
||||
sectionPath: "record",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const ReviewSection = createConfigSection({
|
||||
sectionPath: "review",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["alerts", "detections", "genai"],
|
||||
fieldGroups: {},
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const SemanticSearchSection = createConfigSection({
|
||||
sectionPath: "semantic_search",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["triggers"],
|
||||
hiddenFields: [],
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const SnapshotsSection = createConfigSection({
|
||||
sectionPath: "snapshots",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: [
|
||||
"enabled",
|
||||
|
||||
@@ -5,7 +5,6 @@ import { createConfigSection } from "./BaseSection";
|
||||
|
||||
export const TimestampSection = createConfigSection({
|
||||
sectionPath: "timestamp_style",
|
||||
i18nNamespace: "config/global",
|
||||
defaultConfig: {
|
||||
fieldOrder: ["position", "format", "color", "thickness"],
|
||||
hiddenFields: ["effect", "enabled_in_config"],
|
||||
|
||||
@@ -11,13 +11,9 @@ export function DescriptionFieldTemplate(props: DescriptionFieldProps) {
|
||||
|
||||
const isCameraLevel = formContext?.level === "camera";
|
||||
const sectionI18nPrefix = formContext?.sectionI18nPrefix;
|
||||
const i18nNamespace = formContext?.i18nNamespace;
|
||||
const effectiveNamespace = isCameraLevel ? "config/cameras" : i18nNamespace;
|
||||
const effectiveNamespace = isCameraLevel ? "config/cameras" : "config/global";
|
||||
|
||||
const { t, i18n } = useTranslation([
|
||||
effectiveNamespace || i18nNamespace || "common",
|
||||
i18nNamespace || "common",
|
||||
]);
|
||||
const { t, i18n } = useTranslation([effectiveNamespace, "common"]);
|
||||
|
||||
let resolvedDescription = description;
|
||||
|
||||
|
||||
@@ -69,14 +69,11 @@ export function ObjectFieldTemplate(props: ObjectFieldTemplateProps) {
|
||||
const [isOpen, setIsOpen] = useState(true);
|
||||
|
||||
const isCameraLevel = formContext?.level === "camera";
|
||||
const effectiveNamespace = isCameraLevel
|
||||
? "config/cameras"
|
||||
: formContext?.i18nNamespace;
|
||||
const effectiveNamespace = isCameraLevel ? "config/cameras" : "config/global";
|
||||
const sectionI18nPrefix = formContext?.sectionI18nPrefix;
|
||||
|
||||
const { t, i18n } = useTranslation([
|
||||
effectiveNamespace || formContext?.i18nNamespace || "common",
|
||||
formContext?.i18nNamespace || "common",
|
||||
effectiveNamespace,
|
||||
"config/groups",
|
||||
"common",
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user