cleanup, web interface

This commit is contained in:
2023-08-28 22:10:38 +02:00
parent 4fd7856736
commit d0f9f400f9
4 changed files with 23 additions and 29 deletions

View File

@@ -226,15 +226,16 @@ String DirectoryNode::getDirectoryStructureHTML() const
{
String html;
html.reserve(1024); // Reserve memory for better performance
appendIndentation(html, 0);
html += "<ul>\n";
appendIndentation(html, 1);
html += "<li>" + name + "</li>\n";
if (name=="/") {
html += "<ul>\n";
}
if (name!="/") {
html += "<li><b>" + name + "</b></li>\n";
}
for (const String &mp3File : mp3Files)
{
appendIndentation(html, 2);
html += "<li>" + mp3File + "</li>\n";
}
@@ -242,9 +243,9 @@ String DirectoryNode::getDirectoryStructureHTML() const
{
html += childNode->getDirectoryStructureHTML();
}
appendIndentation(html, 0);
html += "</ul>\n";
if (name=="/") {
html += "</ul>\n";
}
return html;
}