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

remove useless function

This commit is contained in:
dkanada 2019-02-05 21:37:54 +09:00 committed by Bond-009
parent 340745718a
commit f4798932ef

View file

@ -27,30 +27,6 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
} }
} }
function renderPluginInfo(page, pkg, pluginSecurityInfo) {
if (pkg.isPremium) {
$(".premiumPackage", page).show();
var regStatus = "";
if (pkg.isRegistered) regStatus += "<p style='color:green;'>", regStatus += globalize.translate("MessageFeatureIncludedWithSupporter");
else {
var expDateTime = new Date(pkg.expDate).getTime(),
nowTime = (new Date).getTime();
expDateTime <= nowTime ? (regStatus += "<p style='color:red;'>", regStatus += globalize.translate("MessageTrialExpired")) : expDateTime > new Date(1970, 1, 1).getTime() && (regStatus += "<p style='color:blue;'>", regStatus += globalize.translate("MessageTrialWillExpireIn").replace("{0}", Math.round(expDateTime - nowTime) / 864e5))
}
if (regStatus += "</p>", $("#regStatus", page).html(regStatus), pluginSecurityInfo.IsMBSupporter)
if ($(".premiumDescription", page).hide(), $(".supporterDescription", page).hide(), pkg.price > 0) {
$(".premiumHasPrice", page).show(), $("#featureId", page).val(pkg.featureId), $("#featureName", page).val(pkg.name), $("#amount", page).val(pkg.price), $("#regPrice", page).html("<h3>" + globalize.translate("ValuePriceUSD").replace("{0}", "$" + pkg.price.toFixed(2)) + "</h3>"), $("#ppButton", page).hide();
var url = "https://mb3admin.local/admin/service/user/getPayPalEmail?id=" + pkg.owner;
fetch(url).then(function(response) {
return response.json()
}).then(function(dev) {
dev.payPalEmail && ($("#payPalEmail", page).val(dev.payPalEmail), $("#ppButton", page).show())
})
} else $(".premiumHasPrice", page).hide();
else pkg.price ? ($(".premiumDescription", page).show(), $(".supporterDescription", page).hide()) : ($(".premiumDescription", page).hide(), $(".supporterDescription", page).show()), $("#ppButton", page).hide()
} else $(".premiumPackage", page).hide()
}
function renderPackage(pkg, installedPlugins, pluginSecurityInfo, page) { function renderPackage(pkg, installedPlugins, pluginSecurityInfo, page) {
var installedPlugin = installedPlugins.filter(function(ip) { var installedPlugin = installedPlugins.filter(function(ip) {
return ip.Name == pkg.name return ip.Name == pkg.name
@ -71,7 +47,6 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
pkg.shortDescription ? $("#tagline", page).show().html(pkg.shortDescription) : $("#tagline", page).hide(); pkg.shortDescription ? $("#tagline", page).show().html(pkg.shortDescription) : $("#tagline", page).hide();
$("#overview", page).html(pkg.overview || ""); $("#overview", page).html(pkg.overview || "");
$("#developer", page).html(pkg.owner); $("#developer", page).html(pkg.owner);
renderPluginInfo(page, pkg, pluginSecurityInfo);
pkg.richDescUrl ? ($("#pViewWebsite", page).show(), $("#pViewWebsite a", page).attr("href", pkg.richDescUrl)) : $("#pViewWebsite", page).hide(); pkg.richDescUrl ? ($("#pViewWebsite", page).show(), $("#pViewWebsite a", page).attr("href", pkg.richDescUrl)) : $("#pViewWebsite", page).hide();
if (pkg.previewImage || pkg.thumbImage) { if (pkg.previewImage || pkg.thumbImage) {
var img = pkg.previewImage ? pkg.previewImage : pkg.thumbImage; var img = pkg.previewImage ? pkg.previewImage : pkg.thumbImage;