diff --git a/integration-tests/configs/config.hiddenNav.yaml b/integration-tests/configs/config.hiddenNav.yaml index 3edd298..f3ec261 100644 --- a/integration-tests/configs/config.hiddenNav.yaml +++ b/integration-tests/configs/config.hiddenNav.yaml @@ -4,7 +4,7 @@ listenAddressSingleHTTPFrontend: 0.0.0.0:1337 -hideNavigation: true +showNavigation: false checkForUpdates: false # Actions (buttons) to show up on the WebUI: diff --git a/internal/config/config.go b/internal/config/config.go index 7b83e64..e1b90e7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -60,7 +60,7 @@ type UserGroup struct { type Config struct { UseSingleHTTPFrontend bool ThemeName string - HideNavigation bool + ShowNavigation bool ListenAddressSingleHTTPFrontend string ListenAddressWebUI string ListenAddressRestActions string @@ -79,7 +79,7 @@ type Config struct { func DefaultConfig() *Config { config := Config{} config.UseSingleHTTPFrontend = true - config.HideNavigation = false + config.ShowNavigation = true config.ListenAddressSingleHTTPFrontend = "0.0.0.0:1337" config.ListenAddressRestActions = "localhost:1338" config.ListenAddressGrpcActions = "localhost:1339" diff --git a/internal/httpservers/webuiServer.go b/internal/httpservers/webuiServer.go index 3ce2f73..dceecc7 100644 --- a/internal/httpservers/webuiServer.go +++ b/internal/httpservers/webuiServer.go @@ -14,7 +14,7 @@ import ( type webUISettings struct { Rest string ThemeName string - HideNavigation bool + ShowNavigation bool AvailableVersion string CurrentVersion string ShowNewVersions bool @@ -52,7 +52,7 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) { jsonRet, _ := json.Marshal(webUISettings{ Rest: restAddress + "/api/", ThemeName: cfg.ThemeName, - HideNavigation: cfg.HideNavigation, + ShowNavigation: cfg.ShowNavigation, AvailableVersion: updatecheck.AvailableVersion, CurrentVersion: updatecheck.CurrentVersion, ShowNewVersions: cfg.ShowNewVersions, diff --git a/webui/main.js b/webui/main.js index 1184c8a..bfb8c89 100644 --- a/webui/main.js +++ b/webui/main.js @@ -62,7 +62,7 @@ function processWebuiSettingsJson (settings) { document.querySelector('#available-version').hidden = false } - document.querySelector('#section-switcher').hidden = settings.HideNavigation + document.querySelector('#section-switcher').hidden = !settings.ShowNavigation } function main () {