mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 09:33:11 +00:00
Change copy and design on WF Updates page
- Tweak the copy - Include link to download latest release - Change the version status design a bit - Restyle some text
This commit is contained in:
parent
48ca695c46
commit
a06bb457de
4 changed files with 23 additions and 8 deletions
2
admin.go
2
admin.go
|
@ -586,6 +586,7 @@ func handleViewAdminUpdates(app *App, u *User, w http.ResponseWriter, r *http.Re
|
|||
LastChecked string
|
||||
LastChecked8601 string
|
||||
LatestVersion string
|
||||
LatestReleaseURL string
|
||||
LatestReleaseNotesURL string
|
||||
UpdateAvailable bool
|
||||
}{
|
||||
|
@ -595,6 +596,7 @@ func handleViewAdminUpdates(app *App, u *User, w http.ResponseWriter, r *http.Re
|
|||
p.LastChecked = app.updates.lastCheck.Format("January 2, 2006, 3:04 PM")
|
||||
p.LastChecked8601 = app.updates.lastCheck.Format("2006-01-02T15:04:05Z")
|
||||
p.LatestVersion = app.updates.LatestVersion()
|
||||
p.LatestReleaseURL = app.updates.ReleaseURL()
|
||||
p.LatestReleaseNotesURL = app.updates.ReleaseNotesURL()
|
||||
p.UpdateAvailable = app.updates.AreAvailable()
|
||||
}
|
||||
|
|
|
@ -1345,6 +1345,11 @@ div.row {
|
|||
}
|
||||
}
|
||||
|
||||
.check {
|
||||
font-size: 1.125em;
|
||||
color: #71D571;
|
||||
}
|
||||
|
||||
@media all and (max-width: 450px) {
|
||||
body#post {
|
||||
header {
|
||||
|
|
|
@ -2,20 +2,24 @@
|
|||
{{template "header" .}}
|
||||
|
||||
<style type="text/css">
|
||||
p.intro {
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="content-container snug">
|
||||
{{template "admin-header" .}}
|
||||
|
||||
{{if not .UpdateAvailable}}
|
||||
<p class="alert info">WriteFreely is up to date.</p>
|
||||
{{else}}
|
||||
<p class="alert info">WriteFreely {{.LatestVersion}} is available.</p>
|
||||
<section class="changelog">
|
||||
For details on features, bug fixes or notes on upgrading, <a href="{{.LatestReleaseNotesURL}}">read the release notes</a>.
|
||||
</section>
|
||||
{{end}}
|
||||
<p>Last checked at: <time class="dt-published" datetime="{{.LastChecked8601}}">{{.LastChecked}}</time>. <a href="/admin/updates?check=now">Check now</a>.</p>
|
||||
<p class="intro"><span class="check">✓</span> WriteFreely is <strong>up to date</strong>.</p>
|
||||
<p>Installed version: <strong>{{.Version}}</strong> (<a href="{{.LatestReleaseNotesURL}}" target="changelog-wf">release notes</a>).</p>
|
||||
{{else}}
|
||||
<p class="intro">A new version of WriteFreely is available! <a href="{{.LatestReleaseURL}}" target="download-wf" style="font-weight: bold;">Get {{.LatestVersion}}</a></p>
|
||||
<p class="changelog">
|
||||
<a href="{{.LatestReleaseNotesURL}}" target="changelog-wf">Read the release notes</a> for details on features, bug fixes, and notes on upgrading from your current version, <strong>{{.Version}}</strong>.
|
||||
</p>
|
||||
{{end}}
|
||||
<p style="font-size: 0.86em;"><em>Last checked</em>: <time class="dt-published" datetime="{{.LastChecked8601}}">{{.LastChecked}}</time>. <a href="/admin/updates?check=now">Check now</a>.</p>
|
||||
|
||||
<script>
|
||||
// Code modified from /js/localdate.js
|
||||
|
|
|
@ -63,6 +63,10 @@ func (uc updatesCache) LatestVersion() string {
|
|||
return uc.latestVersion
|
||||
}
|
||||
|
||||
func (uc updatesCache) ReleaseURL() string {
|
||||
return "https://writefreely.org/releases/" + uc.latestVersion
|
||||
}
|
||||
|
||||
// ReleaseNotesURL returns the full URL to the blog.writefreely.org release notes
|
||||
// for the latest version as stored in the cache.
|
||||
func (uc updatesCache) ReleaseNotesURL() string {
|
||||
|
|
Loading…
Reference in a new issue