diff --git a/code/html/password.html b/code/html/password.html
new file mode 100644
index 00000000..ebb35459
--- /dev/null
+++ b/code/html/password.html
@@ -0,0 +1,72 @@
+
+
+
+
+
ESPurna 0.0.0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/package.json b/code/package.json
index 6ce9b531..2e8bff34 100644
--- a/code/package.json
+++ b/code/package.json
@@ -11,8 +11,11 @@
"gulp-clean-css": "^2.0.10",
"gulp-gzip": "^1.4.0",
"gulp-htmlmin": "^2.0.0",
+ "gulp-if": "^2.0.1",
"gulp-inline": "^0.1.1",
- "gulp-uglify": "^1.5.3"
+ "gulp-plumber": "^1.1.0",
+ "gulp-uglify": "^1.5.3",
+ "gulp-useref": "^3.1.2"
},
"dependencies": {}
}
diff --git a/code/pio_hooks.py b/code/pio_hooks.py
index 9a3f7fec..7abf6075 100644
--- a/code/pio_hooks.py
+++ b/code/pio_hooks.py
@@ -13,7 +13,7 @@ def is_valid_ip(ip):
return False
def before_build_spiffs(source, target, env):
- env.Execute("gulp buildfs")
+ env.Execute("gulp buildfs_split")
def before_upload(source, target, env):
upload_port = env.get('UPLOAD_PORT', False)
diff --git a/code/src/web.ino b/code/src/web.ino
index 36a88046..43caeced 100644
--- a/code/src/web.ino
+++ b/code/src/web.ino
@@ -94,6 +94,7 @@ void _wsParse(uint32_t client_id, uint8_t * payload, size_t length) {
bool fauxmoEnabled = false;
#endif
unsigned int network = 0;
+ String adminPass;
for (unsigned int i=0; i
requestAuthentication();
- request->send(SPIFFS, "/index.html");
+ String password = getSetting("adminPass", ADMIN_PASS);
+ if (password.equals(ADMIN_PASS)) {
+ request->send(SPIFFS, "/password.html");
+ } else {
+ request->send(SPIFFS, "/index.html");
+ }
+
}
bool _apiAuth(AsyncWebServerRequest *request) {