mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-26 22:22:16 +03:00
424 исправлен веб
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -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" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"name": "IoTmanagerVer4",
|
||||
"apssid": "IoTmanager",
|
||||
"appass": "",
|
||||
"routerssid": "rise2",
|
||||
"routerssid": "rise",
|
||||
"routerpass": "hostel3333",
|
||||
"timezone": 2,
|
||||
"ntp": "pool.ntp.org",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
//Версия прошивки
|
||||
#define FIRMWARE_VERSION 423
|
||||
#define FIRMWARE_VERSION 424
|
||||
|
||||
#ifdef esp8266_4mb
|
||||
#define FIRMWARE_NAME "esp8266_4mb"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"name": "IoTmanagerVer4",
|
||||
"apssid": "IoTmanager",
|
||||
"appass": "",
|
||||
"routerssid": "rise2",
|
||||
"routerssid": "rise",
|
||||
"routerpass": "hostel3333",
|
||||
"timezone": 2,
|
||||
"ntp": "pool.ntp.org",
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user