mirror of
https://github.com/outbackdingo/labca.git
synced 2026-01-27 10:19:34 +00:00
Cosmetic: nicer spacing between buttons; debug versions are newer so do
not report them as older
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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.',
|
||||
|
||||
Reference in New Issue
Block a user