Add default external apps

Accounts and Settings should be enabled by default from now on.
This commit is contained in:
Benedikt Kulmann
2020-08-20 09:21:19 +02:00
parent f924b539d5
commit 87bcc648e7

View File

@@ -68,6 +68,19 @@ func (p Phoenix) getPayload() (payload []byte, err error) {
p.config.Phoenix.Config.Options["hideSearchBar"] = true
}
if p.config.Phoenix.Config.ExternalApps == nil {
p.config.Phoenix.Config.ExternalApps = []config.ExternalApp{
{
ID: "accounts",
Path: "https://localhost:9200/accounts.js",
},
{
ID: "settings",
Path: "https://localhost:9200/settings.js",
},
}
}
// make apps render as empty array if it is empty
// TODO remove once https://github.com/golang/go/issues/27589 is fixed
if len(p.config.Phoenix.Config.Apps) == 0 {