mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-01-22 20:18:30 +03:00
misc triggers tweaks
i18n fixes fix toaster color fix clicking on labels selecting incorrect checkbox
This commit is contained in:
parent
bf099c3edd
commit
32f6114573
@ -3,6 +3,7 @@
|
|||||||
"untilForTime": "Until {{time}}",
|
"untilForTime": "Until {{time}}",
|
||||||
"untilForRestart": "Until Frigate restarts.",
|
"untilForRestart": "Until Frigate restarts.",
|
||||||
"untilRestart": "Until restart",
|
"untilRestart": "Until restart",
|
||||||
|
"never": "Never",
|
||||||
"ago": "{{timeAgo}} ago",
|
"ago": "{{timeAgo}} ago",
|
||||||
"justNow": "Just now",
|
"justNow": "Just now",
|
||||||
"today": "Today",
|
"today": "Today",
|
||||||
|
|||||||
@ -268,7 +268,7 @@ export default function CreateTriggerDialog({
|
|||||||
<FormItem className="flex flex-row items-center justify-between">
|
<FormItem className="flex flex-row items-center justify-between">
|
||||||
<div className="space-y-0.5">
|
<div className="space-y-0.5">
|
||||||
<FormLabel className="text-base">
|
<FormLabel className="text-base">
|
||||||
{t("enabled", { ns: "common" })}
|
{t("button.enabled", { ns: "common" })}
|
||||||
</FormLabel>
|
</FormLabel>
|
||||||
<div className="text-sm text-muted-foreground">
|
<div className="text-sm text-muted-foreground">
|
||||||
{t("triggers.dialog.form.enabled.description")}
|
{t("triggers.dialog.form.enabled.description")}
|
||||||
@ -394,7 +394,10 @@ export default function CreateTriggerDialog({
|
|||||||
</FormLabel>
|
</FormLabel>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
{availableActions.map((action) => (
|
{availableActions.map((action) => (
|
||||||
<div key={action} className="flex items-center space-x-2">
|
<label
|
||||||
|
key={action}
|
||||||
|
className="flex cursor-pointer items-center space-x-2"
|
||||||
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={form
|
checked={form
|
||||||
@ -416,10 +419,10 @@ export default function CreateTriggerDialog({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormLabel className="text-sm font-normal">
|
<span className="text-sm font-normal">
|
||||||
{t(`triggers.actions.${action}`)}
|
{t(`triggers.actions.${action}`)}
|
||||||
</FormLabel>
|
</span>
|
||||||
</div>
|
</label>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
|
|||||||
@ -142,7 +142,10 @@ export default function Step3ThresholdAndActions({
|
|||||||
<FormLabel>{t("triggers.dialog.form.actions.title")}</FormLabel>
|
<FormLabel>{t("triggers.dialog.form.actions.title")}</FormLabel>
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
{availableActions.map((action) => (
|
{availableActions.map((action) => (
|
||||||
<div key={action} className="flex items-center space-x-2">
|
<label
|
||||||
|
key={action}
|
||||||
|
className="flex cursor-pointer items-center space-x-2"
|
||||||
|
>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
checked={form
|
checked={form
|
||||||
@ -164,10 +167,10 @@ export default function Step3ThresholdAndActions({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormLabel className="text-sm font-normal">
|
<span className="text-sm font-normal">
|
||||||
{t(`triggers.actions.${action}`)}
|
{t(`triggers.actions.${action}`)}
|
||||||
</FormLabel>
|
</span>
|
||||||
</div>
|
</label>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { useCallback, useEffect, useMemo, useState } from "react";
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
import { Toaster, toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
import { Toaster } from "@/components/ui/sonner";
|
||||||
import useSWR from "swr";
|
import useSWR from "swr";
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
@ -598,7 +599,7 @@ export default function TriggerView({
|
|||||||
date_style: "medium",
|
date_style: "medium",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: "Never"}
|
: t("never", { ns: "common" })}
|
||||||
</span>
|
</span>
|
||||||
{trigger_status?.triggers[trigger.name]
|
{trigger_status?.triggers[trigger.name]
|
||||||
?.triggering_event_id && (
|
?.triggering_event_id && (
|
||||||
@ -663,7 +664,9 @@ export default function TriggerView({
|
|||||||
<TableHeader className="sticky top-0 bg-muted/50">
|
<TableHeader className="sticky top-0 bg-muted/50">
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableHead className="w-4"></TableHead>
|
<TableHead className="w-4"></TableHead>
|
||||||
<TableHead>{t("name", { ns: "common" })}</TableHead>
|
<TableHead>
|
||||||
|
{t("name", { ns: "triggers.table.name" })}
|
||||||
|
</TableHead>
|
||||||
<TableHead>{t("triggers.table.type")}</TableHead>
|
<TableHead>{t("triggers.table.type")}</TableHead>
|
||||||
<TableHead>
|
<TableHead>
|
||||||
{t("triggers.table.lastTriggered")}
|
{t("triggers.table.lastTriggered")}
|
||||||
@ -759,7 +762,7 @@ export default function TriggerView({
|
|||||||
date_style: "medium",
|
date_style: "medium",
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
: "Never"}
|
: t("time.never", { ns: "common" })}
|
||||||
</span>
|
</span>
|
||||||
{trigger_status?.triggers[trigger.name]
|
{trigger_status?.triggers[trigger.name]
|
||||||
?.triggering_event_id && (
|
?.triggering_event_id && (
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user