mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-17 16:44:29 +03:00
add ability to clear all streaming settings from settings
This commit is contained in:
parent
3d2d51860d
commit
5c66349b5c
@ -46,6 +46,25 @@ export default function UiSettingsView() {
|
|||||||
});
|
});
|
||||||
}, [config]);
|
}, [config]);
|
||||||
|
|
||||||
|
const clearStreamingSettings = useCallback(async () => {
|
||||||
|
if (!config) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
await delData(`streaming-settings`)
|
||||||
|
.then(() => {
|
||||||
|
toast.success(`Cleared streaming settings for all camera groups.`, {
|
||||||
|
position: "top-center",
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((error) => {
|
||||||
|
toast.error(
|
||||||
|
`Failed to clear camera groups streaming settings: ${error.response.data.message}`,
|
||||||
|
{ position: "top-center" },
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}, [config]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
document.title = "General Settings - Frigate";
|
document.title = "General Settings - Frigate";
|
||||||
}, []);
|
}, []);
|
||||||
@ -84,11 +103,15 @@ export default function UiSettingsView() {
|
|||||||
Automatic Live View
|
Automatic Live View
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
<div className="my-2 text-sm text-muted-foreground">
|
<div className="my-2 max-w-5xl text-sm text-muted-foreground">
|
||||||
<p>
|
<p>
|
||||||
Automatically switch to a camera's live view when activity is
|
Automatically switch to a camera's live view when activity is
|
||||||
detected. Disabling this option causes static camera images on
|
detected. Disabling this option causes static camera images on
|
||||||
the Live dashboard to only update once per minute.
|
the your dashboards to only update once per minute.{" "}
|
||||||
|
<em>
|
||||||
|
This is a global setting but can be overridden on each
|
||||||
|
camera <strong>in camera groups only</strong>.
|
||||||
|
</em>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -103,7 +126,7 @@ export default function UiSettingsView() {
|
|||||||
Play Alert Videos
|
Play Alert Videos
|
||||||
</Label>
|
</Label>
|
||||||
</div>
|
</div>
|
||||||
<div className="my-2 text-sm text-muted-foreground">
|
<div className="my-2 max-w-5xl text-sm text-muted-foreground">
|
||||||
<p>
|
<p>
|
||||||
By default, recent alerts on the Live dashboard play as small
|
By default, recent alerts on the Live dashboard play as small
|
||||||
looping videos. Disable this option to only show a static
|
looping videos. Disable this option to only show a static
|
||||||
@ -114,10 +137,10 @@ export default function UiSettingsView() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="my-3 flex w-full flex-col space-y-6">
|
<div className="my-3 flex w-full flex-col space-y-6">
|
||||||
<div className="mt-2 space-y-6">
|
<div className="mt-2 space-y-3">
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<div className="text-md">Stored Layouts</div>
|
<div className="text-md">Stored Layouts</div>
|
||||||
<div className="my-2 text-sm text-muted-foreground">
|
<div className="my-2 max-w-5xl text-sm text-muted-foreground">
|
||||||
<p>
|
<p>
|
||||||
The layout of cameras in a camera group can be
|
The layout of cameras in a camera group can be
|
||||||
dragged/resized. The positions are stored in your browser's
|
dragged/resized. The positions are stored in your browser's
|
||||||
@ -133,6 +156,24 @@ export default function UiSettingsView() {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="mt-2 space-y-3">
|
||||||
|
<div className="space-y-0.5">
|
||||||
|
<div className="text-md">Camera Group Streaming Settings</div>
|
||||||
|
<div className="my-2 max-w-5xl text-sm text-muted-foreground">
|
||||||
|
<p>
|
||||||
|
Streaming settings for each camera group are stored in your
|
||||||
|
browser's local storage.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Button
|
||||||
|
aria-label="Clear all group streaming settings"
|
||||||
|
onClick={clearStreamingSettings}
|
||||||
|
>
|
||||||
|
Clear All Streaming Settings
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
|
||||||
<Separator className="my-2 flex bg-secondary" />
|
<Separator className="my-2 flex bg-secondary" />
|
||||||
|
|
||||||
<Heading as="h4" className="my-2">
|
<Heading as="h4" className="my-2">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user