Cosmetic: nicer spacing between buttons; debug versions are newer so do

not report them as older
This commit is contained in:
Arjan H
2020-08-06 18:48:39 +02:00
parent 0393d1ded6
commit af7c3edc6f
2 changed files with 10 additions and 1 deletions

View File

@@ -259,6 +259,10 @@ func checkUpdates(forced bool) ([]string, []string) {
if *release.Name == version {
newer = false
}
if strings.HasPrefix(version, *release.Name + "-") { // git describe format
newer = false
latest = version
}
if newer {
versions = append(versions, *release.Name)
descriptions = append(descriptions, *release.Body)

View File

@@ -44,7 +44,9 @@
<button class="btn btn-outline btn-reg {{ $btn.Class }}" type="button" id="{{ $btn.Id }}" title="{{ $btn.Title }}">{{ $btn.Label }}</button>
{{ end }}
{{ if eq $item.Name "LabCA Application" }}
<br/>
<span id="version-conditional-break" class="{{ if not $.UpdateAvailable }}hidden{{ end }}"/>
<br/>
</span>
<button class="btn btn-outline btn-wide btn-warning mt5 {{ if not $.UpdateAvailable }}hidden{{ end }}" type="button" id="version-update" title="Update to latest version">Update LabCA</button>
<br/>
<button class="btn btn-outline btn-wide btn-success mt5" type="button" id="version-check" title="Check if there is a newer version available">Check for updates</button>
@@ -628,6 +630,7 @@
if (data.Success) {
if (data.UpdateAvailable) {
$("#version-update").removeClass("hidden");
$("#version-conditional-break").removeClass("hidden");
var notes = "<span class=\"rel-notes-title\">RELEASE NOTES</span><br/><br/>";
jQuery.each(data.Versions, function(idx, val) {
@@ -647,6 +650,8 @@
});
} else {
$("#version-update").addClass("hidden")
$("#version-conditional-break").addClass("hidden");
BootstrapDialog.show({
title: 'No new version',
message: 'There is currently no newer version available.',