mirror of
https://github.com/meshcore-dev/meshcore.js.git
synced 2026-04-20 22:13:49 +00:00
implement zero hop repeater ping
This commit is contained in:
parent
78d34c10cd
commit
d1bf08fec4
2 changed files with 92 additions and 0 deletions
|
|
@ -138,6 +138,7 @@
|
|||
<div v-if="contact.type === 1" @click="sendMessage(contact)" class="hover:underline cursor-pointer">Message</div>
|
||||
<div v-if="contact.type === 2" @click="showCommandLine(contact)" class="hover:underline cursor-pointer">CLI</div>
|
||||
<div v-if="contact.type === 2" @click="statusRequest(contact)" class="hover:underline cursor-pointer">GetStats</div>
|
||||
<div v-if="contact.type === 2" @click="pingRepeater(contact)" class="hover:underline cursor-pointer">Ping</div>
|
||||
<div @click="setPath(contact)" class="hover:underline cursor-pointer">Set Path</div>
|
||||
<div @click="shareContact(contact)" class="hover:underline cursor-pointer">Share (Zero Hop)</div>
|
||||
<div @click="exportContact(contact)" class="hover:underline cursor-pointer">Export</div>
|
||||
|
|
@ -501,6 +502,14 @@
|
|||
}
|
||||
|
||||
},
|
||||
async pingRepeater(contact) {
|
||||
try {
|
||||
const response = await this.connection.pingRepeaterZeroHop(contact.publicKey);
|
||||
console.log(response);
|
||||
} catch(e) {
|
||||
console.log(e);
|
||||
}
|
||||
},
|
||||
async reboot() {
|
||||
try {
|
||||
await this.connection.reboot();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue