From 0223d6df60d62b965199c63abfaa72dbee1e77b7 Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 28 Mar 2024 11:53:36 -0600 Subject: [PATCH] UI Tweaks (#10727) * Fix drawer not being scrollable * Fix margin * Use 2 columns for large mobile devices * Move padding * Add review summary to mobile calendar * Make header spacing consistent between pages * remove red --- .../components/filter/ReviewFilterGroup.tsx | 3 +- .../components/overlay/MobileCameraDrawer.tsx | 28 ++++++++++--------- .../overlay/MobileReviewSettingsDrawer.tsx | 5 +++- web/src/views/events/EventView.tsx | 6 ++-- web/src/views/events/RecordingView.tsx | 9 ++++-- web/src/views/live/LiveDashboardView.tsx | 8 +++--- 6 files changed, 34 insertions(+), 25 deletions(-) diff --git a/web/src/components/filter/ReviewFilterGroup.tsx b/web/src/components/filter/ReviewFilterGroup.tsx index fa26722e6..28e2475f2 100644 --- a/web/src/components/filter/ReviewFilterGroup.tsx +++ b/web/src/components/filter/ReviewFilterGroup.tsx @@ -187,6 +187,7 @@ export default function ReviewFilterGroup({ - - {allCameras.map((cam) => ( -
{ - onSelectCamera(cam); - setCameraDrawer(false); - }} - > - {cam.replaceAll("_", " ")} -
- ))} + +
+ {allCameras.map((cam) => ( +
{ + onSelectCamera(cam); + setCameraDrawer(false); + }} + > + {cam.replaceAll("_", " ")} +
+ ))} +
); diff --git a/web/src/components/overlay/MobileReviewSettingsDrawer.tsx b/web/src/components/overlay/MobileReviewSettingsDrawer.tsx index 00bb71a3c..bf39632e9 100644 --- a/web/src/components/overlay/MobileReviewSettingsDrawer.tsx +++ b/web/src/components/overlay/MobileReviewSettingsDrawer.tsx @@ -7,7 +7,7 @@ import { ExportContent } from "./ExportDialog"; import { ExportMode } from "@/types/filter"; import ReviewActivityCalendar from "./ReviewActivityCalendar"; import { SelectSeparator } from "../ui/select"; -import { ReviewFilter } from "@/types/review"; +import { ReviewFilter, ReviewSummary } from "@/types/review"; import { getEndOfDayTimestamp } from "@/utils/dateUtil"; import { GeneralFilterContent } from "../filter/ReviewFilterGroup"; import useSWR from "swr"; @@ -36,6 +36,7 @@ type MobileReviewSettingsDrawerProps = { currentTime: number; range?: TimeRange; mode: ExportMode; + reviewSummary?: ReviewSummary; onUpdateFilter: (filter: ReviewFilter) => void; setRange: (range: TimeRange | undefined) => void; setMode: (mode: ExportMode) => void; @@ -48,6 +49,7 @@ export default function MobileReviewSettingsDrawer({ currentTime, range, mode, + reviewSummary, onUpdateFilter, setRange, setMode, @@ -201,6 +203,7 @@ export default function MobileReviewSettingsDrawer({ -
+
{isMobile && ( - + )}
{filter?.before == undefined && (
{isMobile && ( - + )}