@@ -130,10 +130,10 @@ String listFiles(FS fs, bool ishtml, String folder, bool isLittleFS) {
130
130
returnText += " <td style=\" font-size: 10px; text-align=center;\" >" + humanReadableSize (foundfile.size ()) + " </td>\n " ;
131
131
returnText += " <td><i class=\" gg-arrow-down-r\" onclick=\" downloadDeleteButton(\' " + String (foundfile.path ()) + " \' , \' download\' )\" ></i>  \n " ;
132
132
// if (String(foundfile.name()).substring(String(foundfile.name()).lastIndexOf('.') + 1).equalsIgnoreCase("bin")) returnText+= "<i class=\"gg-arrow-up-r\" onclick=\"startUpdate(\'" + String(foundfile.path()) + "\')\"></i>  \n";
133
- if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" sub" )) returnText+= " <i class=\" gg-arrow-up-r \" onclick=\" sendSubFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
134
- if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" ir" )) returnText+= " <i class=\" gg-arrow-up-r \" onclick=\" sendIrFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
133
+ if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" sub" )) returnText+= " <i class=\" gg-data \" onclick=\" sendSubFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
134
+ if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" ir" )) returnText+= " <i class=\" gg-data \" onclick=\" sendIrFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
135
135
#if defined(USB_as_HID)
136
- if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" txt" )) returnText+= " <i class=\" gg-arrow-up-r \" onclick=\" sendBadusbFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
136
+ if (String (foundfile.name ()).substring (String (foundfile.name ()).lastIndexOf (' .' ) + 1 ).equalsIgnoreCase (" txt" )) returnText+= " <i class=\" gg-data \" onclick=\" sendBadusbFile(\' " + String (foundfile.path ()) + " \' )\" ></i>  \n " ;
137
137
#endif
138
138
returnText += " <i class=\" gg-rename\" onclick=\" renameFile(\' " + String (foundfile.path ()) + " \' , \' " + String (foundfile.name ()) + " \' )\" ></i>  \n " ;
139
139
returnText += " <i class=\" gg-trash\" onclick=\" downloadDeleteButton(\' " + String (foundfile.path ()) + " \' , \' delete\' )\" ></i></td></tr>\n\n " ;
@@ -255,6 +255,22 @@ void configureWebServer() {
255
255
// Index page
256
256
server->on (" /" , HTTP_GET, []() {
257
257
if (checkUserWebAuth ()) {
258
+ // WIP: custom webui page serving
259
+ /*
260
+ FS* fs = NULL;
261
+ File custom_index_html_file = NONE;
262
+ if(SD.exists("/webui.html")) fs = &SD;
263
+ if(LittleFS.exists("/webui.html")) fs = &LittleFS;
264
+ if(fs) {
265
+ // try to read the custom page and serve that
266
+ File custom_index_html_file = fs->open("/webui.html", FILE_READ);
267
+ if(custom_index_html_file) {
268
+ // read the whole file
269
+ //server->send(200, "text/html", processor(custom_index_html));
270
+ }
271
+ }
272
+ */
273
+ // just serve the hardcoded page
258
274
server->send (200 , " text/html" , processor (index_html));
259
275
} else {
260
276
server->requestAuthentication ();
0 commit comments