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:
parent
4cbff9dbd7
commit
1e3fa5418c
16 changed files with 294 additions and 339 deletions
|
@ -1,11 +1,14 @@
|
|||
import layoutManager from '../../components/layoutManager';
|
||||
import loading from '../../components/loading/loading';
|
||||
import datetime from '../../scripts/datetime';
|
||||
import cardBuilder from '../../components/cardbuilder/cardBuilder';
|
||||
import imageLoader from '../../components/images/imageLoader';
|
||||
import globalize from '../../scripts/globalize';
|
||||
import '../../styles/scrollstyles.scss';
|
||||
import '../../elements/emby-itemscontainer/emby-itemscontainer';
|
||||
import cardBuilder from 'components/cardbuilder/cardBuilder';
|
||||
import imageLoader from 'components/images/imageLoader';
|
||||
import layoutManager from 'components/layoutManager';
|
||||
import loading from 'components/loading/loading';
|
||||
import datetime from 'scripts/datetime';
|
||||
import globalize from 'scripts/globalize';
|
||||
import { getBackdropShape } from 'utils/card';
|
||||
|
||||
import 'elements/emby-itemscontainer/emby-itemscontainer';
|
||||
|
||||
import 'styles/scrollstyles.scss';
|
||||
|
||||
function getUpcomingPromise(context, params) {
|
||||
loading.show();
|
||||
|
@ -40,10 +43,6 @@ function enableScrollX() {
|
|||
return !layoutManager.desktop;
|
||||
}
|
||||
|
||||
function getThumbShape() {
|
||||
return enableScrollX() ? 'overflowBackdrop' : 'backdrop';
|
||||
}
|
||||
|
||||
function renderUpcoming(elem, items) {
|
||||
const groups = [];
|
||||
let currentGroupName = '';
|
||||
|
@ -105,7 +104,7 @@ function renderUpcoming(elem, items) {
|
|||
html += cardBuilder.getCardsHtml({
|
||||
items: group.items,
|
||||
showLocationTypeIndicator: false,
|
||||
shape: getThumbShape(),
|
||||
shape: getBackdropShape(enableScrollX()),
|
||||
showTitle: true,
|
||||
preferThumb: true,
|
||||
lazy: true,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue