4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-12 02:05:51 +00:00
This commit is contained in:
AlphaX-Projects 2022-03-03 16:58:40 +01:00 committed by GitHub
parent d1621e7660
commit fc6496d685
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ class PublishData extends LitElement {
showIdentifier: { type: Boolean }, showIdentifier: { type: Boolean },
serviceLowercase: { type: String }, serviceLowercase: { type: String },
names: { type: Array }, names: { type: Array },
registeredName: { type: String }, myRegisteredName: { type: String },
selectedName: { type: String }, selectedName: { type: String },
path: { type: String }, path: { type: String },
portForwardingEnabled: { type: Boolean }, portForwardingEnabled: { type: Boolean },
@ -102,8 +102,8 @@ class PublishData extends LitElement {
<!-- TODO: adapt this dropdown to list all names on the account. Right now it's hardcoded to a single name --> <!-- TODO: adapt this dropdown to list all names on the account. Right now it's hardcoded to a single name -->
<p style="display: ${this.showName ? 'block' : 'none'}"> <p style="display: ${this.showName ? 'block' : 'none'}">
<mwc-select id="registeredName" label="Select Name" index="0" @selected=${(e) => this.selectName(e)} style="min-width: 130px; max-width:100%; width:100%;"> <mwc-select id="registeredName" label="Select Name" index="0" @selected=${(e) => this.selectName(e)} style="min-width: 130px; max-width:100%; width:100%;">
<mwc-list-item selected value=""></mwc-list-item> <mwc-list-item value=""></mwc-list-item>
<mwc-list-item value="${this.registeredName}">${this.registeredName}</mwc-list-item> <mwc-list-item value="${this.myRegisteredName}">${this.myRegisteredName}</mwc-list-item>
</mwc-select> </mwc-select>
</p> </p>
${this.renderUploadField()} ${this.renderUploadField()}
@ -417,7 +417,7 @@ class PublishData extends LitElement {
// Default to true so the message doesn't appear and disappear quickly // Default to true so the message doesn't appear and disappear quickly
this.portForwardingEnabled = true this.portForwardingEnabled = true
this.names = [] this.names = []
this.registeredName = '' this.myRegisteredName = ''
this.selectedName = 'invalid' this.selectedName = 'invalid'
this.path = '' this.path = ''
this.successMessage = '' this.successMessage = ''
@ -434,7 +434,7 @@ class PublishData extends LitElement {
setTimeout(() => { setTimeout(() => {
this.names = res this.names = res
if (res[0] != null) { if (res[0] != null) {
this.registeredName = res[0].name; this.myRegisteredName = res[0].name;
} }
}, 1) }, 1)
}) })
@ -450,7 +450,7 @@ class PublishData extends LitElement {
this.portForwardingEnabled = (res.inboundConnections != null && res.inboundConnections > 0); this.portForwardingEnabled = (res.inboundConnections != null && res.inboundConnections > 0);
}, 1) }, 1)
}) })
setTimeout(fetchNames, this.config.user.nodeSettings.pingInterval) setTimeout(fetchPeersSummary, this.config.user.nodeSettings.pingInterval)
} }
let configLoaded = false let configLoaded = false
@ -498,8 +498,8 @@ class PublishData extends LitElement {
} }
selectName(e) { selectName(e) {
const name = this.shadowRoot.getElementById('registeredName').value let name = this.shadowRoot.getElementById('registeredName')
this.selectedName = name this.selectedName = (name.value)
} }
getApiKey() { getApiKey() {