mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add background colors to user and library cards
This commit is contained in:
parent
22c66ae353
commit
50b9e1adf4
6 changed files with 22 additions and 14 deletions
|
@ -54,8 +54,10 @@ function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
|||
const configPage = pluginConfigurationPages.filter(function (pluginConfigurationPage) {
|
||||
return pluginConfigurationPage.PluginId == plugin.Id;
|
||||
})[0];
|
||||
|
||||
const configPageUrl = configPage ? Dashboard.getPluginUrl(configPage.Name) : null;
|
||||
let html = '';
|
||||
|
||||
html += `<div data-id='${plugin.Id}' data-version='${plugin.Version}' data-name='${plugin.Name}' data-removable='${plugin.CanUninstall}' data-status='${plugin.Status}' class='card backdropCard'>`;
|
||||
html += '<div class="cardBox visualCardBox">';
|
||||
html += '<div class="cardScalable">';
|
||||
|
@ -67,12 +69,12 @@ function getPluginCardHtml(plugin, pluginConfigurationPages) {
|
|||
html += '<div class="cardImageContainer noConfigPluginCard noHoverEffect emby-button">';
|
||||
}
|
||||
|
||||
html += `<span class="cardImageIcon ${plugin.HasImage ? '' : 'material-icons extension'}">`;
|
||||
if (plugin.HasImage) {
|
||||
html += `<img src="/Plugins/${plugin.Id}/${plugin.Version}/Image" style="width:100%;height:auto" />`;
|
||||
html += `<img src="/Plugins/${plugin.Id}/${plugin.Version}/Image" style="width:100%" />`;
|
||||
} else {
|
||||
html += `<span class="cardImageIcon material-icons extension"></span>`;
|
||||
}
|
||||
|
||||
html += '</span>';
|
||||
html += configPageUrl ? '</a>' : '</div>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
@ -140,7 +142,7 @@ function showPluginMenu(page, elem) {
|
|||
const id = card.getAttribute('data-id');
|
||||
const name = card.getAttribute('data-name');
|
||||
const removable = card.getAttribute('data-removable');
|
||||
const configHref = card.querySelector('.cardContent').getAttribute('href');
|
||||
const configHref = card.querySelector('.cardImageContainer').getAttribute('href');
|
||||
const status = card.getAttribute('data-status');
|
||||
const version = card.getAttribute('data-version');
|
||||
const menuItems = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue