forked from Qortal/qortal-ui
Update wallet-profile.js
This commit is contained in:
parent
4a79bc83d3
commit
d46721dced
@ -44,16 +44,13 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
background: var(--sidetopbar);
|
background: var(--sidetopbar);
|
||||||
color: var(--black);
|
color: var(--black);
|
||||||
}
|
}
|
||||||
|
|
||||||
#profileInMenu:hover {
|
#profileInMenu:hover {
|
||||||
}
|
}
|
||||||
|
|
||||||
#accountIcon {
|
#accountIcon {
|
||||||
font-size:48px;
|
font-size:48px;
|
||||||
color: var(--mdc-theme-primary);
|
color: var(--mdc-theme-primary);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#accountName {
|
#accountName {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
@ -62,14 +59,12 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
padding-bottom:8px;
|
padding-bottom:8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
#blocksMinted {
|
#blocksMinted {
|
||||||
margin:0;
|
margin:0;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
font-size: 11px;
|
font-size: 12px;
|
||||||
color: #03a9f4;
|
color: #03a9f4;
|
||||||
}
|
}
|
||||||
|
|
||||||
#address {
|
#address {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -78,26 +73,21 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
margin-top:8px;
|
margin-top:8px;
|
||||||
font-size:11px;
|
font-size:11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.round-fullinfo {
|
.round-fullinfo {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 69px;
|
width: 68px;
|
||||||
height: 69px;
|
height: 68px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full-info-logo {
|
.full-info-logo {
|
||||||
width: 69px;
|
width: 68px;
|
||||||
height: 69px;
|
height: 68px;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.inline-block-child {
|
.inline-block-child {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
<div id="profileInMenu">
|
<div id="profileInMenu">
|
||||||
<div style="padding: 8px 0;">
|
<div style="padding: 8px 0;">
|
||||||
<div id="accountName">
|
<div id="accountName">
|
||||||
@ -134,16 +124,11 @@ class WalletProfile extends connect(store)(LitElement) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getAvatar() {
|
getAvatar() {
|
||||||
let numberBlocks = (this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment);
|
|
||||||
if (Number.isNaN(numberBlocks) || numberBlocks == "" || numberBlocks === null) {
|
|
||||||
return html`<img class="round-fullinfo" src="/img/incognito.png">`
|
|
||||||
} else {
|
|
||||||
const avatarNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
const avatarNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]
|
||||||
const avatarUrl = avatarNode.protocol + '://' + avatarNode.domain + ':' + avatarNode.port
|
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()}`
|
const url = `${avatarUrl}/arbitrary/THUMBNAIL/${this.accountInfo.names[0].name}/qortal_avatar?async=true&apiKey=${this.getApiKey()}`
|
||||||
return html`<img class="round-fullinfo" src="${url}" onerror="this.src='/img/incognito.png';" />`
|
return html`<img class="round-fullinfo" src="${url}" onerror="this.src='/img/incognito.png';" />`
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
getApiKey() {
|
getApiKey() {
|
||||||
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user