mirror of
https://api.glitch.com/git/yaswvc
synced 2026-01-12 05:08:11 +00:00
🏚🚩 Checkpoint
./public/index.html:5975361/222 ./public/main.js:5975361/1270
This commit is contained in:
parent
d44b23e16c
commit
809fa2bf48
2 changed files with 10 additions and 3 deletions
|
|
@ -33,7 +33,7 @@
|
||||||
<nav class="navbar navbar-dark bg-dark">
|
<nav class="navbar navbar-dark bg-dark">
|
||||||
<a class="navbar-brand" href="#" style="margin: 0 auto;">
|
<a class="navbar-brand" href="#" style="margin: 0 auto;">
|
||||||
<img
|
<img
|
||||||
src="https://getbootstrap.com/docs/4.5/assets/brand/bootstrap-solid.svg"
|
src="https://glitch.com/edit/favicon-app.ico"
|
||||||
width="30"
|
width="30"
|
||||||
height="30"
|
height="30"
|
||||||
class="d-inline-block align-top"
|
class="d-inline-block align-top"
|
||||||
|
|
@ -79,9 +79,9 @@
|
||||||
<h5 class="card-title">Control</h5>
|
<h5 class="card-title">Control</h5>
|
||||||
<div class="input-group mb-3">
|
<div class="input-group mb-3">
|
||||||
<div class="input-group-prepend">
|
<div class="input-group-prepend">
|
||||||
<button class="btn btn-outline-secondary" type="button">Copy</button>
|
<button v-on:click="copyToClipboard('#peerId')" class="btn btn-outline-secondary" type="button">Copy</button>
|
||||||
</div>
|
</div>
|
||||||
<input id="my-peer-id" type="text" class="form-control" placeholder="my-peer-id">
|
<input id="peerId" v-model="peer.id" type="text" class="form-control" placeholder="my-peer-id" disabled>
|
||||||
</div>
|
</div>
|
||||||
<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">
|
||||||
|
|
|
||||||
|
|
@ -155,6 +155,13 @@ var app = new Vue({
|
||||||
};
|
};
|
||||||
navigator.mediaDevices.getUserMedia(constraints).then(this.gotStream).then(this.gotDevices).catch(this.handleError);
|
navigator.mediaDevices.getUserMedia(constraints).then(this.gotStream).then(this.gotDevices).catch(this.handleError);
|
||||||
},
|
},
|
||||||
|
copyToClipboard: function(selector) {
|
||||||
|
let element = document.querySelector(selector);
|
||||||
|
element.select();
|
||||||
|
element.setSelectionRange(0, 99999); /*For mobile devices*/
|
||||||
|
document.execCommand("copy");
|
||||||
|
alert("Copied the text: " + element.value);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log('VUE is alive!');
|
console.log('VUE is alive!');
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue