1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

display tv service version info

This commit is contained in:
Luke Pulverenti 2014-01-17 15:51:29 -05:00
parent e29f656626
commit b1cba70ffd
2 changed files with 21 additions and 3 deletions

View file

@ -12,13 +12,14 @@
<br /> <br />
<div> <div>
<p>Current active service: <span id="activeServiceName"></span></p> <p>Active service: <span id="activeServiceName"></span></p>
<p>Status: <span id="activeServiceStatus"></span></p> <p>Status: <span id="activeServiceStatus"></span></p>
<p>Version: <span id="activeServiceVersion"></span></p>
</div> </div>
<br /> <br />
<ul data-role="listview" class="ulForm"> <ul data-role="listview" class="ulForm">
<li> <li>
<label for="selectActiveService">Active service: </label> <label for="selectActiveService">Change active service: </label>
<select id="selectActiveService" data-mini="true"> <select id="selectActiveService" data-mini="true">
</select> </select>
<div class="fieldDescription">Although multiple tv plugins can be installed only one can be active at a time.</div> <div class="fieldDescription">Although multiple tv plugins can be installed only one can be active at a time.</div>

View file

@ -20,7 +20,24 @@
$('#selectActiveService', page).html(serviceOptions).selectmenu('refresh'); $('#selectActiveService', page).html(serviceOptions).selectmenu('refresh');
var service = liveTvInfo.Services.filter(function (s) {
return s.Name == liveTvInfo.ActiveServiceName;
})[0];
if (service.HomePageUrl) {
$('#activeServiceName', page).html('<a href="' + service.HomePageUrl + '" target="_blank">' + liveTvInfo.ActiveServiceName + '</a>').trigger('create');
} else {
$('#activeServiceName', page).html(liveTvInfo.ActiveServiceName); $('#activeServiceName', page).html(liveTvInfo.ActiveServiceName);
}
var versionHtml = service.Version || 'Unknown';
if (service.HasUpdateAvailable) {
versionHtml += ' <span style="color:green; margin-left: .25em;">(Update available)</span>';
} else {
versionHtml += '<img src="css/images/checkmarkgreen.png" style="height: 17px; margin-left: 10px; margin-right: 0; position: relative; top: 4px;" /> Up to date!';
}
$('#activeServiceVersion', page).html(versionHtml);
var status = liveTvInfo.Status; var status = liveTvInfo.Status;