mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
UI tweaks (#11940)
* Enforce events must have snapshots for frigate+ * Open docs links in separate tabs * Reload after restart to the baseUrl
This commit is contained in:
parent
349b27b764
commit
9514a3d089
@ -67,6 +67,7 @@ import {
|
|||||||
} from "../ui/dialog";
|
} from "../ui/dialog";
|
||||||
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
import { TooltipPortal } from "@radix-ui/react-tooltip";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
import { baseUrl } from "@/api/baseUrl";
|
||||||
|
|
||||||
type GeneralSettingsProps = {
|
type GeneralSettingsProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -95,12 +96,12 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (countdown === 0) {
|
if (countdown === 0) {
|
||||||
window.location.href = "/";
|
window.location.href = baseUrl;
|
||||||
}
|
}
|
||||||
}, [countdown]);
|
}, [countdown]);
|
||||||
|
|
||||||
const handleForceReload = () => {
|
const handleForceReload = () => {
|
||||||
window.location.href = "/";
|
window.location.href = baseUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Container = isDesktop ? DropdownMenu : Drawer;
|
const Container = isDesktop ? DropdownMenu : Drawer;
|
||||||
@ -324,7 +325,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
Help
|
Help
|
||||||
</DropdownMenuLabel>
|
</DropdownMenuLabel>
|
||||||
<DropdownMenuSeparator />
|
<DropdownMenuSeparator />
|
||||||
<a href="https://docs.frigate.video">
|
<a href="https://docs.frigate.video" target="_blank">
|
||||||
<MenuItem
|
<MenuItem
|
||||||
className={
|
className={
|
||||||
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
||||||
@ -334,7 +335,10 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
|
|||||||
<span>Documentation</span>
|
<span>Documentation</span>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/blakeblackshear/frigate">
|
<a
|
||||||
|
href="https://github.com/blakeblackshear/frigate"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
className={
|
className={
|
||||||
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
|
||||||
|
@ -83,6 +83,7 @@ export default function SubmitPlus() {
|
|||||||
limit: API_LIMIT,
|
limit: API_LIMIT,
|
||||||
in_progress: 0,
|
in_progress: 0,
|
||||||
is_submitted: 0,
|
is_submitted: 0,
|
||||||
|
has_snapshot: 1,
|
||||||
cameras: selectedCameras ? selectedCameras.join(",") : null,
|
cameras: selectedCameras ? selectedCameras.join(",") : null,
|
||||||
labels: selectedLabels ? selectedLabels.join(",") : null,
|
labels: selectedLabels ? selectedLabels.join(",") : null,
|
||||||
min_score: scoreRange ? scoreRange[0] : null,
|
min_score: scoreRange ? scoreRange[0] : null,
|
||||||
@ -99,6 +100,7 @@ export default function SubmitPlus() {
|
|||||||
limit: 100,
|
limit: 100,
|
||||||
in_progress: 0,
|
in_progress: 0,
|
||||||
is_submitted: 0,
|
is_submitted: 0,
|
||||||
|
has_snapshot: 1,
|
||||||
cameras: selectedCameras ? selectedCameras.join(",") : null,
|
cameras: selectedCameras ? selectedCameras.join(",") : null,
|
||||||
labels: selectedLabels ? selectedLabels.join(",") : null,
|
labels: selectedLabels ? selectedLabels.join(",") : null,
|
||||||
min_score: scoreRange ? scoreRange[0] : null,
|
min_score: scoreRange ? scoreRange[0] : null,
|
||||||
|
Loading…
Reference in New Issue
Block a user