Remove SPIFFS reference from ESP8266 react, use FS pointer instead
This commit is contained in:
parent
98f49fd024
commit
b4f3fbe823
@ -73,7 +73,7 @@ class SystemStatusForm extends Component<SystemStatusFormProps, SystemStatusForm
|
|||||||
<MemoryIcon />
|
<MemoryIcon />
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</ListItemAvatar>
|
</ListItemAvatar>
|
||||||
<ListItemText primary="Heap (Free / Max Alloc)" secondary={formatNumber(data.free_heap) + ' / ' + formatNumber(data.max_alloc_heap) + ' bytes (~' + this.approxHeapFragmentation() + '% fragmentation)'} />
|
<ListItemText primary="Heap (Free / Max Alloc)" secondary={formatNumber(data.free_heap) + ' / ' + formatNumber(data.max_alloc_heap) + ' bytes (~' + this.approxHeapFragmentation() + '%\xa0fragmentation)'} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<Divider variant="inset" component="li" />
|
<Divider variant="inset" component="li" />
|
||||||
<ListItem >
|
<ListItem >
|
||||||
@ -100,7 +100,7 @@ class SystemStatusForm extends Component<SystemStatusFormProps, SystemStatusForm
|
|||||||
<FolderIcon />
|
<FolderIcon />
|
||||||
</Avatar>
|
</Avatar>
|
||||||
</ListItemAvatar>
|
</ListItemAvatar>
|
||||||
<ListItemText primary="File System (Used / Total)" secondary={formatNumber(data.fs_used) + ' / ' + formatNumber(data.fs_total) + ' bytes (' + formatNumber(data.fs_total - data.fs_used) + ' bytes free)'} />
|
<ListItemText primary="File System (Used / Total)" secondary={formatNumber(data.fs_used) + ' / ' + formatNumber(data.fs_total) + ' bytes (' + formatNumber(data.fs_total - data.fs_used) + '\xa0bytes free)'} />
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<Divider variant="inset" component="li" />
|
<Divider variant="inset" component="li" />
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -42,11 +42,11 @@ ESP8266React::ESP8266React(AsyncWebServer* server, FS* fs) :
|
|||||||
});
|
});
|
||||||
#else
|
#else
|
||||||
// Serve static resources from /www/
|
// Serve static resources from /www/
|
||||||
server->serveStatic("/js/", SPIFFS, "/www/js/");
|
server->serveStatic("/js/", *fs, "/www/js/");
|
||||||
server->serveStatic("/css/", SPIFFS, "/www/css/");
|
server->serveStatic("/css/", *fs, "/www/css/");
|
||||||
server->serveStatic("/fonts/", SPIFFS, "/www/fonts/");
|
server->serveStatic("/fonts/", *fs, "/www/fonts/");
|
||||||
server->serveStatic("/app/", SPIFFS, "/www/app/");
|
server->serveStatic("/app/", *fs, "/www/app/");
|
||||||
server->serveStatic("/favicon.ico", SPIFFS, "/www/favicon.ico");
|
server->serveStatic("/favicon.ico", *fs, "/www/favicon.ico");
|
||||||
// Serving all other get requests with "/www/index.htm"
|
// Serving all other get requests with "/www/index.htm"
|
||||||
// OPTIONS get a straight up 200 response
|
// OPTIONS get a straight up 200 response
|
||||||
server->onNotFound([](AsyncWebServerRequest* request) {
|
server->onNotFound([](AsyncWebServerRequest* request) {
|
||||||
|
@ -5,12 +5,10 @@
|
|||||||
|
|
||||||
#ifdef ESP32
|
#ifdef ESP32
|
||||||
#include <AsyncTCP.h>
|
#include <AsyncTCP.h>
|
||||||
#include <SPIFFS.h>
|
|
||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#elif defined(ESP8266)
|
#elif defined(ESP8266)
|
||||||
#include <ESP8266WiFi.h>
|
#include <ESP8266WiFi.h>
|
||||||
#include <ESPAsyncTCP.h>
|
#include <ESPAsyncTCP.h>
|
||||||
#include <FS.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <APSettingsService.h>
|
#include <APSettingsService.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user