Empty log folder message

master
const an teen 2021-12-15 10:15:40 -05:00
parent 3645d94bd2
commit 33d998c222
3 changed files with 9 additions and 2 deletions

View File

@ -256,6 +256,7 @@ body {
.main_payload__error {
width: 95%;
font-size: 20px;
text-align: center;
margin: 2% 2% 0 2%;
}

View File

@ -944,7 +944,13 @@ void HttpServer::writeMainPage(QTcpSocket *socket, QString &urlPath, bool isHead
file.close();
}
}
if (payloadBlock.isEmpty()) {
payloadBlock = HTML_PAYLOAD_ERROR;
replaceTag(payloadBlock, "ERROR_TITLE", "Empty");
replaceTag(payloadBlock, "ERROR_TEXT", "No logs found for this channel");
}
}
replaceTag(page, "MIDDLE_PATH", middlePath);
replaceTag(page, "PAYLOAD_BLOCK", payloadBlock);

View File

@ -5,7 +5,7 @@
#include <QTcpServer>
#include <map>
const QString HTTP_ACTUAL_ETAG {"2021-12-05"}; // Change it if svg, css or ico was modified
const QString HTTP_ACTUAL_ETAG {"2021-12-15"}; // Change it if svg, css or ico was modified
class HttpServer : public QObject
{
@ -120,7 +120,7 @@ Content-Length: {{SIZE}}\r\n\r\n";
const QString HTML_PAYLOAD_ERROR = "\
<div class=\"main_payload__error\">\n\
<span style=\"color: red; text-align: center; display: block; font-size: 24px;\">{{ERROR_TITLE}}</span><br>\n\
<span style=\"color: red; display: block; font-size: 24px;\">{{ERROR_TITLE}}</span><br>\n\
{{ERROR_TEXT}}\n\
</div>";