mirror of
https://github.com/swissmakers/fail2ban-ui.git
synced 2026-04-15 05:03:14 +02:00
fix mobile toggle auto close after click
This commit is contained in:
@@ -230,8 +230,8 @@ func IndexHandler(c *gin.Context) {
|
||||
|
||||
// GetJailFilterConfigHandler returns the raw filter config for a given jail
|
||||
func GetJailFilterConfigHandler(c *gin.Context) {
|
||||
fmt.Println("----------------------------")
|
||||
fmt.Println("GetJailFilterConfigHandler called (handlers.go)") // entry point
|
||||
config.DebugLog("----------------------------")
|
||||
config.DebugLog("GetJailFilterConfigHandler called (handlers.go)") // entry point
|
||||
jail := c.Param("jail")
|
||||
cfg, err := fail2ban.GetJailConfig(jail)
|
||||
if err != nil {
|
||||
|
||||
@@ -350,6 +350,13 @@ function showSection(sectionId) {
|
||||
if (sectionId === 'settingsSection') {
|
||||
loadSettings();
|
||||
}
|
||||
|
||||
// Close navbar on mobile when clicking a menu item
|
||||
let navbar = document.getElementById('navbarSupportedContent');
|
||||
if (navbar.classList.contains('show')) {
|
||||
let navbarToggler = document.querySelector('.navbar-toggler');
|
||||
navbarToggler.click();
|
||||
}
|
||||
}
|
||||
|
||||
//*******************************************************************
|
||||
|
||||
Reference in New Issue
Block a user