added wallet fields

This commit is contained in:
PhilReact 2023-10-26 02:03:29 +03:00
parent ed5253d6d0
commit ce3129ae7e
2 changed files with 82 additions and 52 deletions

View File

@ -1218,6 +1218,7 @@
"profile2": "Go to name registration", "profile2": "Go to name registration",
"profile3": "Update profile", "profile3": "Update profile",
"profile4": "Tagline", "profile4": "Tagline",
"profile5": "Bio" "profile5": "Bio",
"profile6": "Wallet Addresses"
} }
} }

View File

@ -24,7 +24,8 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
editContent: { type: Object }, editContent: { type: Object },
onClose: { attribute: false }, onClose: { attribute: false },
tagline: { type: String }, tagline: { type: String },
bio: {type: String} bio: { type: String },
wallets: { type: Array },
}; };
} }
@ -34,11 +35,21 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
this.isLoading = false; this.isLoading = false;
this.nodeUrl = this.getNodeUrl(); this.nodeUrl = this.getNodeUrl();
this.myNode = this.getMyNode(); this.myNode = this.getMyNode();
this.tagline = ""; this.tagline = '';
this.bio = "", (this.bio = ''),
this.walletList = [ (this.walletList = [
"btcWallet", "ltcWallet", "dogeWallet","dgbWallet", "rvnWallet", "arrrWallet" 'btc_Address',
] 'ltc_Address',
'doge_Address',
'dgb_Address',
'rvn_Address',
'arrr_Address',
]);
let wallets = {};
this.walletList.forEach((item) => {
wallets[item] = '';
});
this.wallets = wallets;
} }
static get styles() { static get styles() {
@ -234,7 +245,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
<textarea <textarea
class="input" class="input"
@change=${(e) => { @change=${(e) => {
this.tagline = e.target.value this.tagline = e.target.value;
}} }}
.value=${this.tagline} .value=${this.tagline}
?disabled=${this.isLoading} ?disabled=${this.isLoading}
@ -242,7 +253,6 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
placeholder="${translate('profile.profile4')}" placeholder="${translate('profile.profile4')}"
rows="3" rows="3"
></textarea> ></textarea>
</div> </div>
<div style="height:15px"></div> <div style="height:15px"></div>
<div style="display: flex;flex-direction: column;"> <div style="display: flex;flex-direction: column;">
@ -256,7 +266,7 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
<textarea <textarea
class="input" class="input"
@change=${(e) => { @change=${(e) => {
this.bio = e.target.value this.bio = e.target.value;
}} }}
.value=${this.bio} .value=${this.bio}
?disabled=${this.isLoading} ?disabled=${this.isLoading}
@ -264,7 +274,26 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
placeholder="${translate('profile.profile5')}" placeholder="${translate('profile.profile5')}"
rows="3" rows="3"
></textarea> ></textarea>
</div>
<div style="height:15px"></div>
<p>${get('profile.profile6')}</p>
<div style="display: flex;flex-direction: column;">
${Object.keys(this.wallets).map((key) => {
return html`
<input
id=${key}
placeholder=${key}
class="input"
.value=${this.wallets[key]}
@change=${(e) => {
this.wallets = {
...this.wallets,
[key]: e.target.value,
};
}}
/>
`;
})}
</div> </div>
</div> </div>
<div <div