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

Simplify code with object shorthand syntax

This commit is contained in:
Pier-Luc Ducharme 2023-02-09 21:35:59 -05:00
parent a3c330b4e1
commit cf5d65d86e
No known key found for this signature in database
5 changed files with 23 additions and 28 deletions

View file

@ -132,7 +132,7 @@ import template from './imageeditor.template.html';
html += '<div class="cardContent">';
const imageUrl = getImageUrl(currentItem, apiClient, image.ImageType, image.ImageIndex, {maxWidth: options.imageSize});
const imageUrl = getImageUrl(currentItem, apiClient, image.ImageType, image.ImageIndex, { maxWidth: options.imageSize });
html += '<div class="cardImageContainer" style="background-image:url(\'' + imageUrl + '\');background-position:center center;background-size:contain;"></div>';
@ -226,7 +226,7 @@ import template from './imageeditor.template.html';
for (let i = 0, length = images.length; i < length; i++) {
const image = images[i];
const options = {index: i, numImages: length, imageProviders: imageProviders, imageSize: imageSize, tagName: tagName, enableFooterButtons: enableFooterButtons};
const options = { index: i, numImages: length, imageProviders, imageSize, tagName, enableFooterButtons };
html += getCardHtml(image, apiClient, options);
}