feat: Isowert und Schleifenwiderstanf in schwarzen Display zusammen

This commit is contained in:
ISA
2025-07-24 08:25:52 +02:00
parent 628cbc405e
commit 357fb6c816
6 changed files with 58 additions and 24 deletions

View File

@@ -220,9 +220,9 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
</div>
</div>
{/* Anzeige des Isolation */}
<div className="relative mt-[3.125rem] mx-auto bg-black text-white w-[6.25rem] h-[2.5rem] flex items-center justify-center text-[1.125rem] z-10">
<div className="text-center">
{/* Anzeige des Isolation und Schleifenwiderstand zusammen */}
<div className="relative mt-[3.125rem] mx-auto bg-black text-white w-[6.25rem] h-[3.1rem] flex flex-col items-center justify-center z-10 p-1">
<div className="text-center w-full">
<span
className={
Number(kuePSTmMinus96V?.[slotIndex]) === 1 ||
@@ -230,9 +230,9 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
Number(kueGroundFault?.[slotIndex]) === 1 ||
Number(kueAlarm1?.[slotIndex]) === 1 ||
Number(kueAlarm2?.[slotIndex]) === 1
? "text-red-500 text-[0.875rem]"
? "text-red-500 text-[0.65rem]"
: Number(kueOverflow?.[slotIndex]) === 1
? "text-white text-[0.875rem]"
? "text-white text-[0.65rem]"
: ""
}
>
@@ -244,27 +244,43 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
"Erdschluss"
) : Number(kueAlarm1?.[slotIndex]) === 1 ? (
<div>
<span className="text-[0.65rem] block">
<span className="text-[0.55rem] block">
Isolationsfehler
</span>
<span className="text-[0.65rem] block">
<span className="text-[0.55rem] block">
{isoDisplayValue} MOhm
</span>
</div>
) : Number(kueAlarm2?.[slotIndex]) === 1 ? (
"Schleifenfehler"
) : (
isoDisplayValue
<>
<span className="block text-[0.7rem] font-semibold">
<span className="block text-[0.6rem] text-gray-300">
ISO: {" "}
{isoDisplayValue} MOhm
</span>
</span>
</>
)}
</span>
{/* Schleifenwiderstand immer anzeigen, außer bei Fehlern */}
{![
Number(kuePSTmMinus96V?.[slotIndex]),
Number(kueCableBreak?.[slotIndex]),
Number(kueGroundFault?.[slotIndex]),
Number(kueAlarm1?.[slotIndex]),
Number(kueAlarm2?.[slotIndex]),
].includes(1) && <div className="text-[0.5rem]">ISO MOhm</div>}
].includes(1) && (
<>
<span className="block text-[0.7rem] mt-1 font-semibold">
<span className="block text-[0.6rem] text-gray-300">
Sch.: {" "}
{loopDisplayValue} kOhm
</span>
</span>
</>
)}
</div>
</div>
@@ -333,7 +349,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
</div>
{/* loopDisplay: Zeigt Schleifenwiderstand oder TDR-Distanz an, je nach Modus */}
<div className="absolute bottom-[0.063rem] left-[0.068rem] w-[7.074rem] h-[6.1rem] bg-gray-300 border-[0.094rem] border-gray-400 p-[0.063rem]">
<div className="absolute bottom-[0.063rem] left-[0.068rem] w-[7.074rem] h-[4.1rem] bg-gray-300 border-[0.094rem] border-gray-400 p-[0.063rem]">
<span className="text-black text-[0.438rem] absolute top-[0.125rem] left-[0.063rem] mt-1">
{loopTitleText}
</span>
@@ -357,12 +373,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
</div>
</div>
<button
onClick={openChartModal} // Öffnet das Chart-Modal
className="w-full h-[1.563rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center mt-[0.063rem]"
>
Messkurve
</button>
{/* Messkurven-Button moved below the module */}
{/* Sensoren anzeigen */}
{
/* if Kabelüberwachungsmodul online (kue_online ) */
@@ -375,7 +386,23 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
</div>
{/* Modal für Einstellungen */}
</>
) : (
<div className="flex items-center justify-center h-full text-gray-500">
{/* Das soll rausgenommen werden
<p>Kein Modul im Slot {slotIndex + 0}</p>
*/}
</div>
)}
{/* Messkurven-Button unter dem Modul */}
{kueOnline === 1 && (
<>
<button
onClick={openChartModal}
className="w-full h-[1.863rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center mt-2"
>
Messkurve
</button>
{/* Modal für Messkurve */}
{showChartModal && (
<ChartSwitcher
@@ -385,7 +412,9 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
/>
)}
</>
) : (
)}
{/* Offline-View */}
{kueOnline !== 1 && (
<div className="flex items-center justify-center h-full text-gray-500">
{/* Das soll rausgenommen werden
<p>Kein Modul im Slot {slotIndex + 0}</p>