Do not show Logout button when either no password is set or this is a local browser and localAPIauth is set to false

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-05-28 08:22:36 +02:00
parent 0f0f8c9deb
commit ab2d15bf91
3 changed files with 37 additions and 34 deletions

View File

@@ -94,7 +94,9 @@ mg.include('header.lp','r')
<a class="btn-link" href="https://discourse.pi-hole.net/" rel="noopener" target="_blank"><i class="fa-fw menu-icon fab fa-discourse"></i> Pi-hole Forum</a>
<a class="btn-link" href="https://github.com/pi-hole" rel="noopener" target="_blank"><i class="fa-fw menu-icon fab fa-github"></i> GitHub</a>
<a class="btn-link" href="https://discourse.pi-hole.net/c/announcements/5" rel="noopener" target="_blank"><i class="fa-fw menu-icon fa-solid fa-rocket"></i> Pi-hole Releases</a>
<? if pihole.needLogin(mg.request_info.remote_addr) then ?>
<a class="btn-link" href="#" onclick="utils.doLogout();"><i class="fa-fw menu-icon fa-solid fa-arrow-right-from-bracket"></i> Log out</a>
<? end ?>
</li>
</ul>
</li>