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

  • class="active"> Privacy
  • -
  • class="active"> +
  • class="active"> Teleporter
  • + +
    @@ -209,22 +219,18 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
    - -
    -
    +
    +
    +

    Actions  

    +
    -
    - - - - -
    +
    @@ -235,18 +241,15 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
    -
    -
    -
    -
    +
    -
    +
    -
    +
    @@ -325,10 +328,10 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
    -
    +
    -

    Interface settings

    +

    Interface settings  

    @@ -368,9 +371,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp
    -
    -
    -
    +

    Advanced DNS settings

    @@ -388,6 +389,7 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp If Conditional Forwarding is enabled, unticking this box may cause a partial DNS loop under certain circumstances (e.g. if a client would send TLD DNSSEC queries).

    +
    @@ -412,8 +414,19 @@ if (isset($_GET['tab']) && in_array($_GET['tab'], array('sysadmin', 'dns', 'dhcp when enabling DNSSEC. A DNSSEC resolver test can be found here.

    -
    -

    Rate-limiting

    +
    +
    +
    +
    +
    +
    +
    +
    +

    Rate-limiting  

    +
    +
    +
    +

    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.

    -
    -

    Conditional forwarding

    +
    +
    +
    +
    +
    +
    +
    +
    +

    Conditional forwarding  

    +
    +
    +
    +

    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
    -
    +
    -

    Static DHCP configuration  

    +

    Static DHCP configuration  

    diff --git a/style/pi-hole.css b/style/pi-hole.css index 6bb79a3c..15008b70 100644 --- a/style/pi-hole.css +++ b/style/pi-hole.css @@ -1041,3 +1041,10 @@ table.dataTable tbody > tr > .selected { left: 50%; translate: -50% -50%; } + +.pull-nav-right { + float: right !important; + margin-right: 5px; + margin-left: 5px; + padding: 5px; +}