mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Changed WebUI Version Check to SemVer. Also addes "Alpha" Channel (#692)
This commit is contained in:
@@ -75,7 +75,7 @@ $(document).ready( function() {
|
||||
|
||||
// add more info
|
||||
$('#dash_leddevice').html(window.serverConfig.device.type);
|
||||
$('#dash_currv').html(window.currentChannel+' '+window.currentVersion);
|
||||
$('#dash_currv').html(window.currentVersion);
|
||||
$('#dash_instance').html(window.currentHyperionInstanceName);
|
||||
$('#dash_ports').html(window.serverConfig.flatbufServer.port+' | '+window.serverConfig.protoServer.port);
|
||||
$('#dash_watchedversionbranch').html(window.serverConfig.general.watchedVersionBranch);
|
||||
@@ -83,17 +83,15 @@ $(document).ready( function() {
|
||||
getReleases(function(callback){
|
||||
if(callback)
|
||||
{
|
||||
var cleanLatestVersion = window.latestVersion.tag_name.replace(/\./g, '');
|
||||
var cleanCurrentVersion = window.currentVersion.replace(/\./g, '');
|
||||
debugger;
|
||||
$('#dash_latev').html(window.latestVersion.tag_name);
|
||||
|
||||
$('#dash_latev').html(window.currentVersion);
|
||||
$('#dash_latev').html(window.latestVersion.tag_name + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')');
|
||||
|
||||
if ( cleanCurrentVersion < cleanLatestVersion )
|
||||
$('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + ' (' + (window.latestVersion.prerelease == true ? "Beta" : "Stable") + ')</div>');
|
||||
if (semverLite.gt(window.latestVersion.tag_name, window.currentVersion))
|
||||
$('#versioninforesult').html('<div class="bs-callout bs-callout-warning" style="margin:0px"><a target="_blank" href="' + window.latestVersion.html_url + '">'+$.i18n('dashboard_infobox_message_updatewarning', window.latestVersion.tag_name) + '</a></div>');
|
||||
else
|
||||
$('#versioninforesult').html('<div class="bs-callout bs-callout-success" style="margin:0px">'+$.i18n('dashboard_infobox_message_updatesuccess')+'</div>');
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user