simplified the tracks view
This commit is contained in:
@@ -46,7 +46,7 @@
|
||||
${<if-has-artist>}<small><i>${artist-name}</i></small>${</if-has-artist>}
|
||||
</div>
|
||||
<div class="col-xs-3 Lms-playqueue-entry-controls">
|
||||
${play-btn} ${del-btn}
|
||||
${play-btn}${del-btn}
|
||||
</div>
|
||||
</div>
|
||||
</message>
|
||||
|
||||
+13
-8
@@ -23,14 +23,19 @@
|
||||
</message>
|
||||
|
||||
<message id="Lms.Explore.Tracks.template.entry">
|
||||
<div class="media-left">
|
||||
${cover class="media-object"}
|
||||
</div>
|
||||
<div class="media-body media-middle">
|
||||
<h4 class="media-heading">${name}</h4>
|
||||
${<if-has-release>}<h4><small>${release-name}</small></h4>${</if-has-release>}
|
||||
${<if-has-artist>}<h4><small><i>${artist-name}</i></small></h4>${</if-has-artist>}
|
||||
${play-btn}${add-btn}
|
||||
<div class="row Lms-explore-tracks-entry Lms-vertical-align">
|
||||
<div class="col-xs-9">
|
||||
<h4>${name}</h4>
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
${<if-has-release>}<small>${release-name}</small>${</if-has-release>}
|
||||
</div>
|
||||
<div class="col-sm-3 hidden-xs">
|
||||
${<if-has-artist>}<small><i>${artist-name}</i></small>${</if-has-artist>}
|
||||
</div>
|
||||
<div class="col-xs-3 Lms-explore-tracks-entry-controls">
|
||||
${play-btn}${add-btn}
|
||||
</div>
|
||||
</div>
|
||||
</message>
|
||||
|
||||
|
||||
+16
-1
@@ -159,6 +159,20 @@ a:hover {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
.Lms-explore-tracks-entry {
|
||||
min-height: 32px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.Lms-explore-tracks-entry:hover {
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
.Lms-explore-tracks-entry-controls {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.Lms-explore-btn {
|
||||
font-size: 22px !important;
|
||||
cursor: pointer;
|
||||
@@ -166,7 +180,8 @@ a:hover {
|
||||
|
||||
.Lms-playqueue-entry {
|
||||
min-height: 32px;
|
||||
margin-bottom: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
|
||||
.Lms-playqueue-entry:hover {
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
#include "TracksView.hpp"
|
||||
|
||||
#include <Wt/WAnchor.h>
|
||||
#include <Wt/WImage.h>
|
||||
#include <Wt/WLineEdit.h>
|
||||
#include <Wt/WText.h>
|
||||
|
||||
@@ -114,7 +113,6 @@ Tracks::addSome()
|
||||
{
|
||||
auto trackId = track.id();
|
||||
Wt::WTemplate* entry = _tracksContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Tracks.template.entry"));
|
||||
entry->addStyleClass("media");
|
||||
|
||||
entry->bindString("name", Wt::WString::fromUTF8(track->getName()), Wt::TextFormat::Plain);
|
||||
|
||||
@@ -130,29 +128,6 @@ Tracks::addSome()
|
||||
entry->bindWidget("release-name", LmsApplication::createReleaseAnchor(track->getRelease()));
|
||||
}
|
||||
|
||||
Wt::WImage* cover = entry->bindNew<Wt::WImage>("cover", LmsApp->getImageResource()->getTrackUrl(track.id(), 128));
|
||||
// Some images may not be square
|
||||
cover->setWidth(128);
|
||||
|
||||
Wt::WContainerWidget* clusterContainers = entry->bindNew<Wt::WContainerWidget>("clusters");
|
||||
{
|
||||
auto clusterTypes = ScanSettings::get(LmsApp->getDboSession())->getClusterTypes();
|
||||
auto clusterGroups = track->getClusterGroups(clusterTypes, 1);
|
||||
|
||||
for (auto clusters : clusterGroups)
|
||||
{
|
||||
for (auto cluster : clusters)
|
||||
{
|
||||
auto clusterId = cluster.id();
|
||||
auto entry = clusterContainers->addWidget(LmsApp->createCluster(cluster));
|
||||
entry->clicked().connect([=]
|
||||
{
|
||||
_filters->add(clusterId);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Wt::WText* playBtn = entry->bindNew<Wt::WText>("play-btn", Wt::WString::tr("Lms.Explore.template.play-btn"), Wt::TextFormat::XHTML);
|
||||
playBtn->clicked().connect(std::bind([=]
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user