From 10742914852ab57e4106eaa512c88350e2d2d29d Mon Sep 17 00:00:00 2001
From: Hadi <112569860+anotherhadi@users.noreply.github.com>
Date: Mon, 27 Oct 2025 12:00:09 +0100
Subject: [PATCH] Copy with columns
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
---
.../lib/components/index/search/datawells.svelte | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/front/src/lib/components/index/search/datawells.svelte b/front/src/lib/components/index/search/datawells.svelte
index 9e7188d..f7c14c7 100644
--- a/front/src/lib/components/index/search/datawells.svelte
+++ b/front/src/lib/components/index/search/datawells.svelte
@@ -24,7 +24,7 @@
let copyText = $state("Copy to clipboard");
- async function copyDataleaksInformation(withSample: boolean) {
+ async function copyDataleaksInformation(withColumns: boolean, withSample: boolean) {
if (!filteredDataleaks || filteredDataleaks.length === 0) {
copyText = "No dataleaks to copy";
return;
@@ -60,6 +60,8 @@
console.error("Failed to fetch sample for", dataleak.Name, err);
fullText += "Sample: [Failed to fetch]\n";
});
+ } else if (withColumns) {
+ fullText += `Columns: ${dataleak.Columns.join(", ")}\n`;
}
fullText += "\n";
}
@@ -150,12 +152,17 @@
>
copyDataleaksInformation(false, false)}>{copyText}
copyDataleaksInformation(true, false)}
+ >{copyText} (w/ columns)
+