From fda5877a1043887357a9590cc2e48495752dcd0d Mon Sep 17 00:00:00 2001 From: Darshan Date: Fri, 17 Oct 2025 16:14:15 +0530 Subject: [PATCH] update: tooltip. --- .../(components)/editor/view.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/(components)/editor/view.svelte b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/(components)/editor/view.svelte index b04adde86..fb7a7c65a 100644 --- a/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/(components)/editor/view.svelte +++ b/src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/(components)/editor/view.svelte @@ -97,6 +97,8 @@ const readOnlyCompartment = new Compartment(); const wrapCompartment = new Compartment(); + let tooltipMessage = $state('Copy document'); + // Store the original data to preserve system values let originalData = $state(data); @@ -874,11 +876,14 @@ class="icon-button" on:click={async () => { await copy(JSON.stringify(data, null, 2)); + tooltipMessage = 'Copied'; + setTimeout(() => (tooltipMessage = 'Copy document'), 1000); }}> - Copy object + + {tooltipMessage} {/if} {/if}