mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-10 17:43:58 +03:00
Merge branch 'master' into email-settings-UI
This commit is contained in:
commit
0722c0f43d
13 changed files with 245 additions and 18 deletions
|
@ -98,6 +98,11 @@ func New(tmplBox *rice.Box, extraData map[string]string, secret []byte) *echo.Ec
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
aboutPageString, err := tmplBox.String("about.html")
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
// create template list
|
||||
funcs := template.FuncMap{
|
||||
"StringsJoin": strings.Join,
|
||||
|
@ -111,6 +116,7 @@ func New(tmplBox *rice.Box, extraData map[string]string, secret []byte) *echo.Ec
|
|||
templates["email_settings.html"] = template.Must(template.New("email_settings").Funcs(funcs).Parse(tmplBaseString + tmplEmailSettingsString))
|
||||
templates["status.html"] = template.Must(template.New("status").Funcs(funcs).Parse(tmplBaseString + tmplStatusString))
|
||||
templates["wake_on_lan_hosts.html"] = template.Must(template.New("wake_on_lan_hosts").Funcs(funcs).Parse(tmplBaseString + tmplWakeOnLanHostsString))
|
||||
templates["about.html"] = template.Must(template.New("about").Funcs(funcs).Parse(tmplBaseString + aboutPageString))
|
||||
|
||||
e.Logger.SetLevel(log.DEBUG)
|
||||
e.Pre(middleware.RemoveTrailingSlash())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue