Web changes

This commit is contained in:
leccelecce 2026-03-11 21:59:16 +00:00
parent 0ed2e7046f
commit f537c13bbc
4 changed files with 3 additions and 30 deletions

View File

@ -166,8 +166,7 @@ export default function SearchResultActions({
</a> </a>
</MenuItem> </MenuItem>
)} )}
{searchResult.has_snapshot && {searchResult.has_snapshot && (
config?.cameras[searchResult.camera].snapshots.clean_copy && (
<MenuItem aria-label={t("itemMenu.downloadCleanSnapshot.aria")}> <MenuItem aria-label={t("itemMenu.downloadCleanSnapshot.aria")}>
<a <a
className="flex items-center" className="flex items-center"

View File

@ -94,8 +94,7 @@ export default function DetailActionsMenu({
</a> </a>
</DropdownMenuItem> </DropdownMenuItem>
)} )}
{search.has_snapshot && {search.has_snapshot && (
config?.cameras[search.camera].snapshots.clean_copy && (
<DropdownMenuItem> <DropdownMenuItem>
<a <a
className="w-full" className="w-full"

View File

@ -263,7 +263,6 @@ export interface CameraConfig {
}; };
snapshots: { snapshots: {
bounding_box: boolean; bounding_box: boolean;
clean_copy: boolean;
crop: boolean; crop: boolean;
enabled: boolean; enabled: boolean;
height: number | null; height: number | null;
@ -580,7 +579,6 @@ export interface FrigateConfig {
snapshots: { snapshots: {
bounding_box: boolean; bounding_box: boolean;
clean_copy: boolean;
crop: boolean; crop: boolean;
enabled: boolean; enabled: boolean;
height: number | null; height: number | null;

View File

@ -8,7 +8,6 @@ import axios from "axios";
import { FrigateConfig } from "@/types/frigateConfig"; import { FrigateConfig } from "@/types/frigateConfig";
import { CheckCircle2, XCircle } from "lucide-react"; import { CheckCircle2, XCircle } from "lucide-react";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { IoIosWarning } from "react-icons/io";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { LuExternalLink } from "react-icons/lu"; import { LuExternalLink } from "react-icons/lu";
@ -197,15 +196,6 @@ export default function FrigatePlusSettingsView({
document.title = t("documentTitle.frigatePlus"); document.title = t("documentTitle.frigatePlus");
}, [t]); }, [t]);
const needCleanSnapshots = () => {
if (!config) {
return false;
}
return Object.values(config.cameras).some(
(camera) => camera.snapshots.enabled && !camera.snapshots.clean_copy,
);
};
if (!config) { if (!config) {
return <ActivityIndicator />; return <ActivityIndicator />;
} }
@ -440,8 +430,7 @@ export default function FrigatePlusSettingsView({
)} )}
</td> </td>
<td className="px-4 py-2 text-center"> <td className="px-4 py-2 text-center">
{camera.snapshots?.enabled && {camera.snapshots?.enabled ? (
camera.snapshots?.clean_copy ? (
<CheckCircle2 className="mx-auto size-5 text-green-500" /> <CheckCircle2 className="mx-auto size-5 text-green-500" />
) : ( ) : (
<XCircle className="mx-auto size-5 text-danger" /> <XCircle className="mx-auto size-5 text-danger" />
@ -453,18 +442,6 @@ export default function FrigatePlusSettingsView({
</tbody> </tbody>
</table> </table>
</div> </div>
{needCleanSnapshots() && (
<div className="rounded-lg border border-secondary-foreground bg-secondary p-4 text-sm text-danger">
<div className="flex items-center gap-2">
<IoIosWarning className="mr-2 size-5 text-danger" />
<div className="max-w-[85%] text-sm">
<Trans ns="views/settings">
frigatePlus.snapshotConfig.cleanCopyWarning
</Trans>
</div>
</div>
</div>
)}
</div> </div>
} }
/> />