Skip to content

Commit

Permalink
UI tweaks (#11940)
Browse files Browse the repository at this point in the history
* Enforce events must have snapshots for frigate+

* Open docs links in separate tabs

* Reload after restart to the baseUrl
  • Loading branch information
NickM-27 committed Jun 13, 2024
1 parent 349b27b commit 9514a3d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions web/src/components/menu/GeneralSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ import {
} from "../ui/dialog";
import { TooltipPortal } from "@radix-ui/react-tooltip";
import { cn } from "@/lib/utils";
import { baseUrl } from "@/api/baseUrl";

type GeneralSettingsProps = {
className?: string;
Expand Down Expand Up @@ -95,12 +96,12 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {

useEffect(() => {
if (countdown === 0) {
window.location.href = "/";
window.location.href = baseUrl;
}
}, [countdown]);

const handleForceReload = () => {
window.location.href = "/";
window.location.href = baseUrl;
};

const Container = isDesktop ? DropdownMenu : Drawer;
Expand Down Expand Up @@ -324,7 +325,7 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
Help
</DropdownMenuLabel>
<DropdownMenuSeparator />
<a href="https://docs.frigate.video">
<a href="https://docs.frigate.video" target="_blank">
<MenuItem
className={
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
Expand All @@ -334,7 +335,10 @@ export default function GeneralSettings({ className }: GeneralSettingsProps) {
<span>Documentation</span>
</MenuItem>
</a>
<a href="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/blakeblackshear/frigate">
<a
href="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/blakeblackshear/frigate"
target="_blank"
>
<MenuItem
className={
isDesktop ? "cursor-pointer" : "flex items-center p-2 text-sm"
Expand Down
2 changes: 2 additions & 0 deletions web/src/pages/SubmitPlus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default function SubmitPlus() {
limit: API_LIMIT,
in_progress: 0,
is_submitted: 0,
has_snapshot: 1,
cameras: selectedCameras ? selectedCameras.join(",") : null,
labels: selectedLabels ? selectedLabels.join(",") : null,
min_score: scoreRange ? scoreRange[0] : null,
Expand All @@ -99,6 +100,7 @@ export default function SubmitPlus() {
limit: 100,
in_progress: 0,
is_submitted: 0,
has_snapshot: 1,
cameras: selectedCameras ? selectedCameras.join(",") : null,
labels: selectedLabels ? selectedLabels.join(",") : null,
min_score: scoreRange ? scoreRange[0] : null,
Expand Down

0 comments on commit 9514a3d

Please sign in to comment.