1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove duplicate card shape functions

This commit is contained in:
Bill Thornton 2023-10-01 02:49:36 -04:00
parent 4cbff9dbd7
commit 1e3fa5418c
16 changed files with 294 additions and 339 deletions

View file

@ -1,15 +1,13 @@
import layoutManager from '../components/layoutManager';
import cardBuilder from 'components/cardbuilder/cardBuilder';
import layoutManager from 'components/layoutManager';
import { getBackdropShape } from 'utils/card';
import datetime from './datetime';
import cardBuilder from '../components/cardbuilder/cardBuilder';
function enableScrollX() {
return !layoutManager.desktop;
}
function getBackdropShape() {
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
}
function getTimersHtml(timers, options) {
options = options || {};
@ -78,7 +76,7 @@ function getTimersHtml(timers, options) {
html += cardBuilder.getCardsHtml({
items: group.items,
shape: getBackdropShape(),
shape: getBackdropShape(enableScrollX()),
showTitle: true,
showParentTitleOrTitle: true,
showAirTime: true,