parity with current UI

This commit is contained in:
Will Greenberg
2025-04-15 18:08:18 -07:00
parent a33c7511eb
commit d63f419fbc
8 changed files with 120 additions and 13 deletions

View File

@@ -3,9 +3,11 @@
import DownloadLink from '$lib/components/DownloadLink.svelte';
import DeleteButton from "$lib/components/DeleteButton.svelte";
import AnalysisStatus from "./AnalysisStatus.svelte";
let { entry, current }: {
import AnalysisView from "./AnalysisView.svelte";
let { entry, current, i }: {
entry: ManifestEntry;
current: boolean;
i: number
} = $props();
// passing `undefined` as the locale uses the browser default
@@ -13,17 +15,19 @@
timeStyle: "long",
dateStyle: "short",
});
let row_color = current ? "bg-green-300" : "even:bg-gray-100";
let normal_row_color = i % 2 == 0 ? "bg-white" : "bg-gray-100";
let row_color = current ? "bg-green-300" : normal_row_color;
let analysis_visible = $state(false);
</script>
<tr class="{row_color} border-b">
<tr class="{row_color}">
<th class="font-bold p-2 bg-blue-100" scope='row'>{entry.name}</th>
<td class="p-2">{date_formatter.format(entry.start_time)}</td>
<td class="p-2">{date_formatter.format(entry.last_message_time)}</td>
<td class="p-2">{entry.qmdl_size_bytes}</td>
<td class="p-2"><DownloadLink url={entry.getPcapUrl()} text="pcap" /></td>
<td class="p-2"><DownloadLink url={entry.getQmdlUrl()} text="qmdl" /></td>
<td class="p-2"><AnalysisStatus entry={entry} /></td>
<td class="p-2"><AnalysisStatus onclick={() => { analysis_visible = !analysis_visible; }} entry={entry} /></td>
{#if current}
<td class="p-2"></td>
{:else}
@@ -35,3 +39,9 @@
</td>
{/if}
</tr>
<tr class="{row_color} border-b {analysis_visible ? '' : 'collapse'}">
<td class="font-bold p-2 bg-blue-100"></td>
<td class="border-t border-dashed p-2" colspan="7">
<AnalysisView {entry} />
</td>
</tr>