Added some more customization options (#43)

* Added some more customization options

* Fixed inconsistent height of custom logos

* Extended navbar style to login page
This commit is contained in:
The one with the braid (she/her) | Dфҿ mit dem Zopf (sie/ihr)
2021-09-12 10:17:13 +02:00
committed by GitHub
parent f27909a6ce
commit 9147fe33cb
7 changed files with 17 additions and 4 deletions

View File

@@ -67,6 +67,7 @@ type Config struct {
SelfProvisioningAllowed bool `yaml:"selfProvisioning" envconfig:"SELF_PROVISIONING"`
LdapEnabled bool `yaml:"ldapEnabled" envconfig:"LDAP_ENABLED"`
SessionSecret string `yaml:"sessionSecret" envconfig:"SESSION_SECRET"`
LogoUrl string `yaml:"logoUrl" envconfig:"LOGO_URL"`
} `yaml:"core"`
Database common.DatabaseConfig `yaml:"database"`
Email common.MailConfig `yaml:"email"`
@@ -81,6 +82,7 @@ func NewConfig() *Config {
cfg.Core.ListeningAddress = ":8123"
cfg.Core.Title = "WireGuard VPN"
cfg.Core.CompanyName = "WireGuard Portal"
cfg.Core.LogoUrl = "/img/header-logo.png"
cfg.Core.ExternalUrl = "http://localhost:8123"
cfg.Core.MailFrom = "WireGuard VPN <noreply@company.com>"
cfg.Core.AdminUser = "admin@wgportal.local"

View File

@@ -253,7 +253,7 @@ func (s *Server) getExecutableDirectory() string {
func (s *Server) getStaticData() StaticData {
return StaticData{
WebsiteTitle: s.config.Core.Title,
WebsiteLogo: "/img/header-logo.png",
WebsiteLogo: s.config.Core.LogoUrl,
CompanyName: s.config.Core.CompanyName,
Year: time.Now().Year(),
Version: Version,