mirror of
https://github.com/pi-hole/web.git
synced 2025-12-20 02:38:28 +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) {
|
||||
// Text (link to query log page)
|
||||
link.title = `List ${item.text} queries`;
|
||||
|
||||
link.className = "legend-label-text clickable";
|
||||
if (isQueryTypeChart) {
|
||||
link.href = `queries?type=${item.text}`;
|
||||
} else if (isForwardDestinationChart) {
|
||||
// Encode the forward destination as it may contain an "#" character
|
||||
link.href = `queries?upstream=${encodeURIComponent(upstreams[item.text])}`;
|
||||
}
|
||||
} else {
|
||||
link.className = "legend-label-text";
|
||||
}
|
||||
|
||||
link.style.textDecoration = item.hidden ? "line-through" : "";
|
||||
link.className = "legend-label-text";
|
||||
link.textContent = item.text;
|
||||
|
||||
li.append(boxSpan, link);
|
||||
|
||||
Reference in New Issue
Block a user