Add HardwareId property to hardware devices in data.json (#1868)

* add HardwareId property to hardware in data.json

* Rename 'id' key to 'Id' in JSON node generation

---------

Co-authored-by: PhyxionNL <7643972+PhyxionNL@users.noreply.github.com>
This commit is contained in:
Sab44
2025-09-17 16:04:09 +02:00
committed by GitHub
co-authored by PhyxionNL
parent eb5e1a20be
commit 3c75e8e676
+2 -1
View File
@@ -625,7 +625,7 @@ public class HttpServer
{
JObject jsonNode = new()
{
["id"] = nodeIndex++,
["Id"] = nodeIndex++,
["Text"] = n.Text,
["Min"] = string.Empty,
["Value"] = string.Empty,
@@ -643,6 +643,7 @@ public class HttpServer
jsonNode["ImageURL"] = "images/transparent.png";
break;
case HardwareNode hardwareNode:
jsonNode["HardwareId"] = hardwareNode.Hardware.Identifier.ToString();
jsonNode["ImageURL"] = "images_icon/" + GetHardwareImageFile(hardwareNode);
break;
case TypeNode typeNode: