diff --git a/handler/routes.go b/handler/routes.go
index cc66a66..04f3208 100644
--- a/handler/routes.go
+++ b/handler/routes.go
@@ -829,3 +829,13 @@ func ApplyServerConfig(db store.IStore, tmplBox *rice.Box) echo.HandlerFunc {
return c.JSON(http.StatusOK, jsonHTTPResponse{true, "Applied server config successfully"})
}
}
+
+// AboutPage handler
+func AboutPage() echo.HandlerFunc {
+ return func(c echo.Context) error {
+ return c.Render(http.StatusOK, "about.html", map[string]interface{}{
+ "baseData": model.BaseData{Active: "about", CurrentUser: currentUser(c)},
+ })
+ }
+}
+
diff --git a/main.go b/main.go
index 683b5e8..cbfa8b7 100644
--- a/main.go
+++ b/main.go
@@ -147,6 +147,7 @@ func main() {
sendmail = emailer.NewSmtpMail(util.SmtpHostname, util.SmtpPort, util.SmtpUsername, util.SmtpPassword, util.SmtpNoTLSCheck, util.SmtpAuthType, util.EmailFromName, util.EmailFrom, util.SmtpEncryption)
}
+ app.GET(util.BasePath+"/about", handler.AboutPage())
app.GET(util.BasePath+"/_health", handler.Health())
app.GET(util.BasePath+"/favicon", handler.Favicon())
app.POST(util.BasePath+"/new-client", handler.NewClient(db), handler.ValidSession, handler.ContentTypeJson)
diff --git a/router/router.go b/router/router.go
index 0f9facc..9aeaf1b 100644
--- a/router/router.go
+++ b/router/router.go
@@ -93,6 +93,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,
@@ -105,6 +110,7 @@ func New(tmplBox *rice.Box, extraData map[string]string, secret []byte) *echo.Ec
templates["global_settings.html"] = template.Must(template.New("global_settings").Funcs(funcs).Parse(tmplBaseString + tmplGlobalSettingsString))
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())
diff --git a/templates/about.html b/templates/about.html
new file mode 100644
index 0000000..4fc6b77
--- /dev/null
+++ b/templates/about.html
@@ -0,0 +1,139 @@
+{{ define "title"}}
+About
+{{ end }}
+
+{{ define "top_css"}}
+{{ end }}
+
+{{ define "username"}}
+{{ .username }}
+{{ end }}
+
+{{ define "page_title"}}
+About
+{{ end }}
+
+{{ define "page_content"}}
+About Wireguard-UI
+
+ About +
+ +