mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 11:42:14 -08:00
Use full body skin render for the avatar image.
There's room for improvement here, but it works for now.
This commit is contained in:
parent
651c2d6f35
commit
3131002d02
@ -2305,7 +2305,9 @@ input:checked + .toggleSwitchSlider:before {
|
|||||||
box-shadow: 0px 0px 10px 0px rgb(0, 0, 0);
|
box-shadow: 0px 0px 10px 0px rgb(0, 0, 0);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
background-image: url('https://cdn.discordapp.com/avatars/169197209630277642/6650b5a50e1cb3d00a79b9b88b9a0cd4.png');
|
/*background-image: url('https://cdn.discordapp.com/avatars/169197209630277642/6650b5a50e1cb3d00a79b9b88b9a0cd4.png');*/
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,9 +121,14 @@ document.getElementById('avatarOverlay').onclick = (e) => {
|
|||||||
// Bind selected account
|
// Bind selected account
|
||||||
function updateSelectedAccount(authUser){
|
function updateSelectedAccount(authUser){
|
||||||
let username = 'No Account Selected'
|
let username = 'No Account Selected'
|
||||||
if(authUser != null && authUser.username != null){
|
if(authUser != null){
|
||||||
|
if(authUser.displayName != null){
|
||||||
username = authUser.displayName
|
username = authUser.displayName
|
||||||
}
|
}
|
||||||
|
if(authUser.uuid != null){
|
||||||
|
document.getElementById('avatarContainer').style.backgroundImage = `url('https://crafatar.com/renders/body/${authUser.uuid}')`
|
||||||
|
}
|
||||||
|
}
|
||||||
user_text.innerHTML = username
|
user_text.innerHTML = username
|
||||||
}
|
}
|
||||||
updateSelectedAccount(ConfigManager.getSelectedAccount())
|
updateSelectedAccount(ConfigManager.getSelectedAccount())
|
||||||
|
Loading…
Reference in New Issue
Block a user