Still converting to bootstrap 5. Fixed some track list issues

This commit is contained in:
emeric
2022-05-10 23:33:56 +02:00
parent 9119193341
commit c88f791d0d
4 changed files with 17 additions and 37 deletions
-1
View File
@@ -293,7 +293,6 @@ LmsApplication::createReleaseAnchor(Database::Release::pointer release, bool add
if (addText)
{
res->setWordWrap(false);
res->setTextFormat(Wt::TextFormat::Plain);
res->setText(Wt::WString::fromUTF8(release->getName()));
res->setToolTip(Wt::WString::fromUTF8(release->getName()), Wt::TextFormat::Plain);
+1 -17
View File
@@ -49,28 +49,12 @@ namespace UserInterface::TrackListHelpers
auto entry {std::make_unique<Template>(Wt::WString::tr("Lms.Explore.Tracks.template.entry"))};
auto* entryPtr {entry.get()};
Wt::WText* name {entry->bindNew<Wt::WText>("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain)};
name->setToolTip(Wt::WString::fromUTF8(track->getName()));
entry->bindString("name", Wt::WString::fromUTF8(track->getName()));
const auto artists {track->getArtists({TrackArtistLinkType::Artist})};
const Release::pointer release {track->getRelease()};
const TrackId trackId {track->getId()};
if (!artists.empty() || release)
entry->setCondition("if-has-artists-or-release", true);
if (!artists.empty())
{
entry->setCondition("if-has-artists", true);
Wt::WContainerWidget* artistContainer {entry->bindNew<Wt::WContainerWidget>("artists")};
for (const Artist::pointer& artist : artists)
{
Wt::WTemplate* a {artistContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Tracks.template.entry-artist"))};
a->bindWidget("artist", LmsApplication::createArtistAnchor(artist));
}
}
if (track->getRelease())
{
entry->setCondition("if-has-release", true);