fe looks like completed

This commit is contained in:
acetone
2022-11-18 21:53:11 +03:00
parent 419ab1a2b5
commit 5b2a28d052
5 changed files with 43 additions and 10 deletions
+24 -5
View File
@@ -1,6 +1,5 @@
# ---> Qt
# C++ objects and libs
*.slo
*.lo
*.o
@@ -8,11 +7,14 @@
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib
# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
@@ -21,16 +23,33 @@
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*-build-*
*build-*
*.qm
*.prl
# Qt unit tests
target_wrapper.*
# QtCreator
*.autosave
#QtCtreator Qml
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
# QtCreator 4.8< compilation database
compile_commands.json
# QtCreator local machine specific files for imported projects
*creator.user*
*_qmlcache.qrc
+1
View File
@@ -2,5 +2,6 @@
<qresource prefix="/">
<file>html/index.html</file>
<file>html/main.css</file>
<file>html/favicon.ico</file>
</qresource>
</RCC>
Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

+4
View File
@@ -45,6 +45,10 @@ void SocketRunnable::get()
{
httpDocument().setBody(QFile(":/html/main.css"), eTag);
}
else if (urlPath() == "/favicon.ico")
{
httpDocument().setBody(QFile(":/html/favicon.ico"), eTag);
}
else
{
httpDocument().setBody(QFile(g::p::WORKING_DIR + "/html" + urlPath()), eTag);
+14 -5
View File
@@ -91,6 +91,7 @@ QByteArray WebPage::document()
customStyles(page);
lastDestinations(page);
trafficBlock(page);
topDestinations(page);
blockedDestinations(page);
informationBlock(page);
copyright(page);
@@ -139,11 +140,19 @@ void WebPage::trafficBlock(QString &document)
void WebPage::topDestinations(QString &document)
{
// QString dailyTopList;
// for (const auto& dTop: Statistics::dailyTopDestinations())
// {
// QStringList
// }
QString dailyTopList;
for (const auto& dTop: Statistics::dailyTopDestinations())
{
dailyTopList += dailyTopDestinationItem(dTop);
}
document.replace(g::c::HA_DAILY_TOP_DESTINATIONS_LIST, dailyTopList);
QString totalTopList;
for (const auto& dTop: Statistics::totalTopDestinations())
{
totalTopList += totalTopDestinationItem(dTop);
}
document.replace(g::c::HA_TOTAL_TOP_DESTINATIONS_LIST, totalTopList);
}
void WebPage::blockedDestinations(QString &document)