diff --git a/scripts/pi-hole/js/settings-advanced.js b/scripts/pi-hole/js/settings-advanced.js index de6e37d5..7b8e1db1 100644 --- a/scripts/pi-hole/js/settings-advanced.js +++ b/scripts/pi-hole/js/settings-advanced.js @@ -59,7 +59,7 @@ function generateRow(topic, key, value) { key + (value.modified ? ' ' : "") + (value.flags.advanced - ? ' ' + ? ' ' : "") + "" + "
" + diff --git a/scripts/pi-hole/js/settings.js b/scripts/pi-hole/js/settings.js index 9b56519f..c64d4f0f 100644 --- a/scripts/pi-hole/js/settings.js +++ b/scripts/pi-hole/js/settings.js @@ -20,6 +20,34 @@ $(".nav-tabs a").on("shown.bs.tab", function (e) { window.scrollTo(0, 0); }); +function initSettingsLevel() { + // Restore settings level from local storage (if available) or default to 0 + var level = localStorage.getItem("settings-level"); + if (level === null) { + level = "0"; + } + + // Set the settings level + $("#settings-level").val(level); + applySettingsLevel(level); +} + +function applySettingsLevel(level) { + if (level === "2") { + $(".settings-level-0").show(); + $(".settings-level-1").show(); + $(".settings-level-2").show(); + } else if (level === "1") { + $(".settings-level-0").show(); + $(".settings-level-1").show(); + $(".settings-level-2").hide(); + } else { + $(".settings-level-0").show(); + $(".settings-level-1").hide(); + $(".settings-level-2").hide(); + } +} + // Handle hiding of alerts $(function () { $("[data-hide]").on("click", function () { @@ -27,4 +55,12 @@ $(function () { .closest("." + $(this).attr("data-hide")) .hide(); }); + + $("#settings-level").on("change", function () { + var level = $(this).val(); + applySettingsLevel(level); + localStorage.setItem("settings-level", level); + }); + + initSettingsLevel(); }); diff --git a/scripts/pi-hole/php/header.php b/scripts/pi-hole/php/header.php index e8d1221f..c98e8bd7 100644 --- a/scripts/pi-hole/php/header.php +++ b/scripts/pi-hole/php/header.php @@ -32,7 +32,8 @@ $hostname = gethostname() ? gethostname() : ''; - + diff --git a/settings.php b/settings.php index 4b767d9d..a73f4e65 100644 --- a/settings.php +++ b/settings.php @@ -35,13 +35,23 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
Block clients making more than queries within seconds.
When a client makes too many queries in too short time, it @@ -427,8 +440,19 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp values to zero. See our documentation for further details.
-If not configured as your DHCP server, Pi-hole typically won't be able to determine the names of devices on your local network. As a result, tables such as Top Clients will only show IP addresses.
@@ -621,10 +645,10 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp