mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 10:48:26 +00:00
Only underline clickable legend items in pie charts
Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
@@ -91,17 +91,18 @@ globalThis.htmlLegendPlugin = {
|
|||||||
if (isQueryTypeChart || isForwardDestinationChart) {
|
if (isQueryTypeChart || isForwardDestinationChart) {
|
||||||
// Text (link to query log page)
|
// Text (link to query log page)
|
||||||
link.title = `List ${item.text} queries`;
|
link.title = `List ${item.text} queries`;
|
||||||
|
link.className = "legend-label-text clickable";
|
||||||
if (isQueryTypeChart) {
|
if (isQueryTypeChart) {
|
||||||
link.href = `queries?type=${item.text}`;
|
link.href = `queries?type=${item.text}`;
|
||||||
} else if (isForwardDestinationChart) {
|
} else if (isForwardDestinationChart) {
|
||||||
// Encode the forward destination as it may contain an "#" character
|
// Encode the forward destination as it may contain an "#" character
|
||||||
link.href = `queries?upstream=${encodeURIComponent(upstreams[item.text])}`;
|
link.href = `queries?upstream=${encodeURIComponent(upstreams[item.text])}`;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
link.className = "legend-label-text";
|
||||||
}
|
}
|
||||||
|
|
||||||
link.style.textDecoration = item.hidden ? "line-through" : "";
|
link.style.textDecoration = item.hidden ? "line-through" : "";
|
||||||
link.className = "legend-label-text";
|
|
||||||
link.textContent = item.text;
|
link.textContent = item.text;
|
||||||
|
|
||||||
li.append(boxSpan, link);
|
li.append(boxSpan, link);
|
||||||
|
|||||||
@@ -300,7 +300,7 @@ td.lookatme {
|
|||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.chart-legend li a.legend-label-text:hover {
|
.chart-legend li a.legend-label-text.clickable:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user