mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-01 16:42:18 +03:00
Miscellaneous Fixes (#21208)
* conditionally display actions for admin role only * only allow admins to save annotation offset * Fix classification reset filter * fix explore context menu from blocking pointer events on the body element after dialog close applying modal=false to the menu (not to the dialog) to fix this in the same way as elsewhere in the codebase * add select all link to face library, classification, and explore * Disable iOS image dragging for classification card * add proxmox ballooning comment * lpr docs tweaks * yaml list * clarify tls_insecure * Improve security summary format and usefulness --------- Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
This commit is contained in:
co-authored by
Nicolas Mowen
parent
9cdc10008d
commit
fa6dda6735
@@ -52,7 +52,7 @@ import {
|
||||
useRef,
|
||||
useState,
|
||||
} from "react";
|
||||
import { isDesktop } from "react-device-detect";
|
||||
import { isDesktop, isMobileOnly } from "react-device-detect";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
import {
|
||||
LuFolderCheck,
|
||||
@@ -370,10 +370,10 @@ export default function FaceLibrary() {
|
||||
/>
|
||||
{selectedFaces?.length > 0 ? (
|
||||
<div className="flex items-center justify-center gap-2">
|
||||
<div className="mx-1 flex w-48 items-center justify-center text-sm text-muted-foreground">
|
||||
<div className="mx-1 flex w-auto items-center justify-center text-sm text-muted-foreground">
|
||||
<div className="p-1">
|
||||
{t("selected", {
|
||||
ns: "views/event",
|
||||
ns: "views/events",
|
||||
count: selectedFaces.length,
|
||||
})}
|
||||
</div>
|
||||
@@ -384,6 +384,24 @@ export default function FaceLibrary() {
|
||||
>
|
||||
{t("button.unselect", { ns: "common" })}
|
||||
</div>
|
||||
{selectedFaces.length <
|
||||
(pageToggle === "train"
|
||||
? trainImages.length
|
||||
: faceImages.length) && (
|
||||
<>
|
||||
<div className="p-1">{"|"}</div>
|
||||
<div
|
||||
className="cursor-pointer p-2 text-primary hover:rounded-lg hover:bg-secondary"
|
||||
onClick={() =>
|
||||
setSelectedFaces([
|
||||
...(pageToggle === "train" ? trainImages : faceImages),
|
||||
])
|
||||
}
|
||||
>
|
||||
{t("select_all", { ns: "views/events" })}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<Button
|
||||
className="flex gap-2"
|
||||
@@ -482,6 +500,18 @@ function LibrarySelector({
|
||||
[renameFace],
|
||||
);
|
||||
|
||||
const pageTitle = useMemo(() => {
|
||||
if (pageToggle != "train") {
|
||||
return pageToggle;
|
||||
}
|
||||
|
||||
if (isMobileOnly) {
|
||||
return t("train.titleShort");
|
||||
}
|
||||
|
||||
return t("train.title");
|
||||
}, [pageToggle, t]);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Dialog
|
||||
@@ -532,7 +562,7 @@ function LibrarySelector({
|
||||
<DropdownMenu modal={false}>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<Button className="flex justify-between smart-capitalize">
|
||||
{pageToggle == "train" ? t("train.title") : pageToggle}
|
||||
{pageTitle}
|
||||
<span className="ml-2 text-primary-variant">
|
||||
({(pageToggle && faceData?.[pageToggle]?.length) || 0})
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user