mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 05:08:11 +00:00
🐢🙎 Checkpoint
./public/index.html:5975361/63 ./public/main.js:5975361/49
This commit is contained in:
parent
5fc7546f2c
commit
15e85c85cc
2 changed files with 3 additions and 4 deletions
|
|
@ -86,10 +86,10 @@
|
||||||
<hr>
|
<hr>
|
||||||
<input type="text" id="connect-to-peer" class="form-control" placeholder="paste-peer-id-here">
|
<input type="text" id="connect-to-peer" class="form-control" placeholder="paste-peer-id-here">
|
||||||
<br>
|
<br>
|
||||||
<button class="btn btn-sm btn-success" onclick="connectToPeer()">
|
<button class="btn btn-sm btn-success" v-on:click="connectToPeer(document.querySelector('connect-to-peer').value)">
|
||||||
Connect
|
Connect
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-sm btn-danger" onclick="disconnectFromPeer()">
|
<button class="btn btn-sm btn-danger" v-on:click="disconnectFromPeer()">
|
||||||
Disconnect
|
Disconnect
|
||||||
</button>
|
</button>
|
||||||
<div class="messages"></div>
|
<div class="messages"></div>
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,7 @@ var app = new Vue({
|
||||||
// localStorage.setItem('yaswvc-peerId', peer.id);
|
// localStorage.setItem('yaswvc-peerId', peer.id);
|
||||||
// return peer;
|
// return peer;
|
||||||
// },
|
// },
|
||||||
connectToPeer: function() {
|
connectToPeer: function(peerId) {
|
||||||
let peerId = this.peer.id;
|
|
||||||
this.logMessage(`Connecting to ${peerId}...`);
|
this.logMessage(`Connecting to ${peerId}...`);
|
||||||
|
|
||||||
let conn = this.peer.connect(peerId);
|
let conn = this.peer.connect(peerId);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue