diff --git a/approot/playhistory.xml b/approot/playhistory.xml index 25394beb..9e8646eb 100644 --- a/approot/playhistory.xml +++ b/approot/playhistory.xml @@ -16,16 +16,18 @@
-
+

${name}

-
- -
+ + ${artist class="Lms-explore-artistname"} + + diff --git a/approot/playqueue.xml b/approot/playqueue.xml index c347bc8d..3bcc9d92 100644 --- a/approot/playqueue.xml +++ b/approot/playqueue.xml @@ -42,14 +42,12 @@
-
+

${name}

-
- -
${play-btn}${del-btn} @@ -57,4 +55,8 @@
+ + ${artist class="Lms-explore-artistname"} + + diff --git a/approot/release.xml b/approot/release.xml index 4ac914ed..5f66366e 100644 --- a/approot/release.xml +++ b/approot/release.xml @@ -38,10 +38,7 @@ - ${artist class="Lms-explore-artistname Lms-explore-release-entry-artist"} + ${artist class="Lms-explore-artistname"} - - - diff --git a/approot/tracks.xml b/approot/tracks.xml index a6be16cd..d4d8510a 100644 --- a/approot/tracks.xml +++ b/approot/tracks.xml @@ -24,14 +24,12 @@
-
+

${name}

-
- -
${play-btn}${add-btn} @@ -39,4 +37,8 @@
+ + ${artist class="Lms-explore-artistname"} + + diff --git a/docroot/css/lms.css b/docroot/css/lms.css index f27095de..3bfadbc1 100644 --- a/docroot/css/lms.css +++ b/docroot/css/lms.css @@ -185,10 +185,6 @@ a:hover { font-weight: bold; } -.Lms-explore-release-entry-artist { - display: inline-block; -} - .Lms-explore-releaselink { margin: 0px; padding-top: 4px; @@ -241,8 +237,14 @@ a:hover { .Lms-explore-tracks-entry { min-height: 32px; - padding-top: 2px; - padding-bottom: 2px; + border-bottom-style: solid; + border-bottom-color: lightgrey; + border-bottom-width: thin; +} + +.Lms-explore-tracks-entry-name { + margin-top: 4px; + margin-bottom: 4px; } .Lms-explore-tracks-entry:hover { @@ -273,15 +275,21 @@ a:hover { } .Lms-playqueue-entry { + border-bottom-style: solid; + border-bottom-color: lightgrey; + border-bottom-width: thin; min-height: 32px; - padding-top: 2px; - padding-bottom: 2px; } .Lms-playqueue-entry:hover { background-color: lightgrey; } +.Lms-playqueue-entry-name { + margin-top: 4px; + margin-bottom: 4px; +} + .Lms-playqueue-entry-controls { text-align: right; } @@ -309,14 +317,21 @@ a:hover { } .Lms-playhistory-entry { + border-bottom-style: solid; + border-bottom-color: lightgrey; + border-bottom-width: thin; min-height: 32px; - margin-bottom: 2px; } .Lms-playhistory-entry:hover { background-color: lightgrey; } +.Lms-playhistory-entry-name { + margin-top: 4px; + margin-bottom: 4px; +} + .Lms-player { position: fixed; bottom: 0; diff --git a/src/ui/PlayHistoryView.cpp b/src/ui/PlayHistoryView.cpp index 7e75cd10..20f92761 100644 --- a/src/ui/PlayHistoryView.cpp +++ b/src/ui/PlayHistoryView.cpp @@ -40,16 +40,26 @@ std::unique_ptr createEntry(Database::Track::pointer track) entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain); auto artists {track->getArtists()}; + auto release = track->getRelease(); + + if (!artists.empty() || release) + entry->setCondition("if-has-artists-or-release", true); + if (!artists.empty()) { - entry->setCondition("if-has-artist", true); - entry->bindWidget("artist-name", LmsApplication::createArtistAnchor(artists.front())); + entry->setCondition("if-has-artists", true); + + Wt::WContainerWidget* artistContainer {entry->bindNew("artists")}; + for (const auto& artist : artists) + { + Wt::WTemplate* a {artistContainer->addNew(Wt::WString::tr("Lms.PlayHistory.template.entry-artist"))}; + a->bindWidget("artist", LmsApplication::createArtistAnchor(artist)); + } } - auto release = track->getRelease(); if (release) { entry->setCondition("if-has-release", true); - entry->bindWidget("release-name", LmsApplication::createReleaseAnchor(track->getRelease())); + entry->bindWidget("release", LmsApplication::createReleaseAnchor(track->getRelease())); } return entry; diff --git a/src/ui/PlayQueueView.cpp b/src/ui/PlayQueueView.cpp index 004b1b5c..030ddfa2 100644 --- a/src/ui/PlayQueueView.cpp +++ b/src/ui/PlayQueueView.cpp @@ -331,16 +331,26 @@ PlayQueue::addSome() entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain); auto artists {track->getArtists()}; + auto release = track->getRelease(); + + if (!artists.empty() || release) + entry->setCondition("if-has-artists-or-release", true); + if (!artists.empty()) { - entry->setCondition("if-has-artist", true); - entry->bindWidget("artist-name", LmsApplication::createArtistAnchor(artists.front())); + entry->setCondition("if-has-artists", true); + + Wt::WContainerWidget* artistContainer {entry->bindNew("artists")}; + for (const auto& artist : artists) + { + Wt::WTemplate* a {artistContainer->addNew(Wt::WString::tr("Lms.PlayQueue.template.entry-artist"))}; + a->bindWidget("artist", LmsApplication::createArtistAnchor(artist)); + } } - auto release = track->getRelease(); if (release) { entry->setCondition("if-has-release", true); - entry->bindWidget("release-name", LmsApplication::createReleaseAnchor(track->getRelease())); + entry->bindWidget("release", LmsApplication::createReleaseAnchor(track->getRelease())); } Wt::WText* playBtn = entry->bindNew("play-btn", Wt::WString::tr("Lms.PlayQueue.template.play-btn"), Wt::TextFormat::XHTML); diff --git a/src/ui/explore/TracksView.cpp b/src/ui/explore/TracksView.cpp index 25074604..79b0a41b 100644 --- a/src/ui/explore/TracksView.cpp +++ b/src/ui/explore/TracksView.cpp @@ -117,16 +117,27 @@ Tracks::addSome() entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain); auto artists {track->getArtists()}; + auto release {track->getRelease()}; + + if (!artists.empty() || release) + entry->setCondition("if-has-artists-or-release", true); + if (!artists.empty()) { - entry->setCondition("if-has-artist", true); - entry->bindWidget("artist-name", LmsApplication::createArtistAnchor(artists.front())); + entry->setCondition("if-has-artists", true); + + Wt::WContainerWidget* artistContainer {entry->bindNew("artists")}; + for (const auto& artist : artists) + { + Wt::WTemplate* a {artistContainer->addNew(Wt::WString::tr("Lms.Explore.Tracks.template.entry-artist"))}; + a->bindWidget("artist", LmsApplication::createArtistAnchor(artist)); + } } if (track->getRelease()) { entry->setCondition("if-has-release", true); - entry->bindWidget("release-name", LmsApplication::createReleaseAnchor(track->getRelease())); + entry->bindWidget("release", LmsApplication::createReleaseAnchor(track->getRelease())); } Wt::WText* playBtn = entry->bindNew("play-btn", Wt::WString::tr("Lms.Explore.template.play-btn"), Wt::TextFormat::XHTML);