mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-25 04:07:17 +02:00
Merge branch 'webgui-fix' of https://github.com/tastendruecker123/ahoy into tastendruecker123-webgui-fix
This commit is contained in:
commit
d462bb541d
3 changed files with 40 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
||||||
<link rel="stylesheet" type="text/css" href="colors.css"/>
|
<link rel="stylesheet" type="text/css" href="style.css?v={#VERSION}"/>
|
||||||
<link rel="stylesheet" type="text/css" href="style.css"/>
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<script type="text/javascript" src="api.js"></script>
|
<script type="text/javascript" src="api.js?v={#VERSION}"></script>
|
||||||
|
<link rel="stylesheet" type="text/css" href="colors.css?v={#VERSION}"/>
|
|
@ -1,21 +1,21 @@
|
||||||
<div class="topnav">
|
<div class="topnav">
|
||||||
<a href="/" class="title">AhoyDTU</a>
|
<a href="/?v={#VERSION}" class="title">AhoyDTU</a>
|
||||||
<a href="javascript:void(0);" class="icon" onclick="topnav()">
|
<a href="javascript:void(0);" class="icon" onclick="topnav()">
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
<span></span>
|
<span></span>
|
||||||
</a>
|
</a>
|
||||||
<div id="topnav" class="mobile">
|
<div id="topnav" class="mobile">
|
||||||
<a id="nav3" class="hide" href="/live">Live</a>
|
<a id="nav3" class="hide" href="/live?v={#VERSION}">Live</a>
|
||||||
<a id="nav4" class="hide" href="/serial">Serial / Control</a>
|
<a id="nav4" class="hide" href="/serial?v={#VERSION}">Serial / Control</a>
|
||||||
<a id="nav5" class="hide" href="/setup">Settings</a>
|
<a id="nav5" class="hide" href="/setup?v={#VERSION}">Settings</a>
|
||||||
<span class="seperator"></span>
|
<span class="seperator"></span>
|
||||||
<a id="nav6" class="hide" href="/update">Update</a>
|
<a id="nav6" class="hide" href="/update?v={#VERSION}">Update</a>
|
||||||
<a id="nav7" class="hide" href="/system">System</a>
|
<a id="nav7" class="hide" href="/system?v={#VERSION}">System</a>
|
||||||
<span class="seperator"></span>
|
<span class="seperator"></span>
|
||||||
<a id="nav8" href="/api" target="_blank">REST API</a>
|
<a id="nav8" href="/api" target="_blank">REST API</a>
|
||||||
<a id="nav9" href="https://ahoydtu.de" target="_blank">Documentation</a>
|
<a id="nav9" href="https://ahoydtu.de" target="_blank">Documentation</a>
|
||||||
<a id="nav10" href="/about">About</a>
|
<a id="nav10" href="/about?v={#VERSION}">About</a>
|
||||||
<span class="seperator"></span>
|
<span class="seperator"></span>
|
||||||
<a id="nav0" class="hide" href="/login">Login</a>
|
<a id="nav0" class="hide" href="/login">Login</a>
|
||||||
<a id="nav1" class="hide" href="/logout">Logout</a>
|
<a id="nav1" class="hide" href="/logout">Logout</a>
|
||||||
|
|
|
@ -257,6 +257,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), update_html, update_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), update_html, update_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,6 +314,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), index_html, index_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), index_html, index_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -350,6 +356,9 @@ class Web {
|
||||||
else
|
else
|
||||||
response = request->beginResponse_P(200, F("text/css"), colorBright_css, colorBright_css_len);
|
response = request->beginResponse_P(200, F("text/css"), colorBright_css, colorBright_css_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,6 +367,9 @@ class Web {
|
||||||
mLogoutTimeout = LOGOUT_TIMEOUT;
|
mLogoutTimeout = LOGOUT_TIMEOUT;
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/css"), style_css, style_css_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/css"), style_css, style_css_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,6 +378,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/javascript"), api_js, api_js_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/javascript"), api_js, api_js_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -431,6 +446,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), setup_html, setup_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), setup_html, setup_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,6 +624,9 @@ class Web {
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), visualization_html, visualization_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), visualization_html, visualization_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
|
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
@ -614,6 +635,9 @@ class Web {
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), about_html, about_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), about_html, about_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
response->addHeader(F("content-type"), "text/html; charset=UTF-8");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
|
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
@ -632,6 +656,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), serial_html, serial_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), serial_html, serial_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -643,6 +670,9 @@ class Web {
|
||||||
|
|
||||||
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), system_html, system_html_len);
|
AsyncWebServerResponse *response = request->beginResponse_P(200, F("text/html; charset=UTF-8"), system_html, system_html_len);
|
||||||
response->addHeader(F("Content-Encoding"), "gzip");
|
response->addHeader(F("Content-Encoding"), "gzip");
|
||||||
|
if(request->hasParam("v")) {
|
||||||
|
response->addHeader(F("Cache-Control"), F("max-age=604800"));
|
||||||
|
}
|
||||||
request->send(response);
|
request->send(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue