diff --git a/cmd/config.go b/cmd/config.go index 8e2d3548..47a62397 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -41,6 +41,7 @@ func addConfigFlags(flags *pflag.FlagSet) { flags.String("recaptcha.secret", "", "ReCaptcha secret") flags.String("branding.name", "", "replace 'File Browser' by this name") + flags.String("branding.color", "", "set the theme color") flags.String("branding.files", "", "path to directory with images and custom styles") flags.Bool("branding.disableExternal", false, "disable external links such as GitHub links") } @@ -131,6 +132,7 @@ func printSettings(ser *settings.Server, set *settings.Settings, auther auth.Aut fmt.Fprintf(w, "\tName:\t%s\n", set.Branding.Name) fmt.Fprintf(w, "\tFiles override:\t%s\n", set.Branding.Files) fmt.Fprintf(w, "\tDisable external links:\t%t\n", set.Branding.DisableExternal) + fmt.Fprintf(w, "\tColor:\t%s\n", set.Branding.Color) fmt.Fprintln(w, "\nServer:") fmt.Fprintf(w, "\tLog:\t%s\n", ser.Log) fmt.Fprintf(w, "\tPort:\t%s\n", ser.Port) diff --git a/cmd/config_set.go b/cmd/config_set.go index e959bc97..058f0d6b 100644 --- a/cmd/config_set.go +++ b/cmd/config_set.go @@ -51,6 +51,8 @@ you want to change. Other options will remain unchanged.`, set.Shell = convertCmdStrToCmdArray(mustGetString(flags, flag.Name)) case "branding.name": set.Branding.Name = mustGetString(flags, flag.Name) + case "branding.color": + set.Branding.Color = mustGetString(flags, flag.Name) case "branding.disableExternal": set.Branding.DisableExternal = mustGetBool(flags, flag.Name) case "branding.files": diff --git a/frontend/public/index.html b/frontend/public/index.html index adab4cb8..d6986bf1 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -16,7 +16,7 @@ - + @@ -26,7 +26,7 @@ - +