mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Improvements to the quality of artworks and user images - Part 2 (#512)
* Improved the overall appearance of user images * Rounded photo in 'My profile' page * Improved quality of media artwork * fix some minor bugs introduced from a merge conflict
This commit is contained in:
parent
f6617cb28c
commit
e538a6d62c
13 changed files with 29 additions and 62 deletions
|
@ -173,19 +173,6 @@ define(['browser', 'connectionManager', 'playbackManager', 'dom', 'css!./style']
|
|||
currentLoadingBackdrop = instance;
|
||||
}
|
||||
|
||||
var standardWidths = [480, 720, 1280, 1440, 1920];
|
||||
function getBackdropMaxWidth() {
|
||||
var width = dom.getWindowSize().innerWidth;
|
||||
var roundScreenTo = 100;
|
||||
|
||||
if (standardWidths.indexOf(width) !== -1) {
|
||||
return width;
|
||||
}
|
||||
|
||||
width = Math.floor(width / roundScreenTo) * roundScreenTo;
|
||||
return Math.min(width, 1920);
|
||||
}
|
||||
|
||||
function getItemImageUrls(item, imageOptions) {
|
||||
imageOptions = imageOptions || {};
|
||||
|
||||
|
@ -195,7 +182,6 @@ define(['browser', 'connectionManager', 'playbackManager', 'dom', 'css!./style']
|
|||
return apiClient.getScaledImageUrl(item.BackdropItemId || item.Id, Object.assign(imageOptions, {
|
||||
type: "Backdrop",
|
||||
tag: imgTag,
|
||||
maxWidth: getBackdropMaxWidth(),
|
||||
index: index
|
||||
}));
|
||||
});
|
||||
|
@ -206,7 +192,6 @@ define(['browser', 'connectionManager', 'playbackManager', 'dom', 'css!./style']
|
|||
return apiClient.getScaledImageUrl(item.ParentBackdropItemId, Object.assign(imageOptions, {
|
||||
type: "Backdrop",
|
||||
tag: imgTag,
|
||||
maxWidth: getBackdropMaxWidth(),
|
||||
index: index
|
||||
}));
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue