Compare commits

...
3 Commits
Author SHA1 Message Date
dependabot[bot]andGitHub e76d9ad81b Merge 8ea5eb6bd1 into e2ce0c82ff 2026-06-28 00:22:29 -05:00
Josh HawkinsandGitHub e2ce0c82ff show Frigate+ submission failures in the UI instead of showing a false success (#23579)
CI / AMD64 Build (push) Waiting to run
CI / ARM Build (push) Waiting to run
CI / Jetson Jetpack 6 (push) Waiting to run
CI / AMD64 Extra Build (push) Blocked by required conditions
CI / ARM Extra Build (push) Blocked by required conditions
CI / Synaptics Build (push) Blocked by required conditions
CI / Assemble and push default build (push) Blocked by required conditions
2026-06-27 16:38:24 -06:00
dependabot[bot]andGitHub 8ea5eb6bd1 Bump i18next-http-backend from 3.0.1 to 3.0.5 in /web
Bumps [i18next-http-backend](https://github.com/i18next/i18next-http-backend) from 3.0.1 to 3.0.5.
- [Changelog](https://github.com/i18next/i18next-http-backend/blob/master/CHANGELOG.md)
- [Commits](https://github.com/i18next/i18next-http-backend/compare/v3.0.1...v3.0.5)

---
updated-dependencies:
- dependency-name: i18next-http-backend
  dependency-version: 3.0.5
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-22 18:08:47 +00:00
6 changed files with 79 additions and 44 deletions
+9 -9
View File
@@ -49,7 +49,7 @@
"framer-motion": "^12.38.0",
"hls.js": "^1.6.15",
"i18next": "^24.2.0",
"i18next-http-backend": "^3.0.1",
"i18next-http-backend": "^3.0.5",
"idb-keyval": "^6.2.1",
"immer": "^10.1.1",
"js-yaml": "^4.1.1",
@@ -7013,12 +7013,12 @@
}
},
"node_modules/cross-fetch": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.0.0.tgz",
"integrity": "sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-4.1.0.tgz",
"integrity": "sha512-uKm5PU+MHTootlWEY+mZ4vvXoCn4fLQxT9dSc1sXVMSFkINTJVN8cAQROpwcKm8bJ/c7rgZVIBWzH5T78sNZZw==",
"license": "MIT",
"dependencies": {
"node-fetch": "^2.6.12"
"node-fetch": "^2.7.0"
}
},
"node_modules/cross-spawn": {
@@ -8876,12 +8876,12 @@
}
},
"node_modules/i18next-http-backend": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-3.0.1.tgz",
"integrity": "sha512-XT2lYSkbAtDE55c6m7CtKxxrsfuRQO3rUfHzj8ZyRtY9CkIX3aRGwXGTkUhpGWce+J8n7sfu3J0f2wTzo7Lw0A==",
"version": "3.0.5",
"resolved": "https://registry.npmjs.org/i18next-http-backend/-/i18next-http-backend-3.0.5.tgz",
"integrity": "sha512-QaWHnsxieEDcqKe+vo/RFqpiIFRi/KBqlOSPcUlvinBaISCeiTRCbtrazHAjtHtsLC66oDsROAH8frWkQzfMMQ==",
"license": "MIT",
"dependencies": {
"cross-fetch": "4.0.0"
"cross-fetch": "4.1.0"
}
},
"node_modules/i18next-resources-for-ts": {
+1 -1
View File
@@ -63,7 +63,7 @@
"framer-motion": "^12.38.0",
"hls.js": "^1.6.15",
"i18next": "^24.2.0",
"i18next-http-backend": "^3.0.1",
"i18next-http-backend": "^3.0.5",
"idb-keyval": "^6.2.1",
"immer": "^10.1.1",
"js-yaml": "^4.1.1",
@@ -24,6 +24,9 @@
},
"state": {
"submitted": "Submitted"
},
"toast": {
"error": "Failed to submit to Frigate+. Please check your network connection and try again."
}
}
},
@@ -1251,30 +1251,42 @@ function ObjectDetailsTab({
return;
}
falsePositive
? axios.put(`events/${search.id}/false_positive`)
: axios.post(`events/${search.id}/plus`, {
include_annotation: 1,
});
try {
const resp = falsePositive
? await axios.put(`events/${search.id}/false_positive`)
: await axios.post(`events/${search.id}/plus`, {
include_annotation: 1,
});
setState("submitted");
setSearch({ ...search, plus_id: "new_upload" });
mutate(
(key) => isEventsKey(key),
(currentData: SearchResult[][] | SearchResult[] | undefined) =>
mapSearchResults(currentData, (event) =>
event.id === search.id
? { ...event, plus_id: "new_upload" }
: event,
),
{
optimisticData: true,
rollbackOnError: true,
revalidate: false,
},
);
if (resp.status !== 200 || !resp.data?.success) {
throw new Error();
}
setState("submitted");
setSearch({ ...search, plus_id: "new_upload" });
mutate(
(key) => isEventsKey(key),
(currentData: SearchResult[][] | SearchResult[] | undefined) =>
mapSearchResults(currentData, (event) =>
event.id === search.id
? { ...event, plus_id: "new_upload" }
: event,
),
{
optimisticData: true,
rollbackOnError: true,
revalidate: false,
},
);
} catch {
setState("reviewing");
toast.error(
t("explore.plus.review.toast.error", { ns: "components/dialog" }),
{ position: "top-center" },
);
}
},
[search, mutate, mapSearchResults, setSearch, isEventsKey],
[search, mutate, mapSearchResults, setSearch, isEventsKey, t],
);
const popoverContainerRef = useRef<HTMLDivElement | null>(null);
@@ -1225,11 +1225,15 @@ function LifecycleIconRow({
<DropdownMenuItem
className="cursor-pointer"
onSelect={async () => {
const resp = await axios.post(
`/${item.camera}/plus/${item.timestamp + annotationOffset / 1000}`,
);
try {
const resp = await axios.post(
`/${item.camera}/plus/${item.timestamp + annotationOffset / 1000}`,
);
if (resp.status !== 200) {
throw new Error();
}
if (resp && resp.status == 200) {
toast.success(
t("toast.success.submittedFrigatePlus", {
ns: "components/player",
@@ -1238,8 +1242,8 @@ function LifecycleIconRow({
position: "top-center",
},
);
} else {
toast.success(
} catch {
toast.error(
t("toast.error.submitFrigatePlusFailed", {
ns: "components/player",
}),
@@ -10,6 +10,7 @@ import { isDesktop, isMobile, isSafari } from "react-device-detect";
import { cn } from "@/lib/utils";
import { useCallback, useEffect, useState } from "react";
import axios from "axios";
import { toast } from "sonner";
import { useTranslation, Trans } from "react-i18next";
import { Button } from "@/components/ui/button";
import ActivityIndicator from "@/components/indicators/activity-indicator";
@@ -48,13 +49,28 @@ export function FrigatePlusDialog({
const onSubmitToPlus = useCallback(
async (falsePositive: boolean) => {
if (!upload) return;
falsePositive
? axios.put(`events/${upload.id}/false_positive`)
: axios.post(`events/${upload.id}/plus`, { include_annotation: 1 });
setState("submitted");
onEventUploaded();
try {
const resp = falsePositive
? await axios.put(`events/${upload.id}/false_positive`)
: await axios.post(`events/${upload.id}/plus`, {
include_annotation: 1,
});
if (resp.status !== 200 || !resp.data?.success) {
throw new Error();
}
setState("submitted");
onEventUploaded();
} catch {
setState("reviewing");
toast.error(t("explore.plus.review.toast.error"), {
position: "top-center",
});
}
},
[upload, onEventUploaded],
[upload, onEventUploaded, t],
);
const [imgRef, imgLoaded, onImgLoad] = useImageLoaded();