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
|
// GuiData - all data sent to html page
|
||||||
type GuiData struct {
|
type GuiData struct {
|
||||||
Config Conf
|
Config Conf
|
||||||
Hosts []Host
|
Hosts []Host
|
||||||
Icon string
|
Icon string
|
||||||
Themes []string
|
Themes []string
|
||||||
|
Version string
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,11 @@ func configHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
guiData.Config = AppConfig
|
guiData.Config = AppConfig
|
||||||
guiData.Icon = Icon
|
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"}
|
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)
|
execTemplate(w, "config", guiData)
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
|
<p>{{ .Version }}</p>
|
||||||
<div class="alert alert-info" role="alert">
|
<div class="alert alert-info" role="alert">
|
||||||
<h4 class="alert-heading">Warning!</h4>
|
<h4 class="alert-heading">Warning!</h4>
|
||||||
<p>After changing <b>Host</b> or <b>Port</b> you need to restart the app</p>
|
<p>After changing <b>Host</b> or <b>Port</b> you need to restart the app</p>
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,4 @@
|
||||||
{{ define "footer"}}
|
{{ define "footer"}}
|
||||||
<div class="fixed-bottom">
|
|
||||||
<h6 style="font-size: 10px;">
|
|
||||||
VERSION=0.9.1
|
|
||||||
</h6>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
{{ end }}
|
{{ 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