update plugin pages for new manifest properties
This commit is contained in:
parent
4fca211b2e
commit
47a439d7d2
4 changed files with 19 additions and 66 deletions
|
@ -8,9 +8,8 @@
|
|||
<a is="emby-linkbutton" class="raised button-alt headerHelpButton" target="_blank" href="https://docs.jellyfin.org/general/server/plugins/index.html">${Help}</a>
|
||||
</div>
|
||||
|
||||
<p id="tagline" style="font-style: italic;"></p>
|
||||
<p id="pPreviewImage"></p>
|
||||
<p id="overview"></p>
|
||||
<p id="overview" style="font-style: italic;"></p>
|
||||
<p id="description"></p>
|
||||
</div>
|
||||
|
||||
<div class="verticalSection">
|
||||
|
@ -28,7 +27,6 @@
|
|||
</button>
|
||||
<div class="fieldDescription">${ServerRestartNeededAfterPluginInstall}</div>
|
||||
</div>
|
||||
<p id="nonServerMsg"></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -37,9 +35,6 @@
|
|||
<div is="emby-collapse" title="${HeaderDeveloperInfo}">
|
||||
<div class="collapseContent">
|
||||
<p id="developer"></p>
|
||||
<p id="pViewWebsite" style="display: none;">
|
||||
<a is="emby-linkbutton" class="button-link" href="#" target="_blank">${ButtonViewWebsite}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -7,8 +7,8 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
|||
|
||||
for (var i = 0; i < length; i++) {
|
||||
var version = packageInfo.versions[i];
|
||||
html += '<h2 style="margin:.5em 0;">' + version.versionStr + " (" + version.classification + ")</h2>";
|
||||
html += '<div style="margin-bottom:1.5em;">' + version.description + "</div>";
|
||||
html += '<h2 style="margin:.5em 0;">' + version.version + "</h2>";
|
||||
html += '<div style="margin-bottom:1.5em;">' + version.changelog + "</div>";
|
||||
}
|
||||
|
||||
$("#revisionHistory", page).html(html);
|
||||
|
@ -19,7 +19,7 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
|||
|
||||
for (var i = 0; i < packageInfo.versions.length; i++) {
|
||||
var version = packageInfo.versions[i];
|
||||
html += '<option value="' + version.versionStr + "|" + version.classification + '">' + version.versionStr + " (" + version.classification + ")</option>";
|
||||
html += '<option value="' + version.version + '">' + version.version + "</option>";
|
||||
}
|
||||
|
||||
var selectmenu = $("#selectVersion", page).html(html);
|
||||
|
@ -28,16 +28,9 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
|||
$("#pCurrentVersion", page).hide().html("");
|
||||
}
|
||||
|
||||
var packageVersion = packageInfo.versions.filter(function (current) {
|
||||
return "Release" == current.classification;
|
||||
})[0];
|
||||
packageVersion = packageVersion || packageInfo.versions.filter(function (current) {
|
||||
return "Beta" == current.classification;
|
||||
})[0];
|
||||
|
||||
var packageVersion = packageInfo.versions[0];
|
||||
if (packageVersion) {
|
||||
var val = packageVersion.versionStr + "|" + packageVersion.classification;
|
||||
selectmenu.val(val);
|
||||
selectmenu.val(packageVersion.version);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,44 +38,23 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
|||
var installedPlugin = installedPlugins.filter(function (ip) {
|
||||
return ip.Name == pkg.name;
|
||||
})[0];
|
||||
|
||||
populateVersions(pkg, page, installedPlugin);
|
||||
populateHistory(pkg, page);
|
||||
|
||||
$(".pluginName", page).html(pkg.name);
|
||||
|
||||
if ("Server" == pkg.targetSystem) {
|
||||
$("#btnInstallDiv", page).removeClass("hide");
|
||||
$("#nonServerMsg", page).hide();
|
||||
$("#pSelectVersion", page).removeClass("hide");
|
||||
|
||||
if (pkg.overview) {
|
||||
$("#overview", page).show().html(pkg.overview);
|
||||
} else {
|
||||
$("#btnInstallDiv", page).addClass("hide");
|
||||
$("#pSelectVersion", page).addClass("hide");
|
||||
var msg = globalize.translate("MessageInstallPluginFromApp");
|
||||
$("#nonServerMsg", page).html(msg).show();
|
||||
$("#overview", page).hide();
|
||||
}
|
||||
|
||||
if (pkg.shortDescription) {
|
||||
$("#tagline", page).show().html(pkg.shortDescription);
|
||||
} else {
|
||||
$("#tagline", page).hide();
|
||||
}
|
||||
|
||||
$("#overview", page).html(pkg.overview || "");
|
||||
$("#description", page).html(pkg.description);
|
||||
$("#developer", page).html(pkg.owner);
|
||||
|
||||
if (pkg.richDescUrl) {
|
||||
$("#pViewWebsite", page).show();
|
||||
$("#pViewWebsite a", page).attr("href", pkg.richDescUrl);
|
||||
} else {
|
||||
$("#pViewWebsite", page).hide();
|
||||
}
|
||||
|
||||
if (pkg.previewImage || pkg.thumbImage) {
|
||||
var img = pkg.previewImage ? pkg.previewImage : pkg.thumbImage;
|
||||
$("#pPreviewImage", page).show().html("<img class='pluginPreviewImg' src='" + img + "' style='max-width: 100%;' />");
|
||||
} else {
|
||||
$("#pPreviewImage", page).hide().html("");
|
||||
}
|
||||
|
||||
if (installedPlugin) {
|
||||
var currentVersionText = globalize.translate("MessageYouHaveVersionInstalled", "<strong>" + installedPlugin.Version + "</strong>");
|
||||
$("#pCurrentVersion", page).show().html(currentVersionText);
|
||||
|
|
|
@ -98,21 +98,14 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-button", "emby
|
|||
html += '<div class="cardScalable visualCardBox-cardScalable">';
|
||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||
html += '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + href + '"' + target + ">";
|
||||
|
||||
if (plugin.thumbImage) {
|
||||
html += '<div class="cardImage coveredImage" style="background-image:url(\'' + plugin.thumbImage + "');\">";
|
||||
html += "</div>";
|
||||
} else {
|
||||
html += '<i class="cardImageIcon material-icons">folder</i>';
|
||||
}
|
||||
|
||||
html += "</a>";
|
||||
html += "</div>";
|
||||
html += '<div class="cardFooter">';
|
||||
html += "<div class='cardText'>";
|
||||
html += plugin.name;
|
||||
html += "</div>";
|
||||
var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
||||
var installedPlugin = installedPlugins.filter(function (ip) {
|
||||
return ip.Id == plugin.guid;
|
||||
})[0];
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
|
|
|
@ -42,14 +42,7 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-button"
|
|||
html += '<div class="cardScalable">';
|
||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||
html += configPageUrl ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + configPageUrl + '">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">';
|
||||
|
||||
if (plugin.ImageUrl) {
|
||||
html += '<div class="cardImage coveredImage" style="background-image:url(\'' + plugin.ImageUrl + "');\">";
|
||||
html += "</div>";
|
||||
} else {
|
||||
html += '<i class="cardImageIcon material-icons">folder</i>';
|
||||
}
|
||||
|
||||
html += configPageUrl ? "</a>" : "</div>";
|
||||
html += "</div>";
|
||||
html += '<div class="cardFooter">';
|
||||
|
@ -57,7 +50,7 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-button"
|
|||
html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="material-icons more_horiz"></i></button>';
|
||||
html += "</div>";
|
||||
html += "<div class='cardText'>";
|
||||
html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name;
|
||||
html += configPage.DisplayName || plugin.Name;
|
||||
html += "</div>";
|
||||
html += "<div class='cardText cardText-secondary'>";
|
||||
html += plugin.Version;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue