mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
556b64e92c
commit
a8a609a04d
39 changed files with 121 additions and 1198 deletions
|
@ -1,5 +1,5 @@
|
|||
define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo', 'focusManager', 'indicators', 'globalize', 'browser', 'layoutManager', 'apphost', 'emby-button', 'css!./card', 'paper-icon-button-light', 'clearButtonStyle'],
|
||||
function (datetime, imageLoader, connectionManager, itemHelper, mediaInfo, focusManager, indicators, globalize, browser, layoutManager, appHost) {
|
||||
define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo', 'focusManager', 'indicators', 'globalize', 'layoutManager', 'apphost', 'emby-button', 'css!./card', 'paper-icon-button-light', 'clearButtonStyle'],
|
||||
function (datetime, imageLoader, connectionManager, itemHelper, mediaInfo, focusManager, indicators, globalize, layoutManager, appHost) {
|
||||
|
||||
// Regular Expressions for parsing tags and attributes
|
||||
var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g,
|
||||
|
@ -102,15 +102,33 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
}
|
||||
}
|
||||
|
||||
function isResizable(windowWidth) {
|
||||
|
||||
var screen = window.screen;
|
||||
if (screen) {
|
||||
var screenWidth = screen.availWidth;
|
||||
|
||||
if ((screenWidth - windowWidth) > 20) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getImageWidth(shape) {
|
||||
|
||||
var screenWidth = window.innerWidth;
|
||||
|
||||
if (!browser.mobile && !browser.tv) {
|
||||
if (isResizable(screenWidth)) {
|
||||
var roundScreenTo = 100;
|
||||
screenWidth = Math.ceil(screenWidth / roundScreenTo) * roundScreenTo;
|
||||
}
|
||||
|
||||
if (window.screen) {
|
||||
screenWidth = Math.min(screenWidth, screen.availWidth || screenWidth);
|
||||
}
|
||||
|
||||
var imagesPerRow = getPostersPerRow(shape, screenWidth);
|
||||
|
||||
var shapeWidth = screenWidth / imagesPerRow;
|
||||
|
@ -1094,7 +1112,7 @@ define(['datetime', 'imageLoader', 'connectionManager', 'itemHelper', 'mediaInfo
|
|||
|
||||
if (forceName && !options.cardLayout) {
|
||||
showTitle = imgUrl;
|
||||
|
||||
|
||||
if (overlayText == null) {
|
||||
overlayText = true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue