From 952770157de4c5c4f1d5e86e19fb268caeb7895c Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 23 Apr 2025 06:58:13 -0600 Subject: [PATCH] Base alert toggles on width not device class --- web/src/views/events/EventView.tsx | 97 +++++++++++++----------------- 1 file changed, 43 insertions(+), 54 deletions(-) diff --git a/web/src/views/events/EventView.tsx b/web/src/views/events/EventView.tsx index a0d904d357..4ce7fcad43 100644 --- a/web/src/views/events/EventView.tsx +++ b/web/src/views/events/EventView.tsx @@ -279,32 +279,29 @@ export default function EventView({ value="alert" aria-label={t("alerts")} > - {isMobileOnly ? ( -
+
+ {reviewCounts.alert > -1 ? ( + reviewCounts.alert + ) : ( + + )} +
+
+ +
+ {t("alerts")} {reviewCounts.alert > -1 ? ( - reviewCounts.alert + ` ∙ ${reviewCounts.alert}` ) : ( - + )}
- ) : ( - <> - -
- {t("alerts")} - {reviewCounts.alert > -1 ? ( - ` ∙ ${reviewCounts.alert}` - ) : ( - - )} -
- - )} +
- {isMobileOnly ? ( -
+
+ {reviewCounts.detection > -1 ? ( + reviewCounts.detection + ) : ( + + )} +
+
+ +
+ {t("detections")} {reviewCounts.detection > -1 ? ( - reviewCounts.detection + ` ∙ ${reviewCounts.detection}` ) : ( - + )}
- ) : ( - <> - -
- {t("detections")} - {reviewCounts.detection > -1 ? ( - ` ∙ ${reviewCounts.detection}` - ) : ( - - )} -
- - )} +
- {isMobileOnly ? ( - - ) : ( - <> - -
{t("motion.label")}
- - )} + +
+ +
{t("motion.label")}
+