Still converting to bootstrap 5. Fixed some track list issues
This commit is contained in:
@@ -65,11 +65,9 @@
|
||||
${<if-has-track-number>}${track-number}${</if-has-track-number>}
|
||||
</div>
|
||||
<div class="p-2 flex-fill">
|
||||
<div class="Lms-mw-fit-content">
|
||||
${name}
|
||||
${<if-has-artists>}${artists}${</if-has-artists>}
|
||||
</div>
|
||||
</div>
|
||||
<div class="p-2 d-none d-sm-block text-muted">
|
||||
${duration}
|
||||
</div>
|
||||
|
||||
+11
-12
@@ -40,21 +40,19 @@
|
||||
</message>
|
||||
|
||||
<message id="Lms.Explore.Tracks.template.entry">
|
||||
<div class="row Lms-vertical-align Lms-explore-entry-list Lms-explore-tracks-entry">
|
||||
<div class="col-3 col-sm-2 col-md-2">
|
||||
<div class="Lms-responsive-square Lms-cover-container">
|
||||
<div class="card bg-transparent">
|
||||
<div class="row align-items-center Lms-bg-dark-hover rounded">
|
||||
<div class="col-2 col-lg-1">
|
||||
${cover}
|
||||
</div>
|
||||
<div class="col-10 col-lg-11 d-flex align-items-center">
|
||||
<div class="flex-fill">
|
||||
<div>${name}</div>
|
||||
${<if-has-release>}${release class="text-decoration-none link-sucess"}${</if-has-release>}
|
||||
</div>
|
||||
<div class="col-7 col-sm-8 col-md-8 Lms-explore-entry-list-text-container">
|
||||
${name}
|
||||
${<if-has-artists-or-release>}
|
||||
${<if-has-release>}${release}${</if-has-release>}
|
||||
${<if-has-artists>}${artists}${</if-has-artists>}
|
||||
${</if-has-artists-or-release>}
|
||||
</div>
|
||||
<div class="col-2 col-sm-2 col-md-2">
|
||||
<div class="p-2 d-none d-sm-block text-muted">
|
||||
${duration}
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
${play-btn class="btn btn-sm btn-outline-secondary border-0"}
|
||||
<div class="dropdown d-inline-block">
|
||||
@@ -68,10 +66,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</message>
|
||||
|
||||
<message id="Lms.Explore.Tracks.template.entry-artist">
|
||||
<small>${artist class="Lms-btn Lms-artistname text-muted"}</small>
|
||||
${artist class="text-decoration-none link-secondary"}
|
||||
</message>
|
||||
|
||||
</messages>
|
||||
|
||||
@@ -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