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:
Daniel Scalzi
2018-07-02 02:01:28 -04:00
parent 651c2d6f35
commit 3131002d02
2 changed files with 10 additions and 3 deletions

View File

@@ -121,8 +121,13 @@ document.getElementById('avatarOverlay').onclick = (e) => {
// Bind selected account
function updateSelectedAccount(authUser){
let username = 'No Account Selected'
if(authUser != null && authUser.username != null){
username = authUser.displayName
if(authUser != null){
if(authUser.displayName != null){
username = authUser.displayName
}
if(authUser.uuid != null){
document.getElementById('avatarContainer').style.backgroundImage = `url('https://crafatar.com/renders/body/${authUser.uuid}')`
}
}
user_text.innerHTML = username
}