mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update multi-select
This commit is contained in:
parent
cc29283762
commit
89dfdfb110
7 changed files with 160 additions and 104 deletions
|
@ -98,6 +98,99 @@
|
|||
});
|
||||
}
|
||||
|
||||
function renderPluginInfo(page, pkg, pluginSecurityInfo) {
|
||||
|
||||
if (AppInfo.isNativeApp) {
|
||||
return;
|
||||
}
|
||||
|
||||
require(['jQuery'], function ($) {
|
||||
if (pkg.isPremium) {
|
||||
$('.premiumPackage', page).show();
|
||||
|
||||
// Fill in registration info
|
||||
var regStatus = "";
|
||||
if (pkg.isRegistered) {
|
||||
|
||||
regStatus += "<p style='color:green;'>";
|
||||
|
||||
regStatus += Globalize.translate('MessageFeatureIncludedWithSupporter');
|
||||
|
||||
} else {
|
||||
|
||||
var expDateTime = new Date(pkg.expDate).getTime();
|
||||
var nowTime = new Date().getTime();
|
||||
|
||||
if (expDateTime <= nowTime) {
|
||||
regStatus += "<p style='color:red;'>";
|
||||
regStatus += Globalize.translate('MessageTrialExpired');
|
||||
} else if (expDateTime > new Date(1970, 1, 1).getTime()) {
|
||||
|
||||
regStatus += "<p style='color:blue;'>";
|
||||
regStatus += Globalize.translate('MessageTrialWillExpireIn').replace('{0}', Math.round(expDateTime - nowTime) / (86400000));
|
||||
}
|
||||
}
|
||||
|
||||
regStatus += "</p>";
|
||||
$('#regStatus', page).html(regStatus);
|
||||
|
||||
if (pluginSecurityInfo.IsMBSupporter) {
|
||||
$('#regInfo', page).html(pkg.regInfo || "");
|
||||
|
||||
$('.premiumDescription', page).hide();
|
||||
$('.supporterDescription', page).hide();
|
||||
|
||||
if (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.com/admin/service/user/getPayPalEmail?id=" + pkg.owner;
|
||||
|
||||
fetch(url).then(function (response) {
|
||||
|
||||
return response.json();
|
||||
|
||||
}).then(function (dev) {
|
||||
|
||||
if (dev.payPalEmail) {
|
||||
$('#payPalEmail', page).val(dev.payPalEmail);
|
||||
$('#ppButton', page).show();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
} else {
|
||||
// Supporter-only feature
|
||||
$('.premiumHasPrice', page).hide();
|
||||
}
|
||||
} else {
|
||||
|
||||
if (pkg.price) {
|
||||
$('.premiumDescription', page).show();
|
||||
$('.supporterDescription', page).hide();
|
||||
$('#regInfo', page).html("");
|
||||
|
||||
} else {
|
||||
$('.premiumDescription', page).hide();
|
||||
$('.supporterDescription', page).show();
|
||||
$('#regInfo', page).html("");
|
||||
}
|
||||
|
||||
$('#ppButton', page).hide();
|
||||
}
|
||||
|
||||
} else {
|
||||
$('.premiumPackage', page).hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function renderPackage(pkg, installedPlugins, pluginSecurityInfo, page) {
|
||||
|
||||
var installedPlugin = installedPlugins.filter(function (ip) {
|
||||
|
@ -133,7 +226,7 @@
|
|||
|
||||
$('#developer', page).html(pkg.owner);
|
||||
|
||||
RegistrationServices.renderPluginInfo(page, pkg, pluginSecurityInfo);
|
||||
renderPluginInfo(page, pkg, pluginSecurityInfo);
|
||||
|
||||
//Ratings and Reviews
|
||||
var ratingHtml = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue