From ea844c9298e4a32f51bfd965e59e4598067c64a0 Mon Sep 17 00:00:00 2001 From: Pigpig105 <81789882+Pigpig105@users.noreply.github.com> Date: Fri, 3 Feb 2023 19:49:09 -0800 Subject: [PATCH 01/10] Update wallet-profile.js --- .../src/components/wallet-profile.js | 57 +++++++++++++++++-- 1 file changed, 51 insertions(+), 6 deletions(-) diff --git a/qortal-ui-core/src/components/wallet-profile.js b/qortal-ui-core/src/components/wallet-profile.js index 65e2ec6c..475dfea8 100644 --- a/qortal-ui-core/src/components/wallet-profile.js +++ b/qortal-ui-core/src/components/wallet-profile.js @@ -12,6 +12,7 @@ class WalletProfile extends connect(store)(LitElement) { wallet: { type: Object }, nodeConfig: { type: Object }, accountInfo: { type: Object }, + imageUrl: { type: String }, theme: { type: String, reflect: true } } } @@ -30,6 +31,7 @@ class WalletProfile extends connect(store)(LitElement) { names: [], addressInfo: {} } + this.imageUrl = '' this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light' } @@ -56,9 +58,9 @@ class WalletProfile extends connect(store)(LitElement) { margin: 0; font-size: 18px; font-weight:500; - display: inline-block; width:100%; padding-bottom:8px; + display: flex; } #blocksMinted { @@ -76,16 +78,37 @@ class WalletProfile extends connect(store)(LitElement) { margin-top:8px; font-size:11px; } + + .round-fullinfo { + position: relative; + width: 69px; + height: 69px; + border-radius: 50%; + } + + .full-info-logo { + width: 69px; + height: 69px; + border-radius: 50%; + } + + .inline-block-child { + flex: 1; + }
- - ${this.accountInfo.names.length !== 0 ? this.accountInfo.names[0].name : ''} - - ${this.accountInfo.addressInfo ? html`${translate("walletprofile.minterlevel")} - ${this.accountInfo.addressInfo.level} ${this.accountInfo.addressInfo.flags === 1 ? html`(F)` : ''}` : ''} -

${translate("walletprofile.blocksminted")} - ${this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment}

+
+ +     +
+
${this.accountInfo.names.length !== 0 ? this.accountInfo.names[0].name : ''}
+
${this.accountInfo.addressInfo ? html`${translate("walletprofile.minterlevel")} - ${this.accountInfo.addressInfo.level} ${this.accountInfo.addressInfo.flags === 1 ? html`(F)` : ''}` : ''}
+

${translate("walletprofile.blocksminted")} - ${this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment}

+
+

${this.wallet.addresses[0].address}

@@ -106,6 +129,28 @@ class WalletProfile extends connect(store)(LitElement) { this.toast = container.appendChild(toast) } + async getAllWithAddress(myAddress) { + await this.getAddressUserAvatar(myAddress) + } + + getAvatar() { + let numberBlocks = (this.accountInfo.addressInfo.blocksMinted + this.accountInfo.addressInfo.blocksMintedAdjustment); + if (Number.isNaN(numberBlocks) || numberBlocks == "" || numberBlocks === null) { + return html`` + } 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`` + } + } + + getApiKey() { + const apiNode = store.getState().app.nodeConfig.knownNodes[store.getState().app.nodeConfig.node]; + let apiKey = apiNode.apiKey; + return apiKey; + } + stateChanged(state) { this.wallet = state.app.wallet this.nodeConfig = state.app.nodeConfig From f04b9abf7811536463216bc24428340315b7308d Mon Sep 17 00:00:00 2001 From: Pigpig105 <81789882+Pigpig105@users.noreply.github.com> Date: Mon, 13 Feb 2023 15:06:47 -0800 Subject: [PATCH 02/10] Update login-view.js --- qortal-ui-core/src/components/login-view/login-view.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/qortal-ui-core/src/components/login-view/login-view.js b/qortal-ui-core/src/components/login-view/login-view.js index ebdf31f2..6e7e67a3 100644 --- a/qortal-ui-core/src/components/login-view/login-view.js +++ b/qortal-ui-core/src/components/login-view/login-view.js @@ -2,6 +2,7 @@ import { LitElement, html, css } from 'lit' import { connect } from 'pwa-helpers' import { store } from '../../store.js' import { stateAwait } from '../../stateAwait.js' +import { translate, translateUnsafeHTML } from 'lit-translate' import '@material/mwc-button' import '@material/mwc-icon' @@ -36,6 +37,7 @@ class LoginView extends connect(store)(LitElement) { config: { type: Object }, rippleLoadingMessage: { type: String }, selectedPageElement: {}, + nodeConfig: { type: Object }, theme: { type: String, reflect: true } } } @@ -132,10 +134,8 @@ class LoginView extends connect(store)(LitElement) { max-height:var(--window-height); margin-right: auto; margin-left: auto; - width: calc(100vw); } - .qortal-logo { margin-left: auto; margin-right: auto; @@ -202,7 +202,6 @@ class LoginView extends connect(store)(LitElement) { border-radius: 4px; } #loginContainerPages [page="welcome"] { - } } @media only screen and (max-width: ${getComputedStyle(document.body).getPropertyValue('--layout-breakpoint-tablet')}) { @@ -222,7 +221,6 @@ class LoginView extends connect(store)(LitElement) { padding-left:12px; } } - @keyframes fade { from { opacity: 0; @@ -258,9 +256,9 @@ class LoginView extends connect(store)(LitElement) { display: none; } -
settings.show()}> +

${translate("appinfo.uiversion")}: ${this.nodeConfig.version ? this.nodeConfig.version : ''}