Skip to content

Commit

Permalink
Base expert icon on expert class not FTL advanced flag (#3043)
Browse files Browse the repository at this point in the history
  • Loading branch information
yubiuser authored Jun 5, 2024
2 parents 6fafc94 + 9585aed commit 04363c0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/pi-hole/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ function setConfigValues(topic, key, value) {
var escapedKey = key.replaceAll(".", "\\.");
var envTitle = $(`[data-configkeys~='${key}']`);

if (value.flags.advanced && envTitle.find(".advanced-warning").length === 0) {
if (
envTitle.parents().parents().hasClass("settings-level-expert") &&
envTitle.find(".expert-warning").length === 0
) {
envTitle.append(
`<span class="advanced-warning">&nbsp;&nbsp;<i class="fas fa-wrench" title="Expert level setting"></i></span>`
`<span class="expert-warning">&nbsp;&nbsp;<i class="fas fa-wrench" title="Expert level setting"></i></span>`
);
}

Expand Down

0 comments on commit 04363c0

Please sign in to comment.