Compare commits
3 Commits
85d43231f5
...
e604f90a14
| Author | SHA1 | Date | |
|---|---|---|---|
| e604f90a14 | |||
| 194da1a78b | |||
| 1080eb97d5 |
11
index.html
11
index.html
@ -87,10 +87,15 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.initial {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
@media (min-width: 1000px) {
|
||||
body {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.relayBox {
|
||||
width: 400px;
|
||||
}
|
||||
@ -130,13 +135,15 @@
|
||||
function updateState(relayTag, state) {
|
||||
const tag = relayTag.getElementsByClassName("state")[0];
|
||||
if (state) {
|
||||
tag.innerText = "Ein";
|
||||
tag.classList.add("stateOn");
|
||||
tag.classList.remove("stateOff");
|
||||
relayTag.classList.add("stateOn");
|
||||
relayTag.classList.remove("stateOff");
|
||||
} else {
|
||||
tag.innerText = "Aus";
|
||||
tag.classList.add("stateOff");
|
||||
tag.classList.remove("stateOn");
|
||||
relayTag.classList.add("stateOff");
|
||||
relayTag.classList.remove("stateOn");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,12 @@ void listDir(const String &path, const String &indent) {
|
||||
}
|
||||
if (child.isDirectory()) {
|
||||
Serial.printf("%s[D] [ ] %s\n", indent.c_str(), child.name());
|
||||
#ifdef ESP32
|
||||
listDir(child.path(), indent + " ");
|
||||
#endif
|
||||
#ifdef ESP8266
|
||||
listDir(child.fullName(), indent + " ");
|
||||
#endif
|
||||
}
|
||||
child.close();
|
||||
}
|
||||
@ -40,7 +45,15 @@ void listDir(const String &path, const String &indent) {
|
||||
}
|
||||
|
||||
void configSetup() {
|
||||
LittleFS.begin(true);
|
||||
#ifdef ESP32
|
||||
LittleFS.begin(true)
|
||||
#endif
|
||||
#ifdef ESP8266
|
||||
if (!LittleFS.begin()) {
|
||||
LittleFS.format();
|
||||
LittleFS.begin();
|
||||
}
|
||||
#endif
|
||||
Serial.println("Filesystem-content:");
|
||||
listDir("/", "");
|
||||
}
|
||||
@ -49,7 +62,12 @@ File configOpen(const String &path, const bool write) {
|
||||
if (!write && !LittleFS.exists(path)) {
|
||||
return {};
|
||||
}
|
||||
#ifdef ESP32
|
||||
return LittleFS.open(path, write ? "w" : "r", write);
|
||||
#endif
|
||||
#ifdef ESP8266
|
||||
return LittleFS.open(path, write ? "w" : "r");
|
||||
#endif
|
||||
}
|
||||
|
||||
void doLog(const String &path, const String &value, const bool isPassword, const CONFIG_LOG type, const bool enable) {
|
||||
|
||||
@ -4,5 +4,8 @@ cd "$(dirname "$0")" || exit 1
|
||||
|
||||
minify index.html | sed 's|http://10.42.0.204||g' > index.html.min || exit 2
|
||||
|
||||
curl -s 'http://10.42.0.204/upload/index' -F "file=@index.html.min"
|
||||
curl -s 'http://10.42.0.204/upload/icon' -F "file=@icon.svg"
|
||||
#curl -s 'http://10.42.0.204/upload/index' -F "file=@index.html.min"
|
||||
#curl -s 'http://10.42.0.204/upload/icon' -F "file=@icon.svg"
|
||||
|
||||
curl -s 'http://10.0.0.178/upload/index' -F "file=@index.html.min"
|
||||
curl -s 'http://10.0.0.178/upload/icon' -F "file=@icon.svg"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user