mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 22:30:56 +03:00
web: display version string
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
|||||||
|
|
||||||
"github.com/drakkan/sftpgo/dataprovider"
|
"github.com/drakkan/sftpgo/dataprovider"
|
||||||
"github.com/drakkan/sftpgo/sftpd"
|
"github.com/drakkan/sftpgo/sftpd"
|
||||||
|
"github.com/drakkan/sftpgo/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@@ -43,6 +44,7 @@ type basePage struct {
|
|||||||
ConnectionsURL string
|
ConnectionsURL string
|
||||||
UsersTitle string
|
UsersTitle string
|
||||||
ConnectionsTitle string
|
ConnectionsTitle string
|
||||||
|
Version string
|
||||||
}
|
}
|
||||||
|
|
||||||
type usersPage struct {
|
type usersPage struct {
|
||||||
@@ -98,6 +100,7 @@ func loadTemplates(templatesPath string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getBasePageData(title, currentURL string) basePage {
|
func getBasePageData(title, currentURL string) basePage {
|
||||||
|
version := utils.GetAppVersion()
|
||||||
return basePage{
|
return basePage{
|
||||||
Title: title,
|
Title: title,
|
||||||
CurrentURL: currentURL,
|
CurrentURL: currentURL,
|
||||||
@@ -109,6 +112,7 @@ func getBasePageData(title, currentURL string) basePage {
|
|||||||
ConnectionsURL: webConnectionsPath,
|
ConnectionsURL: webConnectionsPath,
|
||||||
UsersTitle: pageUsersTitle,
|
UsersTitle: pageUsersTitle,
|
||||||
ConnectionsTitle: pageConnectionsTitle,
|
ConnectionsTitle: pageConnectionsTitle,
|
||||||
|
Version: version.GetVersionAsString(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
; You need to change the paths for the source files to match your environment
|
; You need to change the paths for the source files to match your environment
|
||||||
|
|
||||||
#define MyAppName "SFTPGo"
|
#define MyAppName "SFTPGo"
|
||||||
#define MyAppVersion "0.9.3"
|
#define MyAppVersion "0.9.3-dev"
|
||||||
#define MyAppURL "https://github.com/drakkan/sftpgo"
|
#define MyAppURL "https://github.com/drakkan/sftpgo"
|
||||||
#define MyAppExeName "sftpgo.exe"
|
#define MyAppExeName "sftpgo.exe"
|
||||||
#define MyAppDir "C:\Users\vbox\Desktop\sftpgo_setup"
|
#define MyAppDir "C:\Users\vbox\Desktop\sftpgo_setup"
|
||||||
|
|||||||
@@ -99,6 +99,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- End of Main Content -->
|
<!-- End of Main Content -->
|
||||||
|
|
||||||
|
<!-- Footer -->
|
||||||
|
<footer class="sticky-footer bg-white">
|
||||||
|
<div class="container my-auto">
|
||||||
|
<div class="copyright text-center my-auto">
|
||||||
|
<span>SFTPGo {{.Version}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
<!-- End of Footer -->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- End of Content Wrapper -->
|
<!-- End of Content Wrapper -->
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package utils
|
package utils
|
||||||
|
|
||||||
const version = "0.9.3"
|
const version = "0.9.3-dev"
|
||||||
|
|
||||||
var (
|
var (
|
||||||
commit = ""
|
commit = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user