Added actual colors to tags

This commit is contained in:
emeric
2018-05-07 13:20:49 +02:00
parent 142ef53b6f
commit eedcb1c2b5
3 changed files with 44 additions and 6 deletions
+1 -1
View File
@@ -17,7 +17,7 @@
</message>
<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 id="Lms.Explore.template.add-filter">
+40
View File
@@ -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 {
font-weight: bold;
}
+3 -5
View File
@@ -175,16 +175,14 @@ LmsApplication::createReleaseAnchor(Database::Release::pointer release, bool add
std::unique_ptr<Wt::WTemplate>
LmsApplication::createCluster(Database::Cluster::pointer cluster, bool canDelete)
{
LMS_LOG(UI, DEBUG) << " Creating cluster for name " << cluster->getName();
auto res = std::make_unique<Wt::WTemplate>(Wt::WString::tr("Lms.Explore.template.cluster-entry"));
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").arg(styleClass));
res->addFunction("tr", &Wt::WTemplate::Functions::tr);
res->bindString("name", Wt::WString::fromUTF8(cluster->getName()), Wt::TextFormat::Plain);
res->setCondition("if-can-delete", canDelete);
std::string styleClass = "cluster-type-" + std::to_string(cluster->getType().id() % 10);
res->setStyleClass(styleClass);
return res;
}