Improve notification for a new version, show release notes
This commit is contained in:
@@ -34,13 +34,12 @@
|
||||
</div>
|
||||
<div class="top-bar-right">
|
||||
<ul class="menu">
|
||||
{{ if newVersion }}
|
||||
<li>
|
||||
<div><a href="https://github.com/tardisx/linkwallet/releases/tag/{{ newVersion }}">{{ newVersion }} available</a></div>
|
||||
</li>
|
||||
{{ end }}
|
||||
<li class="menu-text">
|
||||
{{ version }}
|
||||
<a href="/releaseinfo">{{ version.Local.Tag }}
|
||||
{{ if version.UpgradeAvailable }}
|
||||
❗
|
||||
{{ end }}
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/tardisx/linkwallet">
|
||||
@@ -64,6 +63,8 @@
|
||||
{{ template "config.html" . }}
|
||||
{{ else if eq .page "edit" }}
|
||||
{{ template "edit.html" . }}
|
||||
{{ else if eq .page "releaseinfo" }}
|
||||
{{ template "release_info.html" . }}
|
||||
{{ end }}
|
||||
{{/* template "foundation_sample.html" . */}}
|
||||
</div>
|
||||
|
||||
23
web/templates/release_info.html
Normal file
23
web/templates/release_info.html
Normal file
@@ -0,0 +1,23 @@
|
||||
<div class="grid-x grid-padding-x">
|
||||
<div class="large-12 cell">
|
||||
|
||||
<h5>Release info</h5>
|
||||
{{ if not version.Remote.Valid }}
|
||||
<p>GitHub version information not yet fetched.</p>
|
||||
{{ else }}
|
||||
{{ if version.UpgradeAvailable }}
|
||||
<p>
|
||||
A new version is available:
|
||||
<a href="https://github.com/tardisx/linkwallet/releases/tag/{{ version.Remote.Tag }}">
|
||||
{{ version.Remote.Tag }}
|
||||
</a>
|
||||
(you have {{ version.Local.Tag }}).
|
||||
</p>
|
||||
|
||||
{{ markdown version.UpgradeReleaseNotes }}
|
||||
|
||||
{{ else }}
|
||||
<p>You are currently running the most recent version.</p>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
Reference in New Issue
Block a user