aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pkg/app/handler/about/index.templ19
1 files changed, 8 insertions, 11 deletions
diff --git a/pkg/app/handler/about/index.templ b/pkg/app/handler/about/index.templ
index 7d4311d..16a0b5f 100644
--- a/pkg/app/handler/about/index.templ
+++ b/pkg/app/handler/about/index.templ
@@ -9,22 +9,13 @@ func getCommitId() string {
if info, ok := debug.ReadBuildInfo(); ok {
for _, setting := range info.Settings {
if setting.Key == "vcs.revision" {
- return setting.Value[:8]
+ return setting.Value
}
}
}
return ""
}
-func versionText() string {
- commitId := getCommitId()
- version := config.Version()
- if commitId == "" {
- return "Currently " + version + " is running."
- }
- return "Currently " + version + " is running, based on commit " + commitId + "."
-}
-
templ index() {
<div class="container mb-5">
<div class="row">
@@ -40,7 +31,13 @@ templ index() {
<h2>FAQ</h2>
<dl>
<dt>Which version is currently running?</dt>
- <dd>{ versionText() }</dd>
+ <dd>
+ if commitId := getCommitId(); commitId == "" {
+ Currently { config.Version() } is running.
+ } else {
+ Currently { config.Version() } is running, based on commit <a href={ templ.URL("https://gitweb.gentoo.org/sites/soko.git/commit/?id=" + commitId) }>{ commitId[:8] }</a>.
+ }
+ </dd>
<br/>
<dt>How often is the site updated?</dt>
<dd>