feat: Overlay nicht über die Seite sondern nur über den KÜ Slot wenn ein Event kommt

This commit is contained in:
ISA
2025-08-13 14:54:19 +02:00
parent 6da0408140
commit 7bc13505b2
9 changed files with 144 additions and 9 deletions

View File

@@ -14,6 +14,7 @@ import { store } from "@/redux/store";
import Script from "next/script";
import DeviceEventsBridge from "@/components/common/DeviceEventsBridge";
import GlobalActivityOverlay from "@/components/common/GlobalActivityOverlay";
import { usePathname } from "next/navigation";
// Thunks importieren
import { getKueDataThunk } from "@/redux/thunks/getKueDataThunk";
@@ -67,6 +68,7 @@ function AppContent({
pageProps: AppProps["pageProps"];
}): JSX.Element {
const dispatch = useAppDispatch();
const pathnameHook = usePathname();
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)
@@ -160,7 +162,10 @@ function AppContent({
)}
<Component {...pageProps} />
<ToastContainer position="top-right" autoClose={3000} />
<GlobalActivityOverlay />
{/* Hide global overlay on kabelueberwachung page so only per-slot overlays show */}
{pathnameHook?.includes("kabelueberwachung") ? null : (
<GlobalActivityOverlay />
)}
</main>
</div>
<Footer />