diff --git a/src/DirectoryNode.cpp b/src/DirectoryNode.cpp
index f206154..050d24b 100644
--- a/src/DirectoryNode.cpp
+++ b/src/DirectoryNode.cpp
@@ -226,15 +226,16 @@ String DirectoryNode::getDirectoryStructureHTML() const
{
String html;
html.reserve(1024); // Reserve memory for better performance
-
- appendIndentation(html, 0);
- html += "
\n";
- appendIndentation(html, 1);
- html += "- " + name + "
\n";
+ if (name=="/") {
+ html += "\n";
+ }
+
+ if (name!="/") {
+ html += "- " + name + "
\n";
+ }
for (const String &mp3File : mp3Files)
{
- appendIndentation(html, 2);
html += "- " + mp3File + "
\n";
}
@@ -242,9 +243,9 @@ String DirectoryNode::getDirectoryStructureHTML() const
{
html += childNode->getDirectoryStructureHTML();
}
-
- appendIndentation(html, 0);
- html += "
\n";
+ if (name=="/") {
+ html += "
\n";
+ }
return html;
}
diff --git a/src/WebContent.h b/src/WebContent.h
index be4cc42..b51d369 100644
--- a/src/WebContent.h
+++ b/src/WebContent.h
@@ -8,10 +8,13 @@ const char index_html[] PROGMEM = R"rawliteral(
HannaBox
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
-
Content of SD Card:
+ Inhalt
%DIRECTORY%
@@ -54,8 +46,6 @@ const char index_html[] PROGMEM = R"rawliteral(
liElements.forEach(function(li) {
li.addEventListener('click', function() {
var liText = this.innerText;
- var inputField = document.getElementById('titleid');
- inputField.value = liText;
playNamedSong(liText);
});
});
diff --git a/src/css.h b/src/css.h
index 0815c37..c272cd5 100644
--- a/src/css.h
+++ b/src/css.h
@@ -29,6 +29,7 @@ li {
.play-button.paused {
border-style: double;
border-width: 0px 0 0px 60px;
+ height: 74px;
}
.play-button:hover {
border-color: transparent transparent transparent darkgrey;
diff --git a/src/main.cpp b/src/main.cpp
index 1f5f627..3fb25a1 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -174,6 +174,8 @@ String getState()
jsonState["playing"] = audio.isRunning();
if (currentNode!=NULL)
jsonState["title"] = *currentNode->getCurrentPlaying();
+ else
+ jsonState["title"] = "Angehalten";
jsonState["time"] = audio.getAudioCurrentTime();
jsonState["volume"] = audio.getVolume();