mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
merge with updates from upstream
This commit is contained in:
commit
bf408ae9aa
5 changed files with 48 additions and 43 deletions
|
@ -751,7 +751,7 @@ define(['browser'], function (browser) {
|
||||||
Condition: 'Equals',
|
Condition: 'Equals',
|
||||||
Property: 'IsSecondaryAudio',
|
Property: 'IsSecondaryAudio',
|
||||||
Value: 'false',
|
Value: 'false',
|
||||||
IsRequired: 'false'
|
IsRequired: false
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ define(['browser'], function (browser) {
|
||||||
Condition: 'Equals',
|
Condition: 'Equals',
|
||||||
Property: 'IsSecondaryAudio',
|
Property: 'IsSecondaryAudio',
|
||||||
Value: 'false',
|
Value: 'false',
|
||||||
IsRequired: 'false'
|
IsRequired: false
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
@ -913,4 +913,4 @@ define(['browser'], function (browser) {
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -386,16 +386,13 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
|
||||||
function addPluginPagesToMainMenu(links, pluginItems, section) {
|
function addPluginPagesToMainMenu(links, pluginItems, section) {
|
||||||
for (var i = 0, length = pluginItems.length; i < length; i++) {
|
for (var i = 0, length = pluginItems.length; i < length; i++) {
|
||||||
var pluginItem = pluginItems[i];
|
var pluginItem = pluginItems[i];
|
||||||
|
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
||||||
if (Dashboard.allowPluginPages(pluginItem.PluginId)) {
|
links.push({
|
||||||
if (pluginItem.EnableInMainMenu && pluginItem.MenuSection === section) {
|
name: pluginItem.DisplayName,
|
||||||
links.push({
|
icon: pluginItem.MenuIcon || "folder",
|
||||||
name: pluginItem.DisplayName,
|
href: Dashboard.getConfigurationPageUrl(pluginItem.Name),
|
||||||
icon: pluginItem.MenuIcon || "folder",
|
pageUrls: [Dashboard.getConfigurationPageUrl(pluginItem.Name)]
|
||||||
href: Dashboard.getConfigurationPageUrl(pluginItem.Name),
|
});
|
||||||
pageUrls: [Dashboard.getConfigurationPageUrl(pluginItem.Name)]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
||||||
|
|
||||||
function reloadList(page) {
|
function reloadList(page) {
|
||||||
loading.show();
|
loading.show();
|
||||||
query.IsAppStoreSafe = true;
|
|
||||||
var promise1 = ApiClient.getAvailablePlugins(query);
|
var promise1 = ApiClient.getAvailablePlugins(query);
|
||||||
var promise2 = ApiClient.getInstalledPlugins();
|
var promise2 = ApiClient.getInstalledPlugins();
|
||||||
Promise.all([promise1, promise2]).then(function (responses) {
|
Promise.all([promise1, promise2]).then(function (responses) {
|
||||||
|
@ -16,13 +15,8 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateList(options) {
|
|
||||||
populateListInternal(options);
|
|
||||||
}
|
|
||||||
|
|
||||||
function getHeaderText(category) {
|
function getHeaderText(category) {
|
||||||
category = category.replace(" ", "");
|
category = category.replace(" ", "");
|
||||||
|
|
||||||
if ("Channel" === category) {
|
if ("Channel" === category) {
|
||||||
category = "Channels";
|
category = "Channels";
|
||||||
} else if ("Theme" === category) {
|
} else if ("Theme" === category) {
|
||||||
|
@ -36,11 +30,7 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
||||||
return globalize.translate(category);
|
return globalize.translate(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isUserInstalledPlugin(plugin) {
|
function populateList(options) {
|
||||||
return -1 === ["02528C96-F727-44D7-BE87-9EEF040758C3", "0277E613-3EC0-4360-A3DE-F8AF0AABB5E9", "4DCB591C-0FA2-4C5D-A7E5-DABE37164C8B"].indexOf(plugin.guid);
|
|
||||||
}
|
|
||||||
|
|
||||||
function populateListInternal(options) {
|
|
||||||
var availablePlugins = options.availablePlugins;
|
var availablePlugins = options.availablePlugins;
|
||||||
var installedPlugins = options.installedPlugins;
|
var installedPlugins = options.installedPlugins;
|
||||||
var allPlugins = availablePlugins.filter(function (plugin) {
|
var allPlugins = availablePlugins.filter(function (plugin) {
|
||||||
|
@ -113,7 +103,7 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}).filter(isUserInstalledPlugin);
|
});
|
||||||
html += '<div class="itemsContainer vertical-wrap">';
|
html += '<div class="itemsContainer vertical-wrap">';
|
||||||
var limit = screen.availWidth >= 1920 ? 15 : 12;
|
var limit = screen.availWidth >= 1920 ? 15 : 12;
|
||||||
|
|
||||||
|
@ -215,11 +205,14 @@ define(["loading", "libraryMenu", "globalize", "cardStyle", "emby-linkbutton", "
|
||||||
|
|
||||||
var query = {
|
var query = {
|
||||||
TargetSystems: "Server",
|
TargetSystems: "Server",
|
||||||
|
IsAppStoreSafe: true,
|
||||||
IsAdult: false
|
IsAdult: false
|
||||||
};
|
};
|
||||||
|
|
||||||
window.PluginCatalog = {
|
window.PluginCatalog = {
|
||||||
renderCatalog: populateList
|
renderCatalog: populateList
|
||||||
};
|
};
|
||||||
|
|
||||||
return function (view, params) {
|
return function (view, params) {
|
||||||
view.querySelector("#selectSystem").addEventListener("change", function () {
|
view.querySelector("#selectSystem").addEventListener("change", function () {
|
||||||
query.TargetSystems = this.value;
|
query.TargetSystems = this.value;
|
||||||
|
|
|
@ -32,12 +32,37 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-linkbut
|
||||||
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
||||||
var configPage = pluginConfigurationPages.filter(function(pluginConfigurationPage) {
|
var configPage = pluginConfigurationPages.filter(function(pluginConfigurationPage) {
|
||||||
return pluginConfigurationPage.PluginId == plugin.Id
|
return pluginConfigurationPage.PluginId == plugin.Id
|
||||||
})[0],
|
})[0];
|
||||||
html = "",
|
var configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null;
|
||||||
disallowPlugins = !Dashboard.allowPluginPages(plugin.Id),
|
|
||||||
configPageUrl = configPage ? Dashboard.getConfigurationPageUrl(configPage.Name) : null,
|
var html = "";
|
||||||
href = configPage && !disallowPlugins ? configPageUrl : null;
|
html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' class='card backdropCard'>";
|
||||||
return html += "<div data-id='" + plugin.Id + "' data-name='" + plugin.Name + "' class='card backdropCard'>", html += '<div class="cardBox visualCardBox">', html += '<div class="cardScalable">', html += '<div class="cardPadder cardPadder-backdrop"></div>', html += href ? '<a class="cardContent cardImageContainer" is="emby-linkbutton" href="' + href + '">' : configPageUrl ? disallowPlugins ? '<div class="cardContent connectModePluginCard cardImageContainer">' : '<div class="cardContent cardImageContainer">' : '<div class="cardContent noConfigPluginCard noHoverEffect cardImageContainer">', plugin.ImageUrl ? (html += '<div class="cardImage coveredImage" style="background-image:url(\'' + plugin.ImageUrl + "');\">", html += "</div>") : html += '<i class="cardImageIcon md-icon"></i>', html += href ? "</a>" : "</div>", html += "</div>", html += '<div class="cardFooter">', html += '<div style="text-align:right; float:right;padding-top:5px;">', html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon">more_horiz</i></button>', html += "</div>", html += "<div class='cardText'>", html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name, html += "</div>", html += "<div class='cardText cardText-secondary'>", html += plugin.Version, html += "</div>", html += "</div>", html += "</div>", html += "</div>"
|
html += '<div class="cardBox visualCardBox">';
|
||||||
|
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 md-icon"></i>';
|
||||||
|
}
|
||||||
|
html += configPageUrl ? "</a>" : "</div>";
|
||||||
|
html += "</div>";
|
||||||
|
html += '<div class="cardFooter">';
|
||||||
|
html += '<div style="text-align:right; float:right;padding-top:5px;">';
|
||||||
|
html += '<button type="button" is="paper-icon-button-light" class="btnCardMenu autoSize"><i class="md-icon">more_horiz</i></button>';
|
||||||
|
html += "</div>";
|
||||||
|
html += "<div class='cardText'>";
|
||||||
|
html += configPage ? configPage.DisplayName || plugin.Name : plugin.Name;
|
||||||
|
html += "</div>";
|
||||||
|
html += "<div class='cardText cardText-secondary'>";
|
||||||
|
html += plugin.Version;
|
||||||
|
html += "</div>";
|
||||||
|
html += "</div>";
|
||||||
|
html += "</div>";
|
||||||
|
html += "</div>";
|
||||||
|
return html;
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderPlugins(page, plugins, showNoPluginsMessage) {
|
function renderPlugins(page, plugins, showNoPluginsMessage) {
|
||||||
|
@ -117,4 +142,4 @@ define(["loading", "libraryMenu", "dom", "globalize", "cardStyle", "emby-linkbut
|
||||||
}), window.PluginsPage = {
|
}), window.PluginsPage = {
|
||||||
renderPlugins: renderPlugins
|
renderPlugins: renderPlugins
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -231,17 +231,7 @@ var AppInfo = {};
|
||||||
!function () {
|
!function () {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function initializeApiClient(apiClient) {
|
function onApiClientCreated(e, newApiClient) {
|
||||||
if (!("cordova" !== self.appMode && "android" !== self.appMode)) {
|
|
||||||
apiClient.getAvailablePlugins = function () {
|
|
||||||
return Promise.resolve([]);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onApiClientCreated(e__e, newApiClient) {
|
|
||||||
initializeApiClient(newApiClient);
|
|
||||||
|
|
||||||
if (window.$) {
|
if (window.$) {
|
||||||
$.ajax = newApiClient.ajax;
|
$.ajax = newApiClient.ajax;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue