mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 09:02:15 +03:00
More detail pane tweaks (#20681)
* More detail pane tweaks * remove unneeded check * add ability to submit frames to frigate+ * rename object lifecycle to tracking details * add object mask creation to lifecycle item menu * change tracking details icon
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { ObjectLifecycleSequence } from "@/types/timeline";
|
||||
import { TrackingDetailsSequence } from "@/types/timeline";
|
||||
import { t } from "i18next";
|
||||
import { getTranslatedLabel } from "./i18n";
|
||||
import { capitalizeFirstLetter } from "./stringUtil";
|
||||
|
||||
export function getLifecycleItemDescription(
|
||||
lifecycleItem: ObjectLifecycleSequence,
|
||||
lifecycleItem: TrackingDetailsSequence,
|
||||
) {
|
||||
const rawLabel = Array.isArray(lifecycleItem.data.sub_label)
|
||||
? lifecycleItem.data.sub_label[0]
|
||||
@@ -16,23 +16,23 @@ export function getLifecycleItemDescription(
|
||||
|
||||
switch (lifecycleItem.class_type) {
|
||||
case "visible":
|
||||
return t("objectLifecycle.lifecycleItemDesc.visible", {
|
||||
return t("trackingDetails.lifecycleItemDesc.visible", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
case "entered_zone":
|
||||
return t("objectLifecycle.lifecycleItemDesc.entered_zone", {
|
||||
return t("trackingDetails.lifecycleItemDesc.entered_zone", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
zones: lifecycleItem.data.zones.join(" and ").replaceAll("_", " "),
|
||||
});
|
||||
case "active":
|
||||
return t("objectLifecycle.lifecycleItemDesc.active", {
|
||||
return t("trackingDetails.lifecycleItemDesc.active", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
case "stationary":
|
||||
return t("objectLifecycle.lifecycleItemDesc.stationary", {
|
||||
return t("trackingDetails.lifecycleItemDesc.stationary", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
@@ -43,7 +43,7 @@ export function getLifecycleItemDescription(
|
||||
lifecycleItem.data.attribute == "license_plate"
|
||||
) {
|
||||
title = t(
|
||||
"objectLifecycle.lifecycleItemDesc.attribute.faceOrLicense_plate",
|
||||
"trackingDetails.lifecycleItemDesc.attribute.faceOrLicense_plate",
|
||||
{
|
||||
ns: "views/explore",
|
||||
label,
|
||||
@@ -53,7 +53,7 @@ export function getLifecycleItemDescription(
|
||||
},
|
||||
);
|
||||
} else {
|
||||
title = t("objectLifecycle.lifecycleItemDesc.attribute.other", {
|
||||
title = t("trackingDetails.lifecycleItemDesc.attribute.other", {
|
||||
ns: "views/explore",
|
||||
label: lifecycleItem.data.label,
|
||||
attribute: getTranslatedLabel(
|
||||
@@ -64,17 +64,17 @@ export function getLifecycleItemDescription(
|
||||
return title;
|
||||
}
|
||||
case "gone":
|
||||
return t("objectLifecycle.lifecycleItemDesc.gone", {
|
||||
return t("trackingDetails.lifecycleItemDesc.gone", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
case "heard":
|
||||
return t("objectLifecycle.lifecycleItemDesc.heard", {
|
||||
return t("trackingDetails.lifecycleItemDesc.heard", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
case "external":
|
||||
return t("objectLifecycle.lifecycleItemDesc.external", {
|
||||
return t("trackingDetails.lifecycleItemDesc.external", {
|
||||
ns: "views/explore",
|
||||
label,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user