Analoge Eingänge

This commit is contained in:
Ismail Ali
2025-03-23 16:12:24 +01:00
parent e88233302b
commit 39f3dbfb6c
2 changed files with 47 additions and 29 deletions

View File

@@ -35,10 +35,12 @@ export default function AnalogeEingaengeTable() {
<th className="border p-1 text-left">Eingang</th>
<th className="border p-3 text-left">Wert</th>
<th className="border p-3 text-left">Bezeichnung</th>
{/*
<th className="border p-3 text-center">uW</th>
<th className="border p-3 text-center">uG</th>
<th className="border p-3 text-center">oW</th>
<th className="border p-3 text-center">oG</th>
*/}
<th className="border p-3 text-center">Einstellung</th>
</tr>
</thead>
@@ -51,7 +53,8 @@ export default function AnalogeEingaengeTable() {
<td className="border p-3">{eingang.id ?? "-"}</td>
<td className="border p-3">{eingang.value ?? "-"}</td>
<td className="border p-3">{eingang.name || "----"}</td>
<td className="border p-3 text-center">
{/*
<td className="border p-3 text-center">
{eingang.uW ? "🟢" : "⚪"}
</td>
<td className="border p-3 text-center">
@@ -63,10 +66,12 @@ export default function AnalogeEingaengeTable() {
<td className="border p-3 text-center">
{eingang.oG ? "🟢" : "⚪"}
</td>
*/}
<td className="border p-3 text-center">
<button
onClick={() => openSettingsModal(eingang)}
className="bg-blue-500 text-white text-xs px-2 py-1 rounded hover:bg-blue-600 transition"
className=" text-white text-xs px-2 py-1 rounded hover:bg-blue-500 transition"
>
</button>
@@ -81,38 +86,51 @@ export default function AnalogeEingaengeTable() {
{/* Modal */}
{selectedEingang && (
<div className="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-50">
<div className="bg-white p-6 rounded-lg shadow-lg w-3/4 max-w-3xl">
<div className="flex justify-between items-center border-b pb-2">
<h2 className="text-lg font-bold text-gray-700">
Analoge Eingänge Einstellungen
<div className="bg-white p-6 rounded-lg shadow-lg w-1/2 max-w-xl">
<div className="border-b pb-2 mb-4">
<h2 className="text-xl font-bold text-blue-500">
Analoger Eingang {selectedEingang.id}
</h2>
<button onClick={closeSettingsModal} className="text-gray-500">
</button>
</div>
<div className="mt-4">
<label className="block text-sm text-gray-700">Eingang:</label>
<input
type="text"
className="w-full border px-2 py-1 rounded"
value={selectedEingang.id}
readOnly
/>
<div className="grid grid-cols-2 gap-x-4 gap-y-2">
<div>
<strong>Name:</strong>
</div>
<div>{selectedEingang.name}</div>
<label className="block text-sm text-gray-700 mt-2">
Bezeichnung:
</label>
<input
type="text"
className="w-full border px-2 py-1 rounded"
defaultValue={selectedEingang.name}
/>
<div>
<strong>Einheit:</strong>
</div>
<div>{selectedEingang.einheit}</div>
<div>
<strong>Faktor:</strong>
</div>
<div>{selectedEingang.faktor}</div>
<div>
<strong>Offset:</strong>
</div>
<div>{selectedEingang.offset}</div>
<div>
<strong>Gewichtung:</strong>
</div>
<div>{selectedEingang.gewichtung}</div>
<div>
<strong>Loggerinterval:</strong>
</div>
<div>{selectedEingang.loggerinterval} Minuten</div>
</div>
<div className="flex justify-end mt-4">
<button className="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">
💾 Speichern
<div className="flex justify-end mt-6">
<button
onClick={closeSettingsModal}
className="px-4 py-2 bg-blue-500 hover:bg-blue-600 text-white rounded-lg transition"
>
Schließen
</button>
</div>
</div>

View File

@@ -6,5 +6,5 @@
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
*/
const webVersion = "1.6.147";
const webVersion = "1.6.148";
export default webVersion;