Still converting to bootstrap 5. Fixed some track list issues
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user