mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1063 from jellyfin/plugin
Update plugin pages for new manifest properties
This commit is contained in:
commit
36d4f600d9
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>
|
<a is="emby-linkbutton" class="raised button-alt headerHelpButton" target="_blank" href="https://docs.jellyfin.org/general/server/plugins/index.html">${Help}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p id="tagline" style="font-style: italic;"></p>
|
<p id="overview" style="font-style: italic;"></p>
|
||||||
<p id="pPreviewImage"></p>
|
<p id="description"></p>
|
||||||
<p id="overview"></p>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="verticalSection">
|
<div class="verticalSection">
|
||||||
|
@ -28,7 +27,6 @@
|
||||||
</button>
|
</button>
|
||||||
<div class="fieldDescription">${ServerRestartNeededAfterPluginInstall}</div>
|
<div class="fieldDescription">${ServerRestartNeededAfterPluginInstall}</div>
|
||||||
</div>
|
</div>
|
||||||
<p id="nonServerMsg"></p>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -37,9 +35,6 @@
|
||||||
<div is="emby-collapse" title="${HeaderDeveloperInfo}">
|
<div is="emby-collapse" title="${HeaderDeveloperInfo}">
|
||||||
<div class="collapseContent">
|
<div class="collapseContent">
|
||||||
<p id="developer"></p>
|
<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>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
||||||
|
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
var version = packageInfo.versions[i];
|
var version = packageInfo.versions[i];
|
||||||
html += '<h2 style="margin:.5em 0;">' + version.versionStr + " (" + version.classification + ")</h2>";
|
html += '<h2 style="margin:.5em 0;">' + version.version + "</h2>";
|
||||||
html += '<div style="margin-bottom:1.5em;">' + version.description + "</div>";
|
html += '<div style="margin-bottom:1.5em;">' + version.changelog + "</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#revisionHistory", page).html(html);
|
$("#revisionHistory", page).html(html);
|
||||||
|
@ -19,7 +19,7 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
||||||
|
|
||||||
for (var i = 0; i < packageInfo.versions.length; i++) {
|
for (var i = 0; i < packageInfo.versions.length; i++) {
|
||||||
var version = packageInfo.versions[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);
|
var selectmenu = $("#selectVersion", page).html(html);
|
||||||
|
@ -28,16 +28,9 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
||||||
$("#pCurrentVersion", page).hide().html("");
|
$("#pCurrentVersion", page).hide().html("");
|
||||||
}
|
}
|
||||||
|
|
||||||
var packageVersion = packageInfo.versions.filter(function (current) {
|
var packageVersion = packageInfo.versions[0];
|
||||||
return "Release" == current.classification;
|
|
||||||
})[0];
|
|
||||||
packageVersion = packageVersion || packageInfo.versions.filter(function (current) {
|
|
||||||
return "Beta" == current.classification;
|
|
||||||
})[0];
|
|
||||||
|
|
||||||
if (packageVersion) {
|
if (packageVersion) {
|
||||||
var val = packageVersion.versionStr + "|" + packageVersion.classification;
|
selectmenu.val(packageVersion.version);
|
||||||
selectmenu.val(val);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,44 +38,23 @@ define(["jQuery", "loading", "libraryMenu", "globalize", "connectionManager", "e
|
||||||
var installedPlugin = installedPlugins.filter(function (ip) {
|
var installedPlugin = installedPlugins.filter(function (ip) {
|
||||||
return ip.Name == pkg.name;
|
return ip.Name == pkg.name;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
populateVersions(pkg, page, installedPlugin);
|
populateVersions(pkg, page, installedPlugin);
|
||||||
populateHistory(pkg, page);
|
populateHistory(pkg, page);
|
||||||
|
|
||||||
$(".pluginName", page).html(pkg.name);
|
$(".pluginName", page).html(pkg.name);
|
||||||
|
$("#btnInstallDiv", page).removeClass("hide");
|
||||||
|
$("#pSelectVersion", page).removeClass("hide");
|
||||||
|
|
||||||
if ("Server" == pkg.targetSystem) {
|
if (pkg.overview) {
|
||||||
$("#btnInstallDiv", page).removeClass("hide");
|
$("#overview", page).show().html(pkg.overview);
|
||||||
$("#nonServerMsg", page).hide();
|
|
||||||
$("#pSelectVersion", page).removeClass("hide");
|
|
||||||
} else {
|
} else {
|
||||||
$("#btnInstallDiv", page).addClass("hide");
|
$("#overview", page).hide();
|
||||||
$("#pSelectVersion", page).addClass("hide");
|
|
||||||
var msg = globalize.translate("MessageInstallPluginFromApp");
|
|
||||||
$("#nonServerMsg", page).html(msg).show();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pkg.shortDescription) {
|
$("#description", page).html(pkg.description);
|
||||||
$("#tagline", page).show().html(pkg.shortDescription);
|
|
||||||
} else {
|
|
||||||
$("#tagline", page).hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#overview", page).html(pkg.overview || "");
|
|
||||||
$("#developer", page).html(pkg.owner);
|
$("#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) {
|
if (installedPlugin) {
|
||||||
var currentVersionText = globalize.translate("MessageYouHaveVersionInstalled", "<strong>" + installedPlugin.Version + "</strong>");
|
var currentVersionText = globalize.translate("MessageYouHaveVersionInstalled", "<strong>" + installedPlugin.Version + "</strong>");
|
||||||
$("#pCurrentVersion", page).show().html(currentVersionText);
|
$("#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="cardScalable visualCardBox-cardScalable">';
|
||||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||||
html += '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + href + '"' + target + ">";
|
html += '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + href + '"' + target + ">";
|
||||||
|
html += '<i class="cardImageIcon material-icons">folder</i>';
|
||||||
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 += "</a>";
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += '<div class="cardFooter">';
|
html += '<div class="cardFooter">';
|
||||||
html += "<div class='cardText'>";
|
html += "<div class='cardText'>";
|
||||||
html += plugin.name;
|
html += plugin.name;
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
var installedPlugin = installedPlugins.filter(function (ip) {
|
||||||
return ip.Id == plugin.guid;
|
return ip.Id == plugin.guid;
|
||||||
})[0];
|
})[0];
|
||||||
html += "<div class='cardText cardText-secondary'>";
|
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="cardScalable">';
|
||||||
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
html += '<div class="cardPadder cardPadder-backdrop"></div>';
|
||||||
html += configPageUrl ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + configPageUrl + '">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">';
|
html += configPageUrl ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + configPageUrl + '">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">';
|
||||||
|
html += '<i class="cardImageIcon material-icons">folder</i>';
|
||||||
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 += configPageUrl ? "</a>" : "</div>";
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += '<div class="cardFooter">';
|
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 += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="material-icons more_horiz"></i></button>';
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += "<div class='cardText'>";
|
html += "<div class='cardText'>";
|
||||||
html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name;
|
html += configPage.DisplayName || plugin.Name;
|
||||||
html += "</div>";
|
html += "</div>";
|
||||||
html += "<div class='cardText cardText-secondary'>";
|
html += "<div class='cardText cardText-secondary'>";
|
||||||
html += plugin.Version;
|
html += plugin.Version;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue