Merge pull request #545 from ferferga/artworks2

Improved appearance of images and artworks - Part 3
This commit is contained in:
dkanada 2019-11-24 21:38:22 +09:00 committed by GitHub
commit 79cd6a7552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 22 deletions

View File

@ -145,7 +145,7 @@ button {
}
.cardImageContainer {
background-size: contain;
background-size: cover;
background-repeat: no-repeat;
background-position: center center;
display: -webkit-flex;

View File

@ -525,7 +525,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (session.UserId && session.UserPrimaryImageTag) {
return ApiClient.getUserImageUrl(session.UserId, {
tag: session.UserPrimaryImageTag,
height: 24,
type: "Primary"
});
}
@ -631,7 +630,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.BackdropImageTags && item.BackdropImageTags.length) {
return ApiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
width: 275,
tag: item.BackdropImageTags[0]
});
}
@ -639,7 +637,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.ParentBackdropImageTags && item.ParentBackdropImageTags.length) {
return ApiClient.getScaledImageUrl(item.ParentBackdropItemId, {
type: "Backdrop",
width: 275,
tag: item.ParentBackdropImageTags[0]
});
}
@ -647,7 +644,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.BackdropImageTag) {
return ApiClient.getScaledImageUrl(item.BackdropItemId, {
type: "Backdrop",
width: 275,
tag: item.BackdropImageTag
});
}
@ -657,7 +653,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && imageTags.Thumb) {
return ApiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
width: 275,
tag: imageTags.Thumb
});
}
@ -665,7 +660,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.ParentThumbImageTag) {
return ApiClient.getScaledImageUrl(item.ParentThumbItemId, {
type: "Thumb",
width: 275,
tag: item.ParentThumbImageTag
});
}
@ -673,7 +667,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.ThumbImageTag) {
return ApiClient.getScaledImageUrl(item.ThumbItemId, {
type: "Thumb",
width: 275,
tag: item.ThumbImageTag
});
}
@ -681,7 +674,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && imageTags.Primary) {
return ApiClient.getScaledImageUrl(item.Id, {
type: "Primary",
width: 275,
tag: imageTags.Primary
});
}
@ -689,7 +681,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.PrimaryImageTag) {
return ApiClient.getScaledImageUrl(item.PrimaryImageItemId, {
type: "Primary",
width: 275,
tag: item.PrimaryImageTag
});
}
@ -697,7 +688,6 @@ define(["datetime", "events", "itemHelper", "serverNotifications", "dom", "globa
if (item && item.AlbumPrimaryImageTag) {
return ApiClient.getScaledImageUrl(item.AlbumId, {
type: "Primary",
width: 275,
tag: item.AlbumPrimaryImageTag
});
}

View File

@ -459,7 +459,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
imgUrl = apiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
index: 0,
maxWidth: screenWidth,
tag: item.ImageTags.Thumb
});
itemBackdropElement.classList.remove("noBackdrop");
@ -469,7 +468,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
imgUrl = apiClient.getScaledImageUrl(item.Id, {
type: "Primary",
index: 0,
maxWidth: screenWidth,
tag: item.ImageTags.Primary
});
itemBackdropElement.classList.remove("noBackdrop");
@ -479,7 +477,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
imgUrl = apiClient.getScaledImageUrl(item.Id, {
type: "Backdrop",
index: 0,
maxWidth: screenWidth,
tag: item.BackdropImageTags[0]
});
itemBackdropElement.classList.remove("noBackdrop");
@ -489,8 +486,7 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
imgUrl = apiClient.getScaledImageUrl(item.ParentBackdropItemId, {
type: "Backdrop",
index: 0,
tag: item.ParentBackdropImageTags[0],
maxWidth: screenWidth
tag: item.ParentBackdropImageTags[0]
});
itemBackdropElement.classList.remove("noBackdrop");
imageLoader.lazyImage(itemBackdropElement, imgUrl, false);
@ -499,7 +495,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
imgUrl = apiClient.getScaledImageUrl(item.Id, {
type: "Thumb",
index: 0,
maxWidth: screenWidth,
tag: item.ImageTags.Thumb
});
itemBackdropElement.classList.remove("noBackdrop");

View File

@ -25,11 +25,6 @@ define(["dom", "layoutManager", "inputManager", "connectionManager", "events", "
if (user && user.name) {
if (user.imageUrl) {
var url = user.imageUrl;
if (user.supportsImageParams) {
url += "&height=" + Math.round(26 * Math.max(window.devicePixelRatio || 1, 2));
}
updateHeaderUserButton(url);
hasImage = true;
}