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
|
@ -11,14 +11,13 @@ define(["controllers/userpasswordpage", "loading", "libraryMenu", "apphost", "em
|
|||
var imageUrl = "img/logindefault.png";
|
||||
if (user.PrimaryImageTag) {
|
||||
imageUrl = ApiClient.getUserImageUrl(user.Id, {
|
||||
height: 200,
|
||||
tag: user.PrimaryImageTag,
|
||||
type: "Primary"
|
||||
});
|
||||
}
|
||||
|
||||
var userImage = page.querySelector("#image");
|
||||
userImage.src = imageUrl;
|
||||
userImage.style.backgroundImage = "url(" + imageUrl + ")";
|
||||
|
||||
Dashboard.getCurrentUser().then(function (loggedInUser) {
|
||||
if (user.PrimaryImageTag) {
|
||||
|
@ -71,7 +70,7 @@ define(["controllers/userpasswordpage", "loading", "libraryMenu", "apphost", "em
|
|||
reader.onerror = onFileReaderError;
|
||||
reader.onabort = onFileReaderAbort;
|
||||
reader.onload = function (evt) {
|
||||
userImage.src = evt.target.result;
|
||||
userImage.style.backgroundImage = "url(" + evt.target.result + ")";
|
||||
var userId = getParameterByName("userId");
|
||||
ApiClient.uploadUserImage(userId, "Primary", file).then(function () {
|
||||
loading.hide();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue