Update NsPanelTs.ts

With the change, the offColor can also be used if, for example, the sockets are to be displayed in red and green
This commit is contained in:
Armilar
2022-04-18 11:57:05 +02:00
committed by GitHub
parent 5678260541
commit 835b519057

View File

@@ -327,6 +327,8 @@ function CreateEntity(pageItem: PageItem, placeId: number, useColors: boolean =
if (val === true || val === "true") { if (val === true || val === "true") {
optVal = "1" optVal = "1"
iconColor = GetIconColor(pageItem, true, useColors); iconColor = GetIconColor(pageItem, true, useColors);
} else {
iconColor = GetIconColor(pageItem, false, useColors);
} }
return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal; return "~" + type + "~" + pageItem.id + "~" + iconId + "~" + iconColor + "~" + name + "~" + optVal;