fix: Alle Icons in digitalen Ein- und Ausgängen lokal eingebunden
- Icons input, login, output und switch lokal installiert und verwendet - Keine Internet-Abhängigkeit mehr für Icon-Anzeige - Projekt ist vollständig offlinefähig
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
"use client";
|
||||
// /components/main/einausgaenge/DigitalInputs.tsx
|
||||
import React from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState } from "../../../redux/store";
|
||||
import { Icon } from "@iconify/react";
|
||||
import settingsIcon from "@iconify/icons-mdi/settings";
|
||||
import inputIcon from "@iconify/icons-mdi/input";
|
||||
import loginIcon from "@iconify/icons-mdi/login";
|
||||
|
||||
type Props = {
|
||||
openInputModal: (input: any) => void;
|
||||
@@ -21,7 +24,7 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
|
||||
<div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full">
|
||||
<h2 className="text-sm font-bold mb-3 flex items-center laptop:text-xs">
|
||||
<Icon
|
||||
icon="mdi:input"
|
||||
icon={inputIcon}
|
||||
className="text-littwin-blue mr-2 text-xl laptop:text-lg"
|
||||
/>
|
||||
Meldungseingänge {inputRange.start + 1} – {inputRange.end}
|
||||
@@ -48,7 +51,7 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
|
||||
<tr key={input.id} className="border-b">
|
||||
<td className="flex items-center px-1 py-1 laptop:px-0.5 laptop:py-0.5">
|
||||
<Icon
|
||||
icon="mdi:login"
|
||||
icon={loginIcon}
|
||||
className="text-gray-600 mr-1 text-base laptop:text-sm"
|
||||
/>
|
||||
{input.id}
|
||||
@@ -89,7 +92,7 @@ export default function DigitalInputs({ openInputModal, inputRange }: Props) {
|
||||
</td>
|
||||
<td className="px-1 py-1 laptop:px-0.5 laptop:py-0.5">
|
||||
<Icon
|
||||
icon="mdi:settings"
|
||||
icon={settingsIcon}
|
||||
className="text-gray-400 text-base cursor-pointer"
|
||||
onClick={() => openInputModal(input)}
|
||||
/>
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
"use client"; // /components/main/einausgaenge/DigitalOutputs.tsx
|
||||
import React from "react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { useSelector } from "react-redux";
|
||||
import { RootState } from "../../../redux/store";
|
||||
import { Icon } from "@iconify/react";
|
||||
import settingsIcon from "@iconify/icons-mdi/settings";
|
||||
import outputIcon from "@iconify/icons-mdi/output";
|
||||
import switchIcon from "@iconify/icons-ion/switch";
|
||||
|
||||
export default function DigitalOutputs({ openOutputModal }) {
|
||||
const digitalOutputs = useSelector(
|
||||
@@ -12,7 +15,7 @@ export default function DigitalOutputs({ openOutputModal }) {
|
||||
return (
|
||||
<div className="bg-white shadow-md border border-gray-200 p-3 rounded-lg w-full h-fit max-h-[400px] overflow-auto">
|
||||
<h2 className="text-sm font-bold mb-3 flex items-center">
|
||||
<Icon icon="mdi:output" className="text-littwin-blue mr-2 text-xl" />
|
||||
<Icon icon={outputIcon} className="text-littwin-blue mr-2 text-xl" />
|
||||
Digitale Ausgänge
|
||||
</h2>
|
||||
<table className="w-full text-xs border-collapse bg-white rounded-lg">
|
||||
@@ -29,7 +32,7 @@ export default function DigitalOutputs({ openOutputModal }) {
|
||||
<tr key={output.id} className="border-b">
|
||||
<td className="flex items-center px-1 py-1">
|
||||
<Icon
|
||||
icon="mdi:output"
|
||||
icon={outputIcon}
|
||||
className="text-gray-600 mr-1 text-base"
|
||||
/>
|
||||
{output.id}
|
||||
@@ -47,7 +50,7 @@ export default function DigitalOutputs({ openOutputModal }) {
|
||||
</td>
|
||||
<td className="px-1 py-1">
|
||||
<Icon
|
||||
icon="mdi:settings"
|
||||
icon={settingsIcon}
|
||||
className="text-gray-400 text-base cursor-pointer"
|
||||
onClick={() => openOutputModal(output)}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user