refactor: Admin-Status direkt aus Redux ausgelesen und Props entfernt
- isAdminLoggedIn wird jetzt direkt aus authSlice im Redux-Store gelesen - useAdminAuth und Prop-Weitergabe entfernt - Flackern des Firmware-Buttons dauerhaft behoben - Codestruktur vereinfacht und stabilisiert
This commit is contained in:
@@ -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.519
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.520
|
||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||
|
||||
|
||||
@@ -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.519
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.520
|
||||
NEXT_PUBLIC_CPL_MODE=production
|
||||
10
CHANGELOG.md
10
CHANGELOG.md
@@ -1,3 +1,13 @@
|
||||
## [1.6.520] – 2025-07-02
|
||||
|
||||
- refactor: Admin-Status direkt aus Redux ausgelesen und Props entfernt
|
||||
|
||||
- isAdminLoggedIn wird jetzt direkt aus authSlice im Redux-Store gelesen
|
||||
- useAdminAuth und Prop-Weitergabe entfernt
|
||||
- Flackern des Firmware-Buttons dauerhaft behoben
|
||||
- Codestruktur vereinfacht und stabilisiert
|
||||
|
||||
---
|
||||
## [1.6.519] – 2025-07-02
|
||||
|
||||
- fix: Firmware-Update-Button stabilisiert und Flackern entfernt
|
||||
|
||||
@@ -4,7 +4,6 @@ import ReactModal from "react-modal";
|
||||
import KueEinstellung from "./KueEinstellung";
|
||||
import TdrEinstellung from "./TdrEinstellung";
|
||||
import Knotenpunkte from "./Knotenpunkte";
|
||||
import { useAdminAuth } from "@/components/main/settingsPageComponents/hooks/useAdminAuth";
|
||||
|
||||
interface KueModalProps {
|
||||
showModal: boolean;
|
||||
@@ -21,9 +20,6 @@ declare global {
|
||||
}
|
||||
|
||||
export default function KueModal({ showModal, onClose, slot }: KueModalProps) {
|
||||
const { isAdminLoggedIn: reduxIsAdminLoggedIn } = useAdminAuth(true);
|
||||
const [isAdminLoggedIn] = useState(() => reduxIsAdminLoggedIn); // stabil, flackerfrei
|
||||
|
||||
const [activeTab, setActiveTab] = useState<"kue" | "tdr" | "knoten">(() => {
|
||||
if (typeof window !== "undefined" && window.__lastKueTab) {
|
||||
return window.__lastKueTab;
|
||||
@@ -106,7 +102,6 @@ export default function KueModal({ showModal, onClose, slot }: KueModalProps) {
|
||||
showModal={showModal}
|
||||
onModulNameChange={(id) => console.log("Modulname geändert:", id)}
|
||||
onClose={onClose}
|
||||
isAdminLoggedIn={isAdminLoggedIn} // Neue
|
||||
/>
|
||||
)}
|
||||
{activeTab === "tdr" && (
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.519",
|
||||
"version": "1.6.520",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.519",
|
||||
"version": "1.6.520",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@iconify-icons/ri": "^1.2.10",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.519",
|
||||
"version": "1.6.520",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user