improve ux for sharing node

This commit is contained in:
liamcottle
2024-08-28 02:02:28 +12:00
parent 7c93945d80
commit 944bce8697

View File

@ -591,7 +591,14 @@
<h2 class="font-bold">Node Info</h2> <h2 class="font-bold">Node Info</h2>
<h3 class="text-sm">{{ selectedNode.long_name }}</h3> <h3 class="text-sm">{{ selectedNode.long_name }}</h3>
</div> </div>
<div class="my-auto ml-2 flex h-7 items-center"> <div class="my-auto ml-2 flex h-7 items-center space-x-2">
<a href="javascript:void(0)" class="rounded-full" @click="copyShareLinkForNode(selectedNode.node_id)">
<div class="bg-gray-100 hover:bg-gray-200 p-2 rounded-full">
<svg xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 256 256" class="size-6">
<path d="M216,112v96a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V112A16,16,0,0,1,56,96H80a8,8,0,0,1,0,16H56v96H200V112H176a8,8,0,0,1,0-16h24A16,16,0,0,1,216,112ZM93.66,69.66,120,43.31V136a8,8,0,0,0,16,0V43.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,69.66Z"></path>
</svg>
</div>
</a>
<a href="javascript:void(0)" class="rounded-full" @click="selectedNode = null"> <a href="javascript:void(0)" class="rounded-full" @click="selectedNode = null">
<div class="bg-gray-100 hover:bg-gray-200 p-2 rounded-full"> <div class="bg-gray-100 hover:bg-gray-200 p-2 rounded-full">
<svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"> <svg class="w-6 h-6" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
@ -2726,8 +2733,8 @@
const url = this.getShareLinkForNode(nodeId); const url = this.getShareLinkForNode(nodeId);
navigator.clipboard.writeText(url); navigator.clipboard.writeText(url);
// tell use we copied it // tell user we copied it
alert("Copied to clipboard!"); alert("Link copied to clipboard!");
}, },
dismissShowingNodeNeighbours: function() { dismissShowingNodeNeighbours: function() {