From fb680a4c66315eb916e6b5d4c0952c0ea4cbd389 Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 8 Jul 2025 08:30:09 +0200 Subject: [PATCH] feat: ersetzt Einheit-Select durch Listbox mit littwin-blue Design in AnalogInputsSettingsModal --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 9 ++++ .../AnalogInputsSettingsModal.tsx | 53 ++++++++++++++----- .../LoopChartActionBar.tsx | 4 +- .../kue705FO/modals/KueEinstellung.tsx | 53 +++++++++++++++---- components/main/system/DetailModal.tsx | 2 +- package-lock.json | 4 +- package.json | 2 +- styles/globals.css | 10 ++++ 10 files changed, 112 insertions(+), 29 deletions(-) diff --git a/.env.development b/.env.development index 32305f2..6f85d47 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.556 +NEXT_PUBLIC_APP_VERSION=1.6.557 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 c00411c..b34af9a 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.556 +NEXT_PUBLIC_APP_VERSION=1.6.557 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e3a2c..13bc669 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +## [1.6.557] – 2025-07-08 + +- refactor: Zeitraum-Dropdown in DetailModal auf Listbox mit Littwin-Design umgestellt + +- setUnit(e.target.value)} - > - - - - - - + +
+ + {unit} + + + + {unitOptions.map((opt) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white font-medium" + : active + ? "bg-gray-200" + : "text-gray-900" + }` + } + > + {opt} + + ))} + +
+
{/* Loggerintervall/Speicherintervall */} diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx index 6139888..40e24ad 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx @@ -241,7 +241,7 @@ const LoopChartActionBar: React.FC = () => { selected ? "bg-littwin-blue text-white" : active - ? "bg-blue-100" + ? "bg-gray-200" : "" }` } @@ -304,7 +304,7 @@ const LoopChartActionBar: React.FC = () => { selected ? "bg-littwin-blue text-white" : active - ? "bg-blue-100" + ? "bg-gray-200" : "" }` } diff --git a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx index e9a3db7..6390e30 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/KueEinstellung.tsx @@ -14,6 +14,7 @@ import { closeConfirmModal, } from "@/redux/slices/confirmModalSlice"; import { startFirmwareUpdateThunk } from "@/redux/thunks/startFirmwareUpdateThunk"; +import { Listbox } from "@headlessui/react"; interface Props { slot: number; @@ -175,18 +176,52 @@ export default function KueEinstellung({ {/* Speicherintervall */}
- +
+ + + {memoryIntervalOptions.find( + (opt) => String(opt.value) === formData.memoryInterval + )?.label ?? "Speicherintervall wählen"} + + + + + + + {memoryIntervalOptions.map((opt) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white font-medium" + : active + ? "bg-gray-200" + : "text-gray-900" + }` + } + > + {opt.label} + + ))} + +
+
+ {/* Isolationsmessung */}

Isolationsmessung

diff --git a/components/main/system/DetailModal.tsx b/components/main/system/DetailModal.tsx index a7e72c2..4a9cdb7 100644 --- a/components/main/system/DetailModal.tsx +++ b/components/main/system/DetailModal.tsx @@ -115,7 +115,7 @@ export const DetailModal = ({ selected ? "bg-littwin-blue text-white" : active - ? "bg-blue-100" + ? "bg-gray-200" : "" }` } diff --git a/package-lock.json b/package-lock.json index c774b2c..25a7b28 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.556", + "version": "1.6.557", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.556", + "version": "1.6.557", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 77fe1a0..b87db32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.556", + "version": "1.6.557", "private": true, "scripts": { "dev": "next dev", diff --git a/styles/globals.css b/styles/globals.css index 142970d..0c8271f 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -60,3 +60,13 @@ body { .custom-datepicker-popper { z-index: 9999 !important; /* Maximale Priorität */ } + +html { + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} +.dropdown-text-fix { + -webkit-font-smoothing: antialiased !important; + -moz-osx-font-smoothing: grayscale !important; + transform: translateZ(0); /* For some Chromium bugs */ +}