KÜ: Button Messkurve ist abhängig von der Anzeige. Darstellung noch ein wenig verwirrend. Evtl. so besser:
This commit is contained in:
@@ -264,9 +264,61 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
{kueVersion}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex mt-3 space-x-[0.063rem] ">
|
||||
<button
|
||||
onClick={() =>
|
||||
handleButtonClick(
|
||||
"Schleife",
|
||||
setActiveButton,
|
||||
setloopTitleText,
|
||||
(value) =>
|
||||
setLoopDisplayValue(
|
||||
typeof value === "number" ? value : Number(value)
|
||||
), // Hier sicherstellen, dass nur number übergeben wird
|
||||
Number(schleifenwiderstand), // <- Stelle sicher, dass es eine Zahl ist
|
||||
tdrLocation,
|
||||
slotIndex,
|
||||
dispatch
|
||||
)
|
||||
}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
activeButton === "Schleife" ? "bg-littwin-blue" : "bg-gray-400"
|
||||
}`}
|
||||
>
|
||||
Schleife
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
setActiveButton("TDR");
|
||||
setloopTitleText("Entfernung [Km]");
|
||||
|
||||
const latestTdrDistanceMeters =
|
||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
||||
tdmChartData[slotIndex].length > 0 &&
|
||||
typeof tdmChartData[slotIndex][0].d === "number"
|
||||
? tdmChartData[slotIndex][0].d
|
||||
: 0;
|
||||
|
||||
const latestTdrDistance = Number(
|
||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
||||
);
|
||||
setLoopDisplayValue(latestTdrDistance);
|
||||
}}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
? "bg-gray-200 cursor-not-allowed" // Deaktiviert: Hellgrau
|
||||
: activeButton === "TDR"
|
||||
? "bg-littwin-blue" // Aktiviert: Littwin Blau
|
||||
: "bg-gray-400" // Nicht geklickt: Dunkelgrau
|
||||
}`}
|
||||
disabled={Array.isArray(tdrActive) && tdrActive[slotIndex] === 0} // Button deaktiviert, wenn TDR für diesen Slot nicht aktiv ist
|
||||
>
|
||||
TDR
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* loopDisplay: Zeigt Schleifenwiderstand oder TDR-Distanz an, je nach Modus */}
|
||||
<div className="absolute bottom-[0.063rem] left-[0.068rem] w-[7.074rem] h-[8.125rem] 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-[6.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>
|
||||
@@ -290,63 +342,6 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex mt-1 space-x-[0.063rem] ">
|
||||
<button
|
||||
onClick={() =>
|
||||
handleButtonClick(
|
||||
"Schleife",
|
||||
setActiveButton,
|
||||
setloopTitleText,
|
||||
(value) =>
|
||||
setLoopDisplayValue(
|
||||
typeof value === "number" ? value : Number(value)
|
||||
), // Hier sicherstellen, dass nur number übergeben wird
|
||||
Number(schleifenwiderstand), // <- Stelle sicher, dass es eine Zahl ist
|
||||
tdrLocation,
|
||||
slotIndex,
|
||||
dispatch
|
||||
)
|
||||
}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
activeButton === "Schleife"
|
||||
? "bg-littwin-blue"
|
||||
: "bg-gray-400"
|
||||
}`}
|
||||
>
|
||||
Schleife
|
||||
</button>
|
||||
<button
|
||||
onClick={() => {
|
||||
setActiveButton("TDR");
|
||||
setloopTitleText("Entfernung [Km]");
|
||||
|
||||
const latestTdrDistanceMeters =
|
||||
Array.isArray(tdmChartData?.[slotIndex]) &&
|
||||
tdmChartData[slotIndex].length > 0 &&
|
||||
typeof tdmChartData[slotIndex][0].d === "number"
|
||||
? tdmChartData[slotIndex][0].d
|
||||
: 0;
|
||||
|
||||
const latestTdrDistance = Number(
|
||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
||||
);
|
||||
setLoopDisplayValue(latestTdrDistance);
|
||||
}}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
? "bg-gray-200 cursor-not-allowed" // Deaktiviert: Hellgrau
|
||||
: activeButton === "TDR"
|
||||
? "bg-littwin-blue" // Aktiviert: Littwin Blau
|
||||
: "bg-gray-400" // Nicht geklickt: Dunkelgrau
|
||||
}`}
|
||||
disabled={
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
} // Button deaktiviert, wenn TDR für diesen Slot nicht aktiv ist
|
||||
>
|
||||
TDR
|
||||
</button>
|
||||
</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]"
|
||||
|
||||
@@ -6,5 +6,5 @@
|
||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||
|
||||
*/
|
||||
const webVersion = "1.6.234";
|
||||
const webVersion = "1.6.235";
|
||||
export default webVersion;
|
||||
|
||||
Reference in New Issue
Block a user