From 0f233ce6e26a70f69d69367c26b12cb419fc42fd Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 8 Jul 2025 10:41:20 +0200 Subject: [PATCH] fix: sofortige visuelle Aktivierung der Navigationsbuttons beim Klick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - activeLink direkt beim Klick auf Link setzen, statt auf usePathname zu warten - verbessert visuelles Feedback bei Navigation - behebt kurze Verzögerung beim Wechsel der aktiven Navigation --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 5 +++++ components/navigation/Navigation.tsx | 21 +++++++++++---------- package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 21 insertions(+), 15 deletions(-) diff --git a/.env.development b/.env.development index 8ddfcdd..87ffeeb 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.559 +NEXT_PUBLIC_APP_VERSION=1.6.560 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 a0f2144..6bb692d 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.559 +NEXT_PUBLIC_APP_VERSION=1.6.560 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 52508a5..0751140 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.560] – 2025-07-08 + +- feat: Verwende fetch statt window.location.href für Digitalausgang-Schalteraktionen + +--- ## [1.6.559] – 2025-07-08 - circle Button diff --git a/components/navigation/Navigation.tsx b/components/navigation/Navigation.tsx index d82059e..97b76c9 100644 --- a/components/navigation/Navigation.tsx +++ b/components/navigation/Navigation.tsx @@ -45,16 +45,17 @@ const Navigation: React.FC = ({ className }) => { {item.name} ) : ( - -
- {item.name} -
+ setActiveLink(item.path)} // Sofortige visuelle Rückmeldung + className={`block px-4 py-2 mb-4 font-bold whitespace-nowrap transition duration-300 text-[1rem] sm:text-[1rem] md:text-[1rem] lg:text-[1rem] xl:text-sm 2xl:text-lg ${ + activeLink.startsWith(item.path) + ? "bg-sky-500 text-white rounded-r-full xl:mr-4 xl:w-full" + : "text-black hover:bg-gray-200 rounded-r-full" + }`} + > + {item.name} )} diff --git a/package-lock.json b/package-lock.json index 44e75e1..ada991b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.559", + "version": "1.6.560", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.559", + "version": "1.6.560", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 316677c..5eddb24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.559", + "version": "1.6.560", "private": true, "scripts": { "dev": "next dev",