mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-30 11:59:12 +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 charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
<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="icon" type="image/png" href="/favicon.ico" />
|
||||||
<link rel="stylesheet" href="/build/bundle.css" />
|
<link rel="stylesheet" href="/build/bundle.css" />
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"name": "IoTmanagerVer4",
|
"name": "IoTmanagerVer4",
|
||||||
"apssid": "IoTmanager",
|
"apssid": "IoTmanager",
|
||||||
"appass": "",
|
"appass": "",
|
||||||
"routerssid": "rise2",
|
"routerssid": "rise",
|
||||||
"routerpass": "hostel3333",
|
"routerpass": "hostel3333",
|
||||||
"timezone": 2,
|
"timezone": 2,
|
||||||
"ntp": "pool.ntp.org",
|
"ntp": "pool.ntp.org",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//Версия прошивки
|
//Версия прошивки
|
||||||
#define FIRMWARE_VERSION 423
|
#define FIRMWARE_VERSION 424
|
||||||
|
|
||||||
#ifdef esp8266_4mb
|
#ifdef esp8266_4mb
|
||||||
#define FIRMWARE_NAME "esp8266_4mb"
|
#define FIRMWARE_NAME "esp8266_4mb"
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"name": "IoTmanagerVer4",
|
"name": "IoTmanagerVer4",
|
||||||
"apssid": "IoTmanager",
|
"apssid": "IoTmanager",
|
||||||
"appass": "",
|
"appass": "",
|
||||||
"routerssid": "rise2",
|
"routerssid": "rise",
|
||||||
"routerpass": "hostel3333",
|
"routerpass": "hostel3333",
|
||||||
"timezone": 2,
|
"timezone": 2,
|
||||||
"ntp": "pool.ntp.org",
|
"ntp": "pool.ntp.org",
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ File fsUploadFile;
|
|||||||
|
|
||||||
void standWebServerInit() {
|
void standWebServerInit() {
|
||||||
// Кэшировать файлы для быстрой работы
|
// Кэшировать файлы для быстрой работы
|
||||||
HTTP.serveStatic("/bundle.js", 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.css", FileFS, "/", "max-age=31536000"); // кеширование на 1 год
|
||||||
HTTP.serveStatic("/favicon.png", 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.on("/devicelist.json", HTTP_GET, []() {
|
||||||
HTTP.send(200, "application/json", devListHeapJson);
|
HTTP.send(200, "application/json", devListHeapJson);
|
||||||
@@ -207,7 +209,7 @@ void handleFileList() {
|
|||||||
HTTP.send(500, "text/plain", "BAD ARGS");
|
HTTP.send(500, "text/plain", "BAD ARGS");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
File dir = FileFS.open(HTTP.arg("list"), "r");
|
File dir = FileFS.open("/", "r");
|
||||||
String output = "[";
|
String output = "[";
|
||||||
File entry;
|
File entry;
|
||||||
while (entry = dir.openNextFile()) {
|
while (entry = dir.openNextFile()) {
|
||||||
@@ -221,6 +223,7 @@ void handleFileList() {
|
|||||||
entry.close();
|
entry.close();
|
||||||
}
|
}
|
||||||
output += "]";
|
output += "]";
|
||||||
|
Serial.println(output);
|
||||||
HTTP.send(200, "text/json", output);
|
HTTP.send(200, "text/json", output);
|
||||||
}
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user