fix wrapping & overflow

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-09-26 22:02:31 +02:00
parent 9875ae3dfc
commit 7df7b95c7b

View File

@@ -1,5 +1,5 @@
<script lang="ts"> <script lang="ts">
import Table from "$src/lib/components/table.svelte"; import Table from "$src/lib/components/table.svelte";
import { ChevronDown, ChevronUp, Database, Key, Mail } from "@lucide/svelte"; import { ChevronDown, ChevronUp, Database, Key, Mail } from "@lucide/svelte";
const { row }: { row: Record<string, string> } = $props(); const { row }: { row: Record<string, string> } = $props();
@@ -7,6 +7,7 @@
let isOpen = $state<boolean>(false); let isOpen = $state<boolean>(false);
function getDomain(dataleakName: string) { function getDomain(dataleakName: string) {
if (!dataleakName) return null;
const firstPart = dataleakName.split(" ")[0].toLowerCase(); const firstPart = dataleakName.split(" ")[0].toLowerCase();
const domainRegex = const domainRegex =
/^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/; /^(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z]{2,}$/;
@@ -79,8 +80,12 @@
</div> </div>
{/if} {/if}
</div> </div>
<div> <div
<div>{getHighlightedContent(row)}</div> class="flex-1 flex flex-col min-w-0 items-start justify-center"
>
<div class="w-full overflow-hidden whitespace-nowrap text-ellipsis">
{getHighlightedContent(row)}
</div>
<div class="text-xs uppercase font-semibold opacity-60"> <div class="text-xs uppercase font-semibold opacity-60">
{row["source"]} {row["source"]}
</div> </div>
@@ -94,7 +99,7 @@
</div> </div>
</button> </button>
{#if isOpen} {#if isOpen}
<li class="list-row flex bg-base-200 rounded-t-none mb-2"> <li class="grid list-row bg-base-200 rounded-t-none mb-2">
<Table {row} /> <Table {row} />
</li> </li>
{/if} {/if}