feat: Favicon und Seitentitel hinzugefügt und korrekt eingebunden

- Favicon im Tab durch eigenes ersetzt
- Seitentitel auf "Littwin Systemtechnik GmbH & Co. KG" gesetzt
This commit is contained in:
ISA
2024-10-24 09:50:13 +02:00
parent e243122bf1
commit 6cd347a6c4
10 changed files with 67 additions and 68 deletions

1
.env.development Normal file
View File

@@ -0,0 +1 @@
NEXT_PUBLIC_NODE_ENV=development

View File

@@ -1 +0,0 @@
NEXT_PUBLIC_NODE_ENV=development

1
.env.production Normal file
View File

@@ -0,0 +1 @@
NEXT_PUBLIC_NODE_ENV=production

View File

@@ -100,7 +100,7 @@ function Dashboard() {
useEffect(() => { useEffect(() => {
loadWindowVariables() loadWindowVariables()
.then(() => { .then(() => {
console.log("kueOnline Data: ", window.kueOnline); // Debug: Ausgabe von kueOnline // console.log("kueOnline Data: ", window.kueOnline); // Debug: Ausgabe von kueOnline
if (window.kueOnline) { if (window.kueOnline) {
if (Array.isArray(window.kueOnline)) { if (Array.isArray(window.kueOnline)) {
@@ -126,11 +126,11 @@ function Dashboard() {
loadWindowVariables() loadWindowVariables()
.then(() => { .then(() => {
// Debug-Ausgaben für kueAlarm1 und kueAlarm2 // Debug-Ausgaben für kueAlarm1 und kueAlarm2
console.log("kueAlarm1 Data: ", window.kueAlarm1); //console.log("kueAlarm1 Data: ", window.kueAlarm1);
console.log("kueAlarm2 Data: ", window.kueAlarm2); //console.log("kueAlarm2 Data: ", window.kueAlarm2);
if (window.kueAlarm1 && Array.isArray(window.kueAlarm1)) { if (window.kueAlarm1 && Array.isArray(window.kueAlarm1)) {
console.log("kueAlarm1 ist ein Array:", window.kueAlarm1); //console.log("kueAlarm1 ist ein Array:", window.kueAlarm1);
} else { } else {
console.error("kueAlarm1 ist kein Array oder nicht definiert."); console.error("kueAlarm1 ist kein Array oder nicht definiert.");
setError( setError(
@@ -139,7 +139,7 @@ function Dashboard() {
} }
if (window.kueAlarm2 && Array.isArray(window.kueAlarm2)) { if (window.kueAlarm2 && Array.isArray(window.kueAlarm2)) {
console.log("kueAlarm2 ist ein Array:", window.kueAlarm2); //console.log("kueAlarm2 ist ein Array:", window.kueAlarm2);
} else { } else {
console.error("kueAlarm2 ist kein Array oder nicht definiert."); console.error("kueAlarm2 ist kein Array oder nicht definiert.");
setError( setError(

View File

@@ -55,10 +55,10 @@ function Kabelueberwachung() {
rack4: allModules.slice(24, 32), rack4: allModules.slice(24, 32),
}; };
// Log the racks in the console for debugging // Log the racks in the console for debugging
console.log("Rack 1:", racks.rack1); /* console.log("Rack 1:", racks.rack1);
console.log("Rack 2:", racks.rack2); console.log("Rack 2:", racks.rack2);
console.log("Rack 3:", racks.rack3); console.log("Rack 3:", racks.rack3);
console.log("Rack 4:", racks.rack4); console.log("Rack 4:", racks.rack4); */
// Function to handle rack change // Function to handle rack change
const changeRack = (rack) => { const changeRack = (rack) => {
@@ -149,10 +149,9 @@ function Kabelueberwachung() {
alarmStatus={alarmStatus} // Pass the calculated alarm status alarmStatus={alarmStatus} // Pass the calculated alarm status
slotIndex={slotIndex} slotIndex={slotIndex}
/> />
{console.log( {/*
`Module Data (Rack ${activeRack}, Slot ${index + 1}):`, console.log(`Module Data (Rack ${activeRack}, Slot ${index + 1}):`,slot);
slot */}
)}
</div> </div>
); );
})} })}

View File

@@ -11,6 +11,9 @@ export default function RootLayout({ children }) {
<html lang="de"> <html lang="de">
<head> <head>
{/* Hier können Meta-Tags oder Links für CSS hinzugefügt werden */} {/* Hier können Meta-Tags oder Links für CSS hinzugefügt werden */}
<link rel="icon" href="/favicon.png" type="image/png" />
<title>Littwin Systemtechnik GmbH & Co. KG</title>
</head> </head>
<body> <body>
{/* Hier das Layout mit Header, Navigation und Footer */} {/* Hier das Layout mit Header, Navigation und Footer */}

View File

@@ -34,9 +34,6 @@ function Header() {
loadWindowVariables() loadWindowVariables()
.then(() => { .then(() => {
// Überprüfe, ob die erwarteten Variablen verfügbar sind
console.log("Window-Variablen geladen:", window);
if (window.ip) { if (window.ip) {
setStationsname(window.deviceName || "Unbekannt"); setStationsname(window.deviceName || "Unbekannt");
setCplStatus(window.hardware_version || "Unbekannt"); setCplStatus(window.hardware_version || "Unbekannt");
@@ -49,6 +46,56 @@ function Header() {
}); });
} }
}, [isClient]); }, [isClient]);
useEffect(() => {
if (typeof window !== "undefined") {
console.log("Systemvariablen geladen:", {
// last20Messages.acp
last20Messages: window.last20Messages,
// System.acp Variablen
deviceName: window.deviceName,
mac1: window.mac1,
mac2: window.mac2,
ip: window.ip,
subnet: window.subnet,
gateway: window.gateway,
datetime: window.datetime,
// de.acp Variablen
de: window.de,
counter: window.counter,
flutter: window.flutter,
// kueConfig.acp Variablen
kueOnline: window.kueOnline,
kueID: window.kueID,
//kueIso: window.kueIso, von SERVICE/kueConfig.acp also von window.kueIso
// kuedetail.acp Variablen
kueValid: window.kueValid,
kueAlarm1: window.kueAlarm1,
kueAlarm2: window.kueAlarm2,
kueRes: window.kueRes,
kueCableBreak: window.kueCableBreak,
kueGroundFault: window.kueGroundFault,
kueLimit1: window.kueLimit1,
kueLimit2Low: window.kueLimit2Low,
kueLimit2High: window.kueLimit2High,
kueDelay1: window.kueDelay1,
kueLoopInterval: window.kueLoopInterval,
kueVersion: window.kueVersion,
tdrAtten: window.tdrAtten,
tdrPulse: window.tdrPulse,
tdrSpeed: window.tdrSpeed,
tdrAmp: window.tdrAmp,
tdrTrigger: window.tdrTrigger,
tdrLocation: window.tdrLocation,
tdrActive: window.tdrActive,
kueOverflow: window.kueOverflow,
kue100V: window.kue100V,
kueResidence: window.kueResidence,
tdrLastMeasurement: window.tdrLastMeasurement,
kueBooting: window.kueBooting,
appVersion: window.appVersion,
});
}
}, []);
useEffect(() => { useEffect(() => {
if (isClient) { if (isClient) {

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -4,12 +4,8 @@
<head> <head>
<title>Abmeldung</title> <title>Abmeldung</title>
<meta charset="utf-8"> <meta charset="utf-8">
<link rel="stylesheet" href="../css/ie.css"> <link rel="icon" sizes="48x48" href="favicon.png" type="image/png">
<link rel="icon" sizes="48x48" href="./IMAGES/favicon-48x48.png" type="image/png">
<!-- Foundation Framework CSS -->
<link rel="stylesheet" href="css/app.css" />
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/foundation-icons.css" />
<style> <style>
/* Text zentrieren und fett machen */ /* Text zentrieren und fett machen */

View File

@@ -31,53 +31,6 @@ export async function loadWindowVariables() {
.then(() => { .then(() => {
// Prüfen, ob alle Variablen verfügbar sind und sie in die Konsole ausgeben // Prüfen, ob alle Variablen verfügbar sind und sie in die Konsole ausgeben
if (window.last20Messages) { if (window.last20Messages) {
console.log("Systemvariablen geladen:", {
// last20Messages.acp
last20Messages: window.last20Messages,
// System.acp Variablen
deviceName: window.deviceName,
mac1: window.mac1,
mac2: window.mac2,
ip: window.ip,
subnet: window.subnet,
gateway: window.gateway,
datetime: window.datetime,
// de.acp Variablen
de: window.de,
counter: window.counter,
flutter: window.flutter,
// kueConfig.acp Variablen
kueOnline: window.kueOnline,
kueID: window.kueID,
//kueIso: window.kueIso, von SERVICE/kueConfig.acp also von window.kueIso
// kuedetail.acp Variablen
kueValid: window.kueValid,
kueAlarm1: window.kueAlarm1,
kueAlarm2: window.kueAlarm2,
kueRes: window.kueRes,
kueCableBreak: window.kueCableBreak,
kueGroundFault: window.kueGroundFault,
kueLimit1: window.kueLimit1,
kueLimit2Low: window.kueLimit2Low,
kueLimit2High: window.kueLimit2High,
kueDelay1: window.kueDelay1,
kueLoopInterval: window.kueLoopInterval,
kueVersion: window.kueVersion,
tdrAtten: window.tdrAtten,
tdrPulse: window.tdrPulse,
tdrSpeed: window.tdrSpeed,
tdrAmp: window.tdrAmp,
tdrTrigger: window.tdrTrigger,
tdrLocation: window.tdrLocation,
tdrActive: window.tdrActive,
kueOverflow: window.kueOverflow,
kue100V: window.kue100V,
kueResidence: window.kueResidence,
tdrLastMeasurement: window.tdrLastMeasurement,
kueBooting: window.kueBooting,
appVersion: window.appVersion,
});
resolve(); resolve();
} else { } else {
reject(new Error("Konnte last20Messages nicht finden.")); reject(new Error("Konnte last20Messages nicht finden."));