From be0a047d30bc3d12e428cb9fbebfd94b3b66a05b Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Tue, 11 Nov 2025 12:01:28 +0000 Subject: [PATCH 1/5] - commiting changes for now will revert back --- src/components/UI/Header.tsx | 23 ++++++++++++++++++++--- src/index.css | 4 ++-- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index c093949..3627fdc 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -58,12 +58,29 @@ export default function Header() {
- - +
+ +
+ +
+
    +
  • + + + +
  • +
  • + + + +
  • +
+
+ - + diff --git a/src/index.css b/src/index.css index 92bfa28..77fced0 100644 --- a/src/index.css +++ b/src/index.css @@ -33,7 +33,7 @@ body { } .arrow-outline path { - stroke: black; /* outline color */ - stroke-width: 20px; /* thickness of outline (tweak this) */ + stroke: black; + stroke-width: 20px; stroke-linejoin: round; } From b86830a3c31a4605b2806fb799a29ec167f9080b Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Tue, 11 Nov 2025 15:44:06 +0000 Subject: [PATCH 2/5] updated styling for small mobile screens --- .../Channel1-JSON/ChannelFields.tsx | 2 +- .../SettingForms/NPED/NPEDFields.tsx | 4 +- .../SettingForms/NPED/NPEDHotlist.tsx | 2 +- .../Sound/SoundSettingsFields.tsx | 2 +- .../SettingForms/Sound/SoundUpload.tsx | 2 +- .../System/SystemConfigFields.tsx | 2 +- .../SettingForms/System/SystemFileUpload.tsx | 2 +- .../SettingForms/WiFi&Modem/ModemSettings.tsx | 2 +- .../WiFi&Modem/WiFiSettingsForm.tsx | 2 +- src/components/UI/Header.tsx | 52 ++++++++++++------- 10 files changed, 43 insertions(+), 29 deletions(-) diff --git a/src/components/SettingForms/Channel1-JSON/ChannelFields.tsx b/src/components/SettingForms/Channel1-JSON/ChannelFields.tsx index 36b505f..e837821 100644 --- a/src/components/SettingForms/Channel1-JSON/ChannelFields.tsx +++ b/src/components/SettingForms/Channel1-JSON/ChannelFields.tsx @@ -234,7 +234,7 @@ const ChannelFields = ({ touched, isSubmitting, format }: ChannelFieldsProps) => diff --git a/src/components/SettingForms/NPED/NPEDFields.tsx b/src/components/SettingForms/NPED/NPEDFields.tsx index 795c074..ee3ff11 100644 --- a/src/components/SettingForms/NPED/NPEDFields.tsx +++ b/src/components/SettingForms/NPED/NPEDFields.tsx @@ -103,14 +103,14 @@ const NPEDFields = () => { {!state.npedUser?.propClientID?.value ? ( ) : ( diff --git a/src/components/SettingForms/Sound/SoundUpload.tsx b/src/components/SettingForms/Sound/SoundUpload.tsx index 30a03e6..3cd0e6e 100644 --- a/src/components/SettingForms/Sound/SoundUpload.tsx +++ b/src/components/SettingForms/Sound/SoundUpload.tsx @@ -96,7 +96,7 @@ const SoundUpload = () => { {errors.soundFile &&

Not an mp3 file

} diff --git a/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx b/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx index aa2aa71..2443b2b 100644 --- a/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx +++ b/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx @@ -90,7 +90,7 @@ const WiFiSettingsForm = () => { diff --git a/src/components/UI/Header.tsx b/src/components/UI/Header.tsx index 3627fdc..7d0f34a 100644 --- a/src/components/UI/Header.tsx +++ b/src/components/UI/Header.tsx @@ -1,15 +1,26 @@ import { Link } from "react-router"; import Logo from "/MAV.svg"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; -import { faGear, faHome, faListCheck, faMaximize, faMinimize, faRotate } from "@fortawesome/free-solid-svg-icons"; +import { + faBars, + faGear, + faHome, + faListCheck, + faMaximize, + faMinimize, + faRotate, +} from "@fortawesome/free-solid-svg-icons"; import { useState } from "react"; import SoundBtn from "./SoundBtn"; import { useIntegrationsContext } from "../../context/IntegrationsContext"; export default function Header() { const [isFullscreen, setIsFullscreen] = useState(false); + const [isMenuOpen, setIsMenuOpen] = useState(false); const { state } = useIntegrationsContext(); + const toggleMenu = () => setIsMenuOpen(!isMenuOpen); + const sessionStarted = state.sessionStarted; const sessionPaused = state.sessionPaused; @@ -36,7 +47,7 @@ export default function Header() {
-
+
{sessionStarted && sessionPaused ? (

Session Paused

) : ( @@ -44,7 +55,7 @@ export default function Header() { )}
-
+
@@ -58,24 +69,11 @@ export default function Header() {
-
- + +
+
-
-
    -
  • - - - -
  • -
  • - - - -
  • -
-
@@ -85,6 +83,22 @@ export default function Header() {
+ {isMenuOpen && ( +
+
    +
  • setIsMenuOpen(false)}> + + + +
  • +
  • setIsMenuOpen(false)}> + + + +
  • +
+
+ )}
); } From 0a1ac97c574d09e13f2c1f5e440a6ed8c9106988 Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Fri, 14 Nov 2025 11:55:01 +0000 Subject: [PATCH 3/5] - removed console.log --- src/hooks/useCameraZoom.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/hooks/useCameraZoom.ts b/src/hooks/useCameraZoom.ts index e7e174a..7862f1f 100644 --- a/src/hooks/useCameraZoom.ts +++ b/src/hooks/useCameraZoom.ts @@ -11,7 +11,6 @@ const getCameraMode = async (options: { camera: string }) => { }; const updateCameraMode = async (options: { camera: string; mode: string }) => { - console.log(options); const dayNightPayload = { id: options.camera, fields: [ From dd1cd342c13460eb5366d8ac60ce584cab7860b9 Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Fri, 14 Nov 2025 15:01:01 +0000 Subject: [PATCH 4/5] - added nped category options for alert popups - minor fix on modal for 'DISABLED' MCC --- .../PopupSettings/NPEDCategoryPopup.tsx | 65 +++++++++++++++++++ .../SettingForms/NPED/NPEDCatToggle.tsx | 22 +++++++ .../SettingForms/NPED/NPEDFields.tsx | 29 ++++----- .../SightingModal/SightingModal.tsx | 42 ++++++------ .../SightingsWidget/SightingWidget.tsx | 14 +++- .../providers/IntegrationsContextProvider.tsx | 36 ++++++++-- .../reducers/IntegrationsContextReducer.ts | 11 ++++ src/pages/SystemSettings.tsx | 2 + src/types/types.ts | 8 +++ 9 files changed, 184 insertions(+), 45 deletions(-) create mode 100644 src/components/PopupSettings/NPEDCategoryPopup.tsx create mode 100644 src/components/SettingForms/NPED/NPEDCatToggle.tsx diff --git a/src/components/PopupSettings/NPEDCategoryPopup.tsx b/src/components/PopupSettings/NPEDCategoryPopup.tsx new file mode 100644 index 0000000..b2c521b --- /dev/null +++ b/src/components/PopupSettings/NPEDCategoryPopup.tsx @@ -0,0 +1,65 @@ +import Card from "../UI/Card"; +import CardHeader from "../UI/CardHeader"; +import NPEDCatToggle from "../SettingForms/NPED/NPEDCatToggle"; +import FormGroup from "../SettingForms/components/FormGroup"; +import { Form, Formik } from "formik"; +import { useIntegrationsContext } from "../../context/IntegrationsContext"; +import { useCameraBlackboard } from "../../hooks/useCameraBlackboard"; +import type { CategoryPopups } from "../../types/types"; + +const NPEDCategoryPopup = () => { + const { state, dispatch } = useIntegrationsContext(); + const { mutation } = useCameraBlackboard(); + + const isCatAEnabled = state?.iscatEnabled?.catA; + const isCatBEnabled = state?.iscatEnabled?.catB; + const isCatCEnabled = state?.iscatEnabled?.catC; + const isCatDEnabled = state?.iscatEnabled?.catD; + + const initialValues = { + catA: isCatAEnabled ?? true, + catB: isCatBEnabled ?? true, + catC: isCatCEnabled ?? true, + catD: isCatDEnabled ?? false, + }; + + const handleSubmit = async (values: CategoryPopups) => { + await mutation.mutateAsync({ + operation: "INSERT", + value: values, + path: "CategoryPopup", + }); + dispatch({ type: "NPEDCATENABLED", payload: values }); + }; + + return ( + + +

Allows alerts to pop up to user.

+ +
+ + + + + + + + + + + + + +
+
+
+ ); +}; + +export default NPEDCategoryPopup; diff --git a/src/components/SettingForms/NPED/NPEDCatToggle.tsx b/src/components/SettingForms/NPED/NPEDCatToggle.tsx new file mode 100644 index 0000000..d8a627b --- /dev/null +++ b/src/components/SettingForms/NPED/NPEDCatToggle.tsx @@ -0,0 +1,22 @@ +import { Field } from "formik"; + +type NPEDToggleProps = { + name: string; + label: string; +}; + +const NPEDCatToggle = ({ name, label }: NPEDToggleProps) => { + return ( +