mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
updated nuget
This commit is contained in:
parent
2384a7e088
commit
b89707f7b9
14 changed files with 260 additions and 60 deletions
|
@ -10,6 +10,119 @@
|
|||
return target ? target.Name : 'Unknown Device';
|
||||
}
|
||||
|
||||
function getSyncJobHtml(job) {
|
||||
|
||||
var html = '';
|
||||
|
||||
html += "<div class='card card-1-1'>";
|
||||
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
||||
html += '<div class="cardPadder"></div>';
|
||||
|
||||
html += '<div class="cardContent">';
|
||||
|
||||
var imgUrl;
|
||||
|
||||
if (job.PrimaryImageItemId) {
|
||||
imgUrl = ApiClient.getScaledImageUrl(job.PrimaryImageItemId, {
|
||||
type: "Primary",
|
||||
width: 400,
|
||||
tag: job.PrimaryImageTag
|
||||
});
|
||||
}
|
||||
|
||||
if (imgUrl) {
|
||||
html += '<div class="cardImage coveredCardImage lazy" data-src="' + imgUrl + '">';
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
if (job.Status == 'Completed') {
|
||||
html += '<div class="playedIndicator"><div class="ui-icon-check ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'Queued') {
|
||||
html += '<div class="playedIndicator" style="background-color:#38c;"><div class="ui-icon-clock ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'Transcoding' || job.Status == 'Transferring') {
|
||||
html += '<div class="playedIndicator"><div class="ui-icon-refresh ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'Cancelled') {
|
||||
html += '<div class="playedIndicator" style="background-color:#FF6A00;"><div class="ui-icon-minus ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
else if (job.Status == 'TranscodingFailed') {
|
||||
html += '<div class="playedIndicator" style="background-color:#cc0000;"><div class="ui-icon-delete ui-btn-icon-notext"></div></div>';
|
||||
}
|
||||
|
||||
// cardContent
|
||||
html += "</div>";
|
||||
|
||||
// cardScalable
|
||||
html += "</div>";
|
||||
|
||||
html += '<div class="cardFooter">';
|
||||
|
||||
var textLines = [];
|
||||
|
||||
if (job.ParentName) {
|
||||
textLines.push(job.ParentName);
|
||||
}
|
||||
|
||||
textLines.push(job.Name);
|
||||
|
||||
if (job.ItemCount == 1) {
|
||||
textLines.push(job.ItemCount + ' item');
|
||||
} else {
|
||||
textLines.push(job.ItemCount + ' items');
|
||||
}
|
||||
|
||||
if (!job.ParentName) {
|
||||
textLines.push(' ');
|
||||
}
|
||||
|
||||
for (var i = 0, length = textLines.length; i < length; i++) {
|
||||
html += "<div class='cardText'>";
|
||||
html += textLines[i];
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
//if (!plugin.isExternal) {
|
||||
// html += "<div class='cardText packageReviewText'>";
|
||||
// html += plugin.price > 0 ? "$" + plugin.price.toFixed(2) : Globalize.translate('LabelFree');
|
||||
// html += RatingHelpers.getStoreRatingHtml(plugin.avgRating, plugin.id, plugin.name);
|
||||
|
||||
// html += "<span class='storeReviewCount'>";
|
||||
// html += " " + Globalize.translate('LabelNumberReviews').replace("{0}", plugin.totalRatings);
|
||||
// html += "</span>";
|
||||
|
||||
// html += "</div>";
|
||||
//}
|
||||
|
||||
//var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
||||
// return ip.Name == plugin.name;
|
||||
//})[0];
|
||||
|
||||
//html += "<div class='cardText'>";
|
||||
|
||||
//if (installedPlugin) {
|
||||
// html += Globalize.translate('LabelVersionInstalled').replace("{0}", installedPlugin.Version);
|
||||
//} else {
|
||||
// html += ' ';
|
||||
//}
|
||||
//html += "</div>";
|
||||
|
||||
// cardFooter
|
||||
html += "</div>";
|
||||
|
||||
// cardBox
|
||||
html += "</div>";
|
||||
|
||||
// card
|
||||
html += "</div>";
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function loadData(page, jobs, targets) {
|
||||
|
||||
var html = '';
|
||||
|
@ -25,6 +138,8 @@
|
|||
|
||||
lastTargetName = targetName;
|
||||
}
|
||||
|
||||
html += getSyncJobHtml(job);
|
||||
}
|
||||
|
||||
$('.syncActivity', page).html(html).trigger('create');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue