File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,23 +90,22 @@ class UsermodFseq : public Usermod {
9090
9191 // Add a link in the Info tab to your SD
9292 void addToJsonInfo (JsonObject &root) override {
93-
9493 JsonObject user = root[" u" ];
9594 if (user.isNull ()) {
9695 user = root.createNestedObject (" u" );
9796 }
9897
99- if (WiFi.status () == WL_CONNECTED) {
100-
101- static char url[64 ]; // wichtig: static!
102- snprintf (url, sizeof (url),
103- " http://%s/fsequi" ,
104- WiFi.localIP ().toString ().c_str ());
98+ JsonArray arr = user.createNestedArray (" Usermod FSEQ UI" );
10599
106- user[" FSEQ UI" ] = url;
100+ if (WiFi.status () == WL_CONNECTED) {
101+ String ip = WiFi.localIP ().toString ();
102+ String url = " http://" + ip + " /fsequi" ;
107103
104+ arr.add (" FSEQ UI " ); // angezeigter Text
105+ arr.add (url); // URL → macht klickbar
108106 } else {
109- user[" FSEQ UI" ] = " WiFi not connected" ;
107+ arr.add (" FSEQ UI" );
108+ arr.add (" (WiFi not connected)" );
110109 }
111110 }
112111
You can’t perform that action at this time.
0 commit comments