Fix minor issues with card padder icons

This commit is contained in:
Bill Thornton 2022-02-26 01:56:41 -05:00
parent 56080df163
commit e89e92e25c

View File

@ -1354,8 +1354,13 @@ import ServerConnections from '../ServerConnections';
let cardPadderIcon = '';
if (imgUrl) {
cardPadderIcon = getDefaultText(item, options);
// TV Channel logos are transparent so skip the placeholder to avoid overlapping
if (imgUrl && item.Type !== 'TvChannel') {
cardPadderIcon = getDefaultText(item, {
...options,
// Always use an icon
defaultCardImageIcon: 'folder'
});
}
cardImageContainerOpen = `<div class="${cardBoxClass}"><div class="${cardScalableClass}"><div class="cardPadder cardPadder-${shape}">${cardPadderIcon}</div>${cardImageContainerOpen}`;
@ -1514,6 +1519,8 @@ import ServerConnections from '../ServerConnections';
case 'Episode':
case 'Series':
return '<span class="cardImageIcon material-icons tv" aria-hidden="true"></span>';
case 'Program':
return '<span class="cardImageIcon material-icons live_tv" aria-hidden="true"></span>';
case 'Book':
return '<span class="cardImageIcon material-icons book" aria-hidden="true"></span>';
case 'Folder':
@ -1526,7 +1533,7 @@ import ServerConnections from '../ServerConnections';
return '<span class="cardImageIcon material-icons photo_album" aria-hidden="true"></span>';
}
if (options && options.defaultCardImageIcon) {
if (options?.defaultCardImageIcon) {
return '<span class="cardImageIcon material-icons ' + options.defaultCardImageIcon + '" aria-hidden="true"></span>';
}