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>}
|
${<if-has-artist>}<small><i>${artist-name}</i></small>${</if-has-artist>}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-3 Lms-playqueue-entry-controls">
|
<div class="col-xs-3 Lms-playqueue-entry-controls">
|
||||||
${play-btn} ${del-btn}
|
${play-btn}${del-btn}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
+13
-8
@@ -23,14 +23,19 @@
|
|||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.Tracks.template.entry">
|
<message id="Lms.Explore.Tracks.template.entry">
|
||||||
<div class="media-left">
|
<div class="row Lms-explore-tracks-entry Lms-vertical-align">
|
||||||
${cover class="media-object"}
|
<div class="col-xs-9">
|
||||||
</div>
|
<h4>${name}</h4>
|
||||||
<div class="media-body media-middle">
|
</div>
|
||||||
<h4 class="media-heading">${name}</h4>
|
<div class="col-sm-3 hidden-xs">
|
||||||
${<if-has-release>}<h4><small>${release-name}</small></h4>${</if-has-release>}
|
${<if-has-release>}<small>${release-name}</small>${</if-has-release>}
|
||||||
${<if-has-artist>}<h4><small><i>${artist-name}</i></small></h4>${</if-has-artist>}
|
</div>
|
||||||
${play-btn}${add-btn}
|
<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>
|
</div>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
|
|||||||
+16
-1
@@ -159,6 +159,20 @@ a:hover {
|
|||||||
background-color: lightgrey;
|
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 {
|
.Lms-explore-btn {
|
||||||
font-size: 22px !important;
|
font-size: 22px !important;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -166,7 +180,8 @@ a:hover {
|
|||||||
|
|
||||||
.Lms-playqueue-entry {
|
.Lms-playqueue-entry {
|
||||||
min-height: 32px;
|
min-height: 32px;
|
||||||
margin-bottom: 2px;
|
padding-top: 2px;
|
||||||
|
padding-bottom: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Lms-playqueue-entry:hover {
|
.Lms-playqueue-entry:hover {
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
#include "TracksView.hpp"
|
#include "TracksView.hpp"
|
||||||
|
|
||||||
#include <Wt/WAnchor.h>
|
#include <Wt/WAnchor.h>
|
||||||
#include <Wt/WImage.h>
|
|
||||||
#include <Wt/WLineEdit.h>
|
#include <Wt/WLineEdit.h>
|
||||||
#include <Wt/WText.h>
|
#include <Wt/WText.h>
|
||||||
|
|
||||||
@@ -114,7 +113,6 @@ Tracks::addSome()
|
|||||||
{
|
{
|
||||||
auto trackId = track.id();
|
auto trackId = track.id();
|
||||||
Wt::WTemplate* entry = _tracksContainer->addNew<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.Tracks.template.entry"));
|
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);
|
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()));
|
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);
|
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([=]
|
playBtn->clicked().connect(std::bind([=]
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user