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>}
|
${<if-has-track-number>}${track-number}${</if-has-track-number>}
|
||||||
</div>
|
</div>
|
||||||
<div class="p-2 flex-fill">
|
<div class="p-2 flex-fill">
|
||||||
<div class="Lms-mw-fit-content">
|
|
||||||
${name}
|
${name}
|
||||||
${<if-has-artists>}${artists}${</if-has-artists>}
|
${<if-has-artists>}${artists}${</if-has-artists>}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="p-2 d-none d-sm-block text-muted">
|
<div class="p-2 d-none d-sm-block text-muted">
|
||||||
${duration}
|
${duration}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+11
-12
@@ -40,21 +40,19 @@
|
|||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.Tracks.template.entry">
|
<message id="Lms.Explore.Tracks.template.entry">
|
||||||
<div class="row Lms-vertical-align Lms-explore-entry-list Lms-explore-tracks-entry">
|
<div class="card bg-transparent">
|
||||||
<div class="col-3 col-sm-2 col-md-2">
|
<div class="row align-items-center Lms-bg-dark-hover rounded">
|
||||||
<div class="Lms-responsive-square Lms-cover-container">
|
<div class="col-2 col-lg-1">
|
||||||
${cover}
|
${cover}
|
||||||
</div>
|
</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>
|
||||||
<div class="col-7 col-sm-8 col-md-8 Lms-explore-entry-list-text-container">
|
<div class="p-2 d-none d-sm-block text-muted">
|
||||||
${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">
|
|
||||||
${duration}
|
${duration}
|
||||||
|
</div>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
${play-btn class="btn btn-sm btn-outline-secondary border-0"}
|
${play-btn class="btn btn-sm btn-outline-secondary border-0"}
|
||||||
<div class="dropdown d-inline-block">
|
<div class="dropdown d-inline-block">
|
||||||
@@ -68,10 +66,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.Tracks.template.entry-artist">
|
<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>
|
</message>
|
||||||
|
|
||||||
</messages>
|
</messages>
|
||||||
|
|||||||
@@ -293,7 +293,6 @@ LmsApplication::createReleaseAnchor(Database::Release::pointer release, bool add
|
|||||||
|
|
||||||
if (addText)
|
if (addText)
|
||||||
{
|
{
|
||||||
res->setWordWrap(false);
|
|
||||||
res->setTextFormat(Wt::TextFormat::Plain);
|
res->setTextFormat(Wt::TextFormat::Plain);
|
||||||
res->setText(Wt::WString::fromUTF8(release->getName()));
|
res->setText(Wt::WString::fromUTF8(release->getName()));
|
||||||
res->setToolTip(Wt::WString::fromUTF8(release->getName()), Wt::TextFormat::Plain);
|
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 entry {std::make_unique<Template>(Wt::WString::tr("Lms.Explore.Tracks.template.entry"))};
|
||||||
auto* entryPtr {entry.get()};
|
auto* entryPtr {entry.get()};
|
||||||
|
|
||||||
Wt::WText* name {entry->bindNew<Wt::WText>("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain)};
|
entry->bindString("name", Wt::WString::fromUTF8(track->getName()));
|
||||||
name->setToolTip(Wt::WString::fromUTF8(track->getName()));
|
|
||||||
|
|
||||||
const auto artists {track->getArtists({TrackArtistLinkType::Artist})};
|
const auto artists {track->getArtists({TrackArtistLinkType::Artist})};
|
||||||
const Release::pointer release {track->getRelease()};
|
const Release::pointer release {track->getRelease()};
|
||||||
const TrackId trackId {track->getId()};
|
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())
|
if (track->getRelease())
|
||||||
{
|
{
|
||||||
entry->setCondition("if-has-release", true);
|
entry->setCondition("if-has-release", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user