mirror of
https://github.com/ngoduykhanh/wireguard-ui.git
synced 2025-07-09 17:34:25 +03:00
Show app version on the UI
This commit is contained in:
parent
8aa84b2be6
commit
9169e75e88
3 changed files with 19 additions and 3 deletions
6
main.go
6
main.go
|
@ -25,6 +25,10 @@ func main() {
|
|||
fmt.Println("Build Time\t:", buildTime)
|
||||
fmt.Println("Git Repo\t:", "https://github.com/ngoduykhanh/wireguard-ui")
|
||||
|
||||
// set app extra data
|
||||
extraData := make(map[string]string)
|
||||
extraData["appVersion"] = appVersion
|
||||
|
||||
// initialize DB
|
||||
err := util.InitDB()
|
||||
if err != nil {
|
||||
|
@ -38,7 +42,7 @@ func main() {
|
|||
assetHandler := http.FileServer(rice.MustFindBox("assets").HTTPBox())
|
||||
|
||||
// register routes
|
||||
app := router.New(tmplBox)
|
||||
app := router.New(tmplBox, extraData)
|
||||
|
||||
app.GET("/", handler.WireGuardClients())
|
||||
app.GET("/login", handler.LoginPage())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue