mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-02 03:27:41 +03:00
Don't put status for needing to restart Frigate
This commit is contained in:
parent
3572ef127e
commit
807f7a4588
@ -195,6 +195,7 @@ export default function ObjectMaskEditPane({
|
|||||||
axios
|
axios
|
||||||
.put(`config/set?${queryString}`, {
|
.put(`config/set?${queryString}`, {
|
||||||
requires_restart: 0,
|
requires_restart: 0,
|
||||||
|
update_topic: `config/cameras/${polygon.camera}/objects`,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
|
|||||||
@ -1,14 +1,7 @@
|
|||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
import ActivityIndicator from "@/components/indicators/activity-indicator";
|
||||||
import {
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||||
useCallback,
|
|
||||||
useContext,
|
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { PolygonCanvas } from "@/components/settings/PolygonCanvas";
|
import { PolygonCanvas } from "@/components/settings/PolygonCanvas";
|
||||||
import { Polygon, PolygonType } from "@/types/canvas";
|
import { Polygon, PolygonType } from "@/types/canvas";
|
||||||
import { interpolatePoints, parseCoordinates } from "@/utils/canvasUtil";
|
import { interpolatePoints, parseCoordinates } from "@/utils/canvasUtil";
|
||||||
@ -36,7 +29,6 @@ import ObjectMaskEditPane from "@/components/settings/ObjectMaskEditPane";
|
|||||||
import PolygonItem from "@/components/settings/PolygonItem";
|
import PolygonItem from "@/components/settings/PolygonItem";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { isDesktop } from "react-device-detect";
|
import { isDesktop } from "react-device-detect";
|
||||||
import { StatusBarMessagesContext } from "@/context/statusbar-provider";
|
|
||||||
|
|
||||||
import { useSearchEffect } from "@/hooks/use-overlay-state";
|
import { useSearchEffect } from "@/hooks/use-overlay-state";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@ -68,8 +60,6 @@ export default function MasksAndZonesView({
|
|||||||
const [activeLine, setActiveLine] = useState<number | undefined>();
|
const [activeLine, setActiveLine] = useState<number | undefined>();
|
||||||
const [snapPoints, setSnapPoints] = useState(false);
|
const [snapPoints, setSnapPoints] = useState(false);
|
||||||
|
|
||||||
const { addMessage } = useContext(StatusBarMessagesContext)!;
|
|
||||||
|
|
||||||
const cameraConfig = useMemo(() => {
|
const cameraConfig = useMemo(() => {
|
||||||
if (config && selectedCamera) {
|
if (config && selectedCamera) {
|
||||||
return config.cameras[selectedCamera];
|
return config.cameras[selectedCamera];
|
||||||
@ -192,13 +182,7 @@ export default function MasksAndZonesView({
|
|||||||
setAllPolygons([...(editingPolygons ?? [])]);
|
setAllPolygons([...(editingPolygons ?? [])]);
|
||||||
setHoveredPolygonIndex(null);
|
setHoveredPolygonIndex(null);
|
||||||
setUnsavedChanges(false);
|
setUnsavedChanges(false);
|
||||||
addMessage(
|
}, [editingPolygons, setUnsavedChanges]);
|
||||||
"masks_zones",
|
|
||||||
t("masksAndZones.restart_required"),
|
|
||||||
undefined,
|
|
||||||
"masks_zones",
|
|
||||||
);
|
|
||||||
}, [t, editingPolygons, setUnsavedChanges, addMessage]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isLoading) {
|
if (isLoading) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user