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>
</MenuItem>
)}
{searchResult.has_snapshot &&
config?.cameras[searchResult.camera].snapshots.clean_copy && (
{searchResult.has_snapshot && (
<MenuItem aria-label={t("itemMenu.downloadCleanSnapshot.aria")}>
<a
className="flex items-center"

View File

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

View File

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

View File

@ -8,7 +8,6 @@ import axios from "axios";
import { FrigateConfig } from "@/types/frigateConfig";
import { CheckCircle2, XCircle } from "lucide-react";
import { Trans, useTranslation } from "react-i18next";
import { IoIosWarning } from "react-icons/io";
import { Button } from "@/components/ui/button";
import { Link } from "react-router-dom";
import { LuExternalLink } from "react-icons/lu";
@ -197,15 +196,6 @@ export default function FrigatePlusSettingsView({
document.title = t("documentTitle.frigatePlus");
}, [t]);
const needCleanSnapshots = () => {
if (!config) {
return false;
}
return Object.values(config.cameras).some(
(camera) => camera.snapshots.enabled && !camera.snapshots.clean_copy,
);
};
if (!config) {
return <ActivityIndicator />;
}
@ -440,8 +430,7 @@ export default function FrigatePlusSettingsView({
)}
</td>
<td className="px-4 py-2 text-center">
{camera.snapshots?.enabled &&
camera.snapshots?.clean_copy ? (
{camera.snapshots?.enabled ? (
<CheckCircle2 className="mx-auto size-5 text-green-500" />
) : (
<XCircle className="mx-auto size-5 text-danger" />
@ -453,18 +442,6 @@ export default function FrigatePlusSettingsView({
</tbody>
</table>
</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>
}
/>