mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
display sync services
This commit is contained in:
parent
2ad634f791
commit
0d500aa41e
4 changed files with 35 additions and 12 deletions
|
@ -132,7 +132,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
var installedPlugin = plugin.isApp ? null : installedPlugins.filter(function (ip) {
|
||||||
return ip.Name == plugin.name;
|
return ip.Id == plugin.guid;
|
||||||
})[0];
|
})[0];
|
||||||
|
|
||||||
html += "<div class='cardText'>";
|
html += "<div class='cardText'>";
|
||||||
|
|
|
@ -108,6 +108,15 @@
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderPlugins(page, plugins) {
|
||||||
|
|
||||||
|
ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration").done(function (configPages) {
|
||||||
|
|
||||||
|
populateList(page, plugins, configPages);
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function populateList(page, plugins, pluginConfigurationPages) {
|
function populateList(page, plugins, pluginConfigurationPages) {
|
||||||
|
|
||||||
plugins = plugins.sort(function (plugin1, plugin2) {
|
plugins = plugins.sort(function (plugin1, plugin2) {
|
||||||
|
@ -198,14 +207,9 @@
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
var promise1 = ApiClient.getInstalledPlugins();
|
ApiClient.getInstalledPlugins().done(function (plugins) {
|
||||||
|
|
||||||
var promise2 = ApiClient.getJSON(ApiClient.getUrl("dashboard/configurationpages") + "?pageType=PluginConfiguration");
|
|
||||||
|
|
||||||
$.when(promise1, promise2).done(function (response1, response2) {
|
|
||||||
|
|
||||||
populateList(page, response1[0], response2[0]);
|
|
||||||
|
|
||||||
|
renderPlugins(page, plugins);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,4 +218,8 @@
|
||||||
reloadList(this);
|
reloadList(this);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.PluginsPage = {
|
||||||
|
renderPlugins: renderPlugins
|
||||||
|
};
|
||||||
|
|
||||||
})(jQuery, window);
|
})(jQuery, window);
|
|
@ -11,11 +11,27 @@
|
||||||
var promise2 = ApiClient.getInstalledPlugins();
|
var promise2 = ApiClient.getInstalledPlugins();
|
||||||
|
|
||||||
$.when(promise1, promise2).done(function (response1, response2) {
|
$.when(promise1, promise2).done(function (response1, response2) {
|
||||||
populateList(page, response1[0], response2[0]);
|
renderInstalled(page, response1[0], response2[0]);
|
||||||
|
renderCatalog(page, response1[0], response2[0]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateList(page, availablePlugins, installedPlugins) {
|
function renderInstalled(page, availablePlugins, installedPlugins) {
|
||||||
|
|
||||||
|
installedPlugins = installedPlugins.filter(function (i) {
|
||||||
|
|
||||||
|
var catalogEntry = availablePlugins.filter(function (a) {
|
||||||
|
return a.guid == i.Id;
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
return catalogEntry && catalogEntry.category == 'Sync';
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
PluginsPage.renderPlugins(page, installedPlugins);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderCatalog(page, availablePlugins, installedPlugins) {
|
||||||
|
|
||||||
PluginCatalog.renderCatalog({
|
PluginCatalog.renderCatalog({
|
||||||
|
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="detailSectionHeader">${HeaderInstalledServices}</div>
|
<div class="detailSectionHeader">${HeaderInstalledServices}</div>
|
||||||
<p style="display:none;" class="noServicesInstalled">${MessageNoServicesInstalled}</p>
|
<div class="installedPlugins"></div>
|
||||||
<div class="installed"></div>
|
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue