Version on config page
This commit is contained in:
parent
60ebd860b2
commit
17f7f1fb04
6 changed files with 13 additions and 10 deletions
2
.version
2
.version
|
|
@ -1 +1 @@
|
|||
internal/web/templates/footer.html
|
||||
internal/web/templates/version
|
||||
|
|
@ -26,8 +26,9 @@ type Conf struct {
|
|||
|
||||
// GuiData - all data sent to html page
|
||||
type GuiData struct {
|
||||
Config Conf
|
||||
Hosts []Host
|
||||
Icon string
|
||||
Themes []string
|
||||
Config Conf
|
||||
Hosts []Host
|
||||
Icon string
|
||||
Themes []string
|
||||
Version string
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
|
|||
guiData.Config = AppConfig
|
||||
guiData.Icon = Icon
|
||||
|
||||
file, err := TemplHTML.ReadFile(TemplPath + "version")
|
||||
check.IfError(err)
|
||||
|
||||
guiData.Version = string(file)
|
||||
|
||||
guiData.Themes = []string{"cerulean", "cosmo", "cyborg", "darkly", "flatly", "journal", "litera", "lumen", "lux", "materia", "minty", "morph", "pulse", "quartz", "sandstone", "simplex", "sketchy", "slate", "solar", "spacelab", "superhero", "united", "vapor", "yeti", "zephyr"}
|
||||
|
||||
execTemplate(w, "config", guiData)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@
|
|||
</table>
|
||||
</div>
|
||||
<div class="col">
|
||||
<p>{{ .Version }}</p>
|
||||
<div class="alert alert-info" role="alert">
|
||||
<h4 class="alert-heading">Warning!</h4>
|
||||
<p>After changing <b>Host</b> or <b>Port</b> you need to restart the app</p>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
{{ define "footer"}}
|
||||
<div class="fixed-bottom">
|
||||
<h6 style="font-size: 10px;">
|
||||
VERSION=0.9.1
|
||||
</h6>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{{ end }}
|
||||
1
internal/web/templates/version
Normal file
1
internal/web/templates/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
VERSION=0.9.1
|
||||
Loading…
Reference in a new issue