Browse Source

added wallet fields

pull/219/head
PhilReact 11 months ago
parent
commit
ce3129ae7e
  1. 3
      core/language/us.json
  2. 131
      core/src/components/friends-view/profile-modal-update.js

3
core/language/us.json

@ -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"
} }
} }

131
core/src/components/friends-view/profile-modal-update.js

@ -23,8 +23,9 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
onSubmit: { attribute: false }, onSubmit: { attribute: false },
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() {
@ -222,50 +233,68 @@ class ProfileModalUpdate extends connect(store)(LitElement) {
<div class="modal-overlay ${this.isOpen ? '' : 'hidden'}"> <div class="modal-overlay ${this.isOpen ? '' : 'hidden'}">
<div class="modal-content"> <div class="modal-content">
<div class="inner-content"> <div class="inner-content">
<div style="height:15px"></div> <div style="height:15px"></div>
<div style="display: flex;flex-direction: column;"> <div style="display: flex;flex-direction: column;">
<label <label
for="tagline" for="tagline"
id="taglineLabel" id="taglineLabel"
style="color: var(--black);" style="color: var(--black);"
> >
${get('profile.profile4')} ${get('profile.profile4')}
</label> </label>
<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}
id="tagline" id="tagline"
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;"> <label
<label for="bio"
for="bio" id="bioLabel"
id="bioLabel" style="color: var(--black);"
style="color: var(--black);" >
> ${get('profile.profile5')}
${get('profile.profile5')} </label>
</label> <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} id="bio"
id="bio" placeholder="${translate('profile.profile5')}"
placeholder="${translate('profile.profile5')}" rows="3"
rows="3" ></textarea>
></textarea> </div>
<div style="height:15px"></div>
</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
style="display:flex;justify-content:space-between;align-items:center;margin-top:20px" style="display:flex;justify-content:space-between;align-items:center;margin-top:20px"

Loading…
Cancel
Save