From 0fda7147bed8534d5f9cd083cb8d18457778a63a Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Sun, 24 Mar 2024 11:23:39 -0600 Subject: [PATCH] UI tweaks (#10645) * Use green chip instead of dimming to show that item has been reviewed * Redesign log page to use similar style to events * Use icon only in mobile * Remove unused --- .../player/PreviewThumbnailPlayer.tsx | 7 +- web/src/pages/Logs.tsx | 73 ++++++++----------- 2 files changed, 35 insertions(+), 45 deletions(-) diff --git a/web/src/components/player/PreviewThumbnailPlayer.tsx b/web/src/components/player/PreviewThumbnailPlayer.tsx index 3c1648e9d..52b3e7b53 100644 --- a/web/src/components/player/PreviewThumbnailPlayer.tsx +++ b/web/src/components/player/PreviewThumbnailPlayer.tsx @@ -202,7 +202,9 @@ export default function PreviewThumbnailPlayer({
{(review.severity == "alert" || review.severity == "detection") && ( - + {review.data.objects.map((object) => { return getIconForLabel(object, "size-3 text-white"); })} @@ -225,9 +227,6 @@ export default function PreviewThumbnailPlayer({ )}
- {!playingBack && imgLoaded && review.has_been_reviewed && ( -
- )}
); } diff --git a/web/src/pages/Logs.tsx b/web/src/pages/Logs.tsx index c09f71ab0..77b9f05f0 100644 --- a/web/src/pages/Logs.tsx +++ b/web/src/pages/Logs.tsx @@ -1,16 +1,8 @@ import { Button } from "@/components/ui/button"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuLabel, - DropdownMenuRadioGroup, - DropdownMenuRadioItem, - DropdownMenuSeparator, - DropdownMenuTrigger, -} from "@/components/ui/dropdown-menu"; -import Heading from "@/components/ui/heading"; +import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group"; import copy from "copy-to-clipboard"; import { useCallback, useMemo, useRef, useState } from "react"; +import { LuCopy } from "react-icons/lu"; import useSWR from "swr"; const logTypes = ["frigate", "go2rtc", "nginx"] as const; @@ -61,38 +53,37 @@ function Logs() { ); return ( -
+
- - Logs - + + value ? setLogService(value) : null + } // don't allow the severity to be unselected + > + {Object.values(logTypes).map((item) => ( + +
{`${item} Logs`}
+
+ ))} +
- - - - - - Select Logs To View - - setLogService(type as LogType)} - > - {Object.values(logTypes).map((item) => ( - - {item} Logs - - ))} - - - - +
@@ -113,7 +104,7 @@ function Logs() {
{logs}