add button to call selected peer
This commit is contained in:
@@ -321,6 +321,15 @@
|
||||
this.updateCallsList();
|
||||
}, 3000);
|
||||
|
||||
// parse url params
|
||||
var queryParams = new URLSearchParams(location.search);
|
||||
var queryDestinationHash = queryParams.get('destination_hash');
|
||||
|
||||
// autofill destination hash to call when query param provided in url
|
||||
if(queryDestinationHash){
|
||||
this.destinationHash = queryDestinationHash;
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
async initiateCall(destinationHash) {
|
||||
|
||||
@@ -252,8 +252,21 @@
|
||||
<div class="text-sm"><{{ selectedPeer.destination_hash }}> <span v-if="selectedPeerPath" @click="onDestinationPathClick(selectedPeerPath)" class="cursor-pointer">{{ selectedPeerPath.hops }} {{ selectedPeerPath.hops === 1 ? 'hop' : 'hops' }} away</span></div>
|
||||
</div>
|
||||
|
||||
<!-- delete button -->
|
||||
<!-- call button -->
|
||||
<div class="ml-auto my-auto mr-2">
|
||||
<a :href="`call.html?destination_hash=${selectedPeer.destination_hash}`" target="_blank" class="cursor-pointer">
|
||||
<div class="flex text-gray-700 bg-gray-100 hover:bg-gray-200 p-2 rounded-full">
|
||||
<div>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-5 h-5">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.25 6.75c0 8.284 6.716 15 15 15h2.25a2.25 2.25 0 0 0 2.25-2.25v-1.372c0-.516-.351-.966-.852-1.091l-4.423-1.106c-.44-.11-.902.055-1.173.417l-.97 1.293c-.282.376-.769.542-1.21.38a12.035 12.035 0 0 1-7.143-7.143c-.162-.441.004-.928.38-1.21l1.293-.97c.363-.271.527-.734.417-1.173L6.963 3.102a1.125 1.125 0 0 0-1.091-.852H4.5A2.25 2.25 0 0 0 2.25 4.5v2.25Z" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- delete button -->
|
||||
<div class="my-auto mr-2">
|
||||
<div @click="deleteConversation" href="javascript:void(0)" class="cursor-pointer">
|
||||
<div class="flex text-gray-700 bg-gray-100 hover:bg-gray-200 p-2 rounded-full">
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user