Added actual colors to tags
This commit is contained in:
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.template.cluster-entry">
|
<message id="Lms.Explore.template.cluster-entry">
|
||||||
<span class="badge">${<if-can-delete>}<i class="fa fa-times-circle"></i>${</if-can-delete>} ${name}</span>
|
<span class="badge {1}">${<if-can-delete>}<i class="fa fa-times-circle"></i>${</if-can-delete>} ${name}</span>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message id="Lms.Explore.template.add-filter">
|
<message id="Lms.Explore.template.add-filter">
|
||||||
|
|||||||
@@ -1,4 +1,44 @@
|
|||||||
|
|
||||||
|
.Lms-cluster-type-0 {
|
||||||
|
background-color: darkslategrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-1 {
|
||||||
|
background-color: darkblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-2 {
|
||||||
|
background-color: darkgrey;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-3 {
|
||||||
|
background-color: darkorchid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-4 {
|
||||||
|
background-color: darkslateblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-5 {
|
||||||
|
background-color: darkslateblue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-6 {
|
||||||
|
background-color: darkolivegreen;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-7 {
|
||||||
|
background-color: darkred;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-8 {
|
||||||
|
background-color: darkviolet;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Lms-cluster-type-9 {
|
||||||
|
background-color: darkturquoise;
|
||||||
|
}
|
||||||
|
|
||||||
.Lms-playqueue-selected {
|
.Lms-playqueue-selected {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -175,16 +175,14 @@ LmsApplication::createReleaseAnchor(Database::Release::pointer release, bool add
|
|||||||
std::unique_ptr<Wt::WTemplate>
|
std::unique_ptr<Wt::WTemplate>
|
||||||
LmsApplication::createCluster(Database::Cluster::pointer cluster, bool canDelete)
|
LmsApplication::createCluster(Database::Cluster::pointer cluster, bool canDelete)
|
||||||
{
|
{
|
||||||
LMS_LOG(UI, DEBUG) << " Creating cluster for name " << cluster->getName();
|
std::string styleClass = "Lms-cluster-type-" + std::to_string(cluster->getType().id() % 10);
|
||||||
auto res = std::make_unique<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.template.cluster-entry"));
|
|
||||||
|
auto res = std::make_unique<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.template.cluster-entry").arg(styleClass));
|
||||||
res->addFunction("tr", &Wt::WTemplate::Functions::tr);
|
res->addFunction("tr", &Wt::WTemplate::Functions::tr);
|
||||||
|
|
||||||
res->bindString("name", Wt::WString::fromUTF8(cluster->getName()), Wt::TextFormat::Plain);
|
res->bindString("name", Wt::WString::fromUTF8(cluster->getName()), Wt::TextFormat::Plain);
|
||||||
res->setCondition("if-can-delete", canDelete);
|
res->setCondition("if-can-delete", canDelete);
|
||||||
|
|
||||||
std::string styleClass = "cluster-type-" + std::to_string(cluster->getType().id() % 10);
|
|
||||||
res->setStyleClass(styleClass);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user