From af78385759d8179def2335637862d695846d8af9 Mon Sep 17 00:00:00 2001 From: Russell Jones Date: Tue, 22 Mar 2022 00:43:28 +0000 Subject: [PATCH] feature: Show/Hide footer --- internal/config/config.go | 2 ++ internal/httpservers/webuiServer.go | 2 ++ webui/main.js | 1 + 3 files changed, 5 insertions(+) diff --git a/internal/config/config.go b/internal/config/config.go index 7b83e64a..db4c6715 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -61,6 +61,7 @@ type Config struct { UseSingleHTTPFrontend bool ThemeName string HideNavigation bool + ShowFooter bool ListenAddressSingleHTTPFrontend string ListenAddressWebUI string ListenAddressRestActions string @@ -80,6 +81,7 @@ func DefaultConfig() *Config { config := Config{} config.UseSingleHTTPFrontend = true config.HideNavigation = false + config.ShowFooter = 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 3ce2f734..525f7460 100644 --- a/internal/httpservers/webuiServer.go +++ b/internal/httpservers/webuiServer.go @@ -15,6 +15,7 @@ type webUISettings struct { Rest string ThemeName string HideNavigation bool + ShowFooter bool AvailableVersion string CurrentVersion string ShowNewVersions bool @@ -53,6 +54,7 @@ func generateWebUISettings(w http.ResponseWriter, r *http.Request) { Rest: restAddress + "/api/", ThemeName: cfg.ThemeName, HideNavigation: cfg.HideNavigation, + ShowFooter: cfg.ShowFooter, AvailableVersion: updatecheck.AvailableVersion, CurrentVersion: updatecheck.CurrentVersion, ShowNewVersions: cfg.ShowNewVersions, diff --git a/webui/main.js b/webui/main.js index 1184c8a7..0f2f2e95 100644 --- a/webui/main.js +++ b/webui/main.js @@ -63,6 +63,7 @@ function processWebuiSettingsJson (settings) { } document.querySelector('#section-switcher').hidden = settings.HideNavigation + document.querySelector('footer[title="footer"]').hidden = !settings.ShowFooter } function main () {