diff --git a/.env.development b/.env.development index b8df4be..5fb4460 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false NEXT_PUBLIC_EXPORT_STATIC=false NEXT_PUBLIC_USE_CGI=false # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.551 +NEXT_PUBLIC_APP_VERSION=1.6.554 NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) diff --git a/.env.production b/.env.production index 10e2a0b..6f9988c 100644 --- a/.env.production +++ b/.env.production @@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL NEXT_PUBLIC_EXPORT_STATIC=true NEXT_PUBLIC_USE_CGI=true # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.551 +NEXT_PUBLIC_APP_VERSION=1.6.554 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index eac4313..e668004 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## [1.6.554] – 2025-07-08 + +- fix: TDR select List mouseover gray 200 + +--- +## [1.6.553] – 2025-07-08 + +- fix: TDR select List mouseover gray 200 + +--- +## [1.6.552] – 2025-07-07 + +- fix: TDR select List mouseover gray 200 + +--- ## [1.6.551] – 2025-07-07 - fix: TDR select List mouseover gray 200 diff --git a/mocks/api/SERVICE/digitalOutputsMockData.json b/mocks/api/SERVICE/digitalOutputsMockData.json index 7d43616..42fdc84 100644 --- a/mocks/api/SERVICE/digitalOutputsMockData.json +++ b/mocks/api/SERVICE/digitalOutputsMockData.json @@ -1,8 +1,8 @@ { "win_da_state": [ 1, - 0, - 0, + 1, + 1, 1 ], "win_da_bezeichnung": [ diff --git a/package-lock.json b/package-lock.json index 80391c3..befd913 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.551", + "version": "1.6.554", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.551", + "version": "1.6.554", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 2df51e3..711cbf3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.551", + "version": "1.6.554", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/_app.tsx b/pages/_app.tsx index f7c9703..3d273c3 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -14,7 +14,6 @@ import Footer from "@/components/footer/Footer"; // Thunks importieren import { getKueDataThunk } from "@/redux/thunks/getKueDataThunk"; -import { getDigitalOutputsThunk } from "@/redux/thunks/getDigitalOutputsThunk"; import { getAnalogInputsThunk } from "@/redux/thunks/getAnalogInputsThunk"; import { getAnalogInputsHistoryThunk } from "@/redux/thunks/getAnalogInputsHistoryThunk"; import { getLast20MessagesThunk } from "@/redux/thunks/getLast20MessagesThunk"; @@ -57,18 +56,31 @@ function AppContent({ const [sessionExpired] = useState(false); const mode = "DIA0"; // oder aus Router oder Session const type = 0; // Beispiel: 0 für "loop", 1 für "iso" (bitte ggf. anpassen) + const [pathname, setPathname] = useState( + typeof window !== "undefined" ? window.location.pathname : "" + ); + + useEffect(() => { + const handleRouteChange = () => { + setPathname(window.location.pathname); + }; + + window.addEventListener("popstate", handleRouteChange); + window.addEventListener("pushstate", handleRouteChange); + + return () => { + window.removeEventListener("popstate", handleRouteChange); + window.removeEventListener("pushstate", handleRouteChange); + }; + }, []); + useEffect(() => { let intervalId: NodeJS.Timeout; - const pathname = window.location.pathname; const loadAndDispatch = () => { dispatch(getAuthThunks()); if (pathname.includes("kabelueberwachung")) { dispatch(getKueDataThunk()); - } else if (pathname.includes("digitalOutputs")) { - dispatch(getDigitalOutputsThunk()); - } else if (pathname.includes("digitalInputs")) { - dispatch(getDigitalOutputsThunk()); // 🟠 evtl. anpassen } else if (pathname.includes("analogInputs")) { dispatch(getAnalogInputsThunk()); } else if (pathname.includes("analogHistory")) { @@ -105,7 +117,7 @@ function AppContent({ intervalId = setInterval(loadAndDispatch, 10000); return () => clearInterval(intervalId); } - }, [dispatch]); + }, [pathname, dispatch]); return (
diff --git a/pages/digitalOutputs.tsx b/pages/digitalOutputs.tsx index 6dd0a74..25bdab6 100644 --- a/pages/digitalOutputs.tsx +++ b/pages/digitalOutputs.tsx @@ -20,12 +20,9 @@ const DigitalOutputs: React.FC = () => { const [isOutputModalOpen, setIsOutputModalOpen] = useState(false); useEffect(() => { - dispatch(getDigitalOutputsThunk()); - const interval = setInterval(() => { - dispatch(getDigitalInputsThunk()); dispatch(getDigitalOutputsThunk()); - }, 500); + }, 3000); // z. B. alle 3 Sekunden statt 0.5s return () => clearInterval(interval); }, [dispatch]);