mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-15 00:11:15 +03:00
clarify dialog message and tooltip when removing an override
This commit is contained in:
parent
b116f61055
commit
a9563d09b4
@ -614,6 +614,10 @@
|
|||||||
"desc": "Are you sure you want to delete the {{type}} <em>{{name}}</em>?",
|
"desc": "Are you sure you want to delete the {{type}} <em>{{name}}</em>?",
|
||||||
"success": "{{name}} has been deleted."
|
"success": "{{name}} has been deleted."
|
||||||
},
|
},
|
||||||
|
"revertOverride": {
|
||||||
|
"title": "Revert to Base Config",
|
||||||
|
"desc": "This will remove the profile override for the {{type}} <em>{{name}}</em> and revert to the base configuration."
|
||||||
|
},
|
||||||
"error": {
|
"error": {
|
||||||
"mustBeFinished": "Polygon drawing must be finished before saving."
|
"mustBeFinished": "Polygon drawing must be finished before saving."
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,7 +30,6 @@ import useSWR from "swr";
|
|||||||
import { FrigateConfig } from "@/types/frigateConfig";
|
import { FrigateConfig } from "@/types/frigateConfig";
|
||||||
import { reviewQueries } from "@/utils/zoneEdutUtil";
|
import { reviewQueries } from "@/utils/zoneEdutUtil";
|
||||||
import IconWrapper from "../ui/icon-wrapper";
|
import IconWrapper from "../ui/icon-wrapper";
|
||||||
import { buttonVariants } from "../ui/button";
|
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import ActivityIndicator from "../indicators/activity-indicator";
|
import ActivityIndicator from "../indicators/activity-indicator";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
@ -474,9 +473,7 @@ export default function PolygonItem({
|
|||||||
<AlertDialogHeader>
|
<AlertDialogHeader>
|
||||||
<AlertDialogTitle>
|
<AlertDialogTitle>
|
||||||
{polygon.polygonSource === "override"
|
{polygon.polygonSource === "override"
|
||||||
? t(
|
? t("masksAndZones.form.polygonDrawing.revertOverride.title")
|
||||||
"masksAndZones.form.polygonDrawing.revertOverride.title",
|
|
||||||
)
|
|
||||||
: t("masksAndZones.form.polygonDrawing.delete.title")}
|
: t("masksAndZones.form.polygonDrawing.delete.title")}
|
||||||
</AlertDialogTitle>
|
</AlertDialogTitle>
|
||||||
</AlertDialogHeader>
|
</AlertDialogHeader>
|
||||||
@ -514,10 +511,12 @@ export default function PolygonItem({
|
|||||||
{t("button.cancel", { ns: "common" })}
|
{t("button.cancel", { ns: "common" })}
|
||||||
</AlertDialogCancel>
|
</AlertDialogCancel>
|
||||||
<AlertDialogAction
|
<AlertDialogAction
|
||||||
className={buttonVariants({ variant: "destructive" })}
|
className="bg-destructive text-white hover:bg-destructive/90"
|
||||||
onClick={handleDelete}
|
onClick={handleDelete}
|
||||||
>
|
>
|
||||||
{t("button.delete", { ns: "common" })}
|
{polygon.polygonSource === "override"
|
||||||
|
? t("masksAndZones.form.polygonDrawing.revertOverride.title")
|
||||||
|
: t("button.delete", { ns: "common" })}
|
||||||
</AlertDialogAction>
|
</AlertDialogAction>
|
||||||
</AlertDialogFooter>
|
</AlertDialogFooter>
|
||||||
</AlertDialogContent>
|
</AlertDialogContent>
|
||||||
@ -630,7 +629,9 @@ export default function PolygonItem({
|
|||||||
/>
|
/>
|
||||||
</TooltipTrigger>
|
</TooltipTrigger>
|
||||||
<TooltipContent>
|
<TooltipContent>
|
||||||
{t("button.delete", { ns: "common" })}
|
{polygon.polygonSource === "override"
|
||||||
|
? t("masksAndZones.form.polygonDrawing.revertOverride.title")
|
||||||
|
: t("button.delete", { ns: "common" })}
|
||||||
</TooltipContent>
|
</TooltipContent>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user