Browse Source

feat: only show the commit URL if it's not empty on `/about`

Julien Voisin 1 year ago
parent
commit
6eb1f25a53
1 changed files with 2 additions and 0 deletions
  1. 2 0
      internal/template/templates/views/about.html

+ 2 - 0
internal/template/templates/views/about.html

@@ -12,7 +12,9 @@
     <h3>Miniflux</h3>
     <ul>
         <li><strong>{{ t "page.about.version" }}</strong> <a href="https://github.com/miniflux/v2/releases/tag/{{ .version }}">{{ .version }}</a></li>
+	{{ if .commit }}
         <li><strong>Git Commit</strong> <a href="https://github.com/miniflux/v2/commit/{{ .commit }}">{{ .commit }}</a></li>
+	{{ end }}
         <li><strong>{{ t "page.about.build_date" }}</strong> {{ .build_date }}</li>
         {{ if .user.IsAdmin }}<li><strong>{{ t "page.about.postgres_version" }}</strong> {{ .postgres_version }}</li>{{ end }}
 	<li><strong>{{t "page.about.go_version" }}</strong> {{ .go_version }}</li>