feat: Schaltausgänge dark und light mode

This commit is contained in:
ISA
2025-08-18 16:13:46 +02:00
parent 6036c48332
commit 3a9543f7a7
6 changed files with 37 additions and 19 deletions

View File

@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
NEXT_PUBLIC_EXPORT_STATIC=false NEXT_PUBLIC_EXPORT_STATIC=false
NEXT_PUBLIC_USE_CGI=false NEXT_PUBLIC_USE_CGI=false
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.744 NEXT_PUBLIC_APP_VERSION=1.6.745
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)

View File

@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
NEXT_PUBLIC_EXPORT_STATIC=true NEXT_PUBLIC_EXPORT_STATIC=true
NEXT_PUBLIC_USE_CGI=true NEXT_PUBLIC_USE_CGI=true
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.6.744 NEXT_PUBLIC_APP_VERSION=1.6.745
NEXT_PUBLIC_CPL_MODE=production NEXT_PUBLIC_CPL_MODE=production

View File

@@ -1,3 +1,8 @@
## [1.6.745] 2025-08-18
- feat: Messwerteingänge light und dark mode
---
## [1.6.744] 2025-08-18 ## [1.6.744] 2025-08-18
- feat: Berichte light und dark mode - feat: Berichte light und dark mode

View File

@@ -66,7 +66,7 @@ export default function DigitalOutputsWidget({
}; };
return ( return (
<div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full h-fit max-h-[400px] overflow-auto"> <div className="bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100 shadow-md border border-gray-200 dark:border-gray-700 p-3 rounded-lg w-full h-fit max-h-[400px] overflow-auto">
<h2 className="laptop:text-sm md:text-base 2xl:text-lg font-bold mb-3 flex items-center"> <h2 className="laptop:text-sm md:text-base 2xl:text-lg font-bold mb-3 flex items-center">
<Icon <Icon
icon={outputIcon} icon={outputIcon}
@@ -74,41 +74,54 @@ export default function DigitalOutputsWidget({
/> />
Schaltausgänge Schaltausgänge
</h2> </h2>
<table className="w-full text-xs laptop:text-[10px] xl:text-xs 2xl:text-sm border-collapse bg-white rounded-lg"> <table className="w-full text-xs laptop:text-[10px] xl:text-xs 2xl:text-sm border-collapse bg-white dark:bg-gray-900 rounded-lg">
<thead className="bg-gray-100 border-b"> <thead className="bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100 border-b">
<tr> <tr>
<th className="px-1 py-1 text-left">Ausgang</th> <th className="px-1 py-1 text-left bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
<th className="px-1 py-1 text-left">Bezeichnung</th> Ausgang
<th className="px-1 py-1 text-left">Schalter</th> </th>
<th className="px-1 py-1 text-left">Aktion</th> <th className="px-1 py-1 text-left bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
Bezeichnung
</th>
<th className="px-1 py-1 text-left bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
Schalter
</th>
<th className="px-1 py-1 text-left bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
Aktion
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{digitalOutputs.map((output) => ( {digitalOutputs.map((output) => (
<tr key={output.id} className="border-b hover:bg-gray-200"> <tr
<td className="flex items-center px-1 py-1"> key={output.id}
className="border-b hover:bg-gray-100 dark:hover:bg-gray-800"
>
<td className="flex items-center px-1 py-1 bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
<Icon <Icon
icon={outputIcon} icon={outputIcon}
className="text-gray-600 mr-1 text-base" className="text-gray-600 mr-1 text-base"
/> />
{output.id} {output.id}
</td> </td>
<td className="px-1 py-1">{output.label}</td> <td className="px-1 py-1 bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
<td className="px-1 py-1"> {output.label}
</td>
<td className="px-1 py-1 bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
<Icon <Icon
icon={switchIcon} icon={switchIcon}
className={`cursor-pointer text-base transition ${ className={`cursor-pointer text-base transition ${
output.status output.status
? "text-littwin-blue" ? "text-littwin-blue"
: "text-gray-500 scale-x-[-1]" : "text-gray-500 scale-x-[-1]"
}`} } dark:hover:text-littwin-blue`}
onClick={() => handleToggle(output.id)} onClick={() => handleToggle(output.id)}
/> />
</td> </td>
<td className="px-1 py-1"> <td className="px-1 py-1 bg-white text-gray-900 dark:bg-gray-900 dark:text-gray-100">
<Icon <Icon
icon={settingsIcon} icon={settingsIcon}
className="text-gray-400 text-base cursor-pointer" className="text-gray-400 text-base cursor-pointer dark:text-gray-300 dark:hover:text-white"
onClick={() => openOutputModal(output)} onClick={() => openOutputModal(output)}
/> />
</td> </td>

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "cpl-v4", "name": "cpl-v4",
"version": "1.6.744", "version": "1.6.745",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "cpl-v4", "name": "cpl-v4",
"version": "1.6.744", "version": "1.6.745",
"dependencies": { "dependencies": {
"@fontsource/roboto": "^5.1.0", "@fontsource/roboto": "^5.1.0",
"@headlessui/react": "^2.2.4", "@headlessui/react": "^2.2.4",

View File

@@ -1,6 +1,6 @@
{ {
"name": "cpl-v4", "name": "cpl-v4",
"version": "1.6.744", "version": "1.6.745",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",