424 исправлен веб

This commit is contained in:
Dmitry Borisenko
2022-09-19 13:56:23 +02:00
parent 0a165026eb
commit 45a3caf67e
7 changed files with 11 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -4,7 +4,7 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>IoT Manager 4.3.1</title>
<title>IoT Manager 4.3.2</title>
<link rel="icon" type="image/png" href="/favicon.ico" />
<link rel="stylesheet" href="/build/bundle.css" />

View File

@@ -3,7 +3,7 @@
"name": "IoTmanagerVer4",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "rise2",
"routerssid": "rise",
"routerpass": "hostel3333",
"timezone": 2,
"ntp": "pool.ntp.org",

View File

@@ -1,7 +1,7 @@
#pragma once
//Версия прошивки
#define FIRMWARE_VERSION 423
#define FIRMWARE_VERSION 424
#ifdef esp8266_4mb
#define FIRMWARE_NAME "esp8266_4mb"

View File

@@ -4,7 +4,7 @@
"name": "IoTmanagerVer4",
"apssid": "IoTmanager",
"appass": "",
"routerssid": "rise2",
"routerssid": "rise",
"routerpass": "hostel3333",
"timezone": 2,
"ntp": "pool.ntp.org",

View File

@@ -5,9 +5,11 @@ File fsUploadFile;
void standWebServerInit() {
// Кэшировать файлы для быстрой работы
HTTP.serveStatic("/bundle.js", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/bundle.css", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/favicon.png", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/bundle.js", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/bundle.css", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/bundle.js.gz", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/bundle.css.gz", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.serveStatic("/favicon.png", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
HTTP.on("/devicelist.json", HTTP_GET, []() {
HTTP.send(200, "application/json", devListHeapJson);
@@ -207,7 +209,7 @@ void handleFileList() {
HTTP.send(500, "text/plain", "BAD ARGS");
return;
}
File dir = FileFS.open(HTTP.arg("list"), "r");
File dir = FileFS.open("/", "r");
String output = "[";
File entry;
while (entry = dir.openNextFile()) {
@@ -221,6 +223,7 @@ void handleFileList() {
entry.close();
}
output += "]";
Serial.println(output);
HTTP.send(200, "text/json", output);
}
//#endif