4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-12 02:05:51 +00:00

Update account-view.js

This commit is contained in:
Pigpig105 2023-02-12 21:50:15 -08:00 committed by GitHub
parent 9da50eace1
commit 96979b30b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,12 +95,12 @@ class AccountView extends connect(store)(LitElement) {
getAvatar() {
let numberBlocks = (this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment);
if (Number.isNaN(numberBlocks) || numberBlocks == "" || numberBlocks === null) {
return html`<img src="/img/noavatar.png" style="width:150px; height:150px;">`
return html`<img src="/img/noavatar.png" style="width:150px; height:150px; border-radius: 50%;">`
} else {
const avatarNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
const avatarUrl = avatarNode.protocol + '://' + avatarNode.domain + ':' + avatarNode.port
const url = `${avatarUrl}/arbitrary/THUMBNAIL/${this.accountInfo.names[0].name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
return html`<img src="${url}" style="width:150px; height:150px;" onerror="this.src='/img/noavatar.png';">`
return html`<img src="${url}" style="width:150px; height:150px; border-radius: 50%;" onerror="this.src='/img/noavatar.png';">`
}
}