fix: allow ws:// relays
This commit is contained in:
parent
f601ca38f6
commit
752fad2e3c
1 changed files with 11 additions and 7 deletions
|
|
@ -73,6 +73,7 @@
|
||||||
icon="cancel"
|
icon="cancel"
|
||||||
color="pink"
|
color="pink"
|
||||||
></q-btn>
|
></q-btn>
|
||||||
|
</q-td>
|
||||||
</q-tr>
|
</q-tr>
|
||||||
</template>
|
</template>
|
||||||
{% endraw %}
|
{% endraw %}
|
||||||
|
|
@ -203,14 +204,17 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addRelay() {
|
addRelay() {
|
||||||
if (!this.relayToAdd.startsWith("wss://")) {
|
if (
|
||||||
this.relayToAdd = ""
|
!this.relayToAdd.startsWith('wss://') &&
|
||||||
|
!this.relayToAdd.startsWith('ws://')
|
||||||
|
) {
|
||||||
|
this.relayToAdd = ''
|
||||||
this.$q.notify({
|
this.$q.notify({
|
||||||
timeout: 5000,
|
timeout: 5000,
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: `Invalid relay URL.`,
|
message: `Invalid relay URL.`,
|
||||||
caption: "Should start with wss://"
|
caption: "Should start with 'wss://'' or 'ws://'"
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("ADD RELAY " + this.relayToAdd)
|
console.log("ADD RELAY " + this.relayToAdd)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue