File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -88,17 +88,25 @@ class UsermodFseq : public Usermod {
8888 // Unique ID for the usermod
8989 uint16_t getId () override { return USERMOD_ID_SD_CARD; }
9090
91- // Add a link in the Info tab to your SD UI
91+ // Add a link in the Info tab to your SD
9292 void addToJsonInfo (JsonObject &root) override {
9393 JsonObject user = root[" u" ];
9494 if (user.isNull ()) {
9595 user = root.createNestedObject (" u" );
9696 }
97- // Create an array with two items: label and value
97+
9898 JsonArray arr = user.createNestedArray (" Usermod FSEQ UI" );
9999
100- String ip = WiFi.localIP ().toString ();
101- arr.add (" http://" + ip + " /fsequi" ); // value
100+ if (WiFi.status () == WL_CONNECTED) {
101+ String ip = WiFi.localIP ().toString ();
102+ String url = " http://" + ip + " /fsequi" ;
103+
104+ arr.add (" Open FSEQ UI" ); // angezeigter Text
105+ arr.add (url); // URL → macht klickbar
106+ } else {
107+ arr.add (" FSEQ UI" );
108+ arr.add (" (WiFi not connected)" );
109+ }
102110 }
103111
104112 // Save your SPI pins to WLED config JSON
You can’t perform that action at this time.
0 commit comments