Skip to content

Commit

Permalink
Base expert icon on expert class no FTL advanced flag
Browse files Browse the repository at this point in the history
Signed-off-by: Christian König <[email protected]>
  • Loading branch information
yubiuser committed Jun 4, 2024
1 parent 6fafc94 commit 947bb88
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 947bb88

Please sign in to comment.