refactor(ui): build settings, org, task, workflow and dashboard pages from the shared components

This commit is contained in:
sam committed 2026-10-24 12:34:29 +11:00
1 parent 5fdd968fca
commit 0a8465e687
77 files changed
+505 -744

No files matched your search

+4 -10
View File
@@ -10,7 +10,7 @@ import {
CardTitle,
} from "@/components/ui/card";
import { Badge } from "@/components/ui/badge";
import { ago } from "@/lib/format";
import { Timestamp } from "@/components/ui/timestamp";
import { captureSignature } from "./capture-signature";
import CapturePayload from "./CapturePayload.vue";
import DispatchLinks from "@/bindings/DispatchLinks.vue";
@@ -54,13 +54,7 @@ const signature = computed(() =>
const meta = computed(() => {
const capture = selected.value;
if (!capture) return "";
return [
ago(capture.received_at),
capture.content_type || "no content type",
capture.remote_addr,
]
.filter(Boolean)
.join(" · ");
return [capture.content_type || "no content type", capture.remote_addr].filter(Boolean).join(" · ");
});
watch(selected, () => {
@@ -79,7 +73,7 @@ watch(selected, () => {
signature.label
}}</Badge>
</CardTitle>
<CardDescription>{{ meta }}</CardDescription>
<CardDescription><Timestamp :at="selected.received_at" /> · {{ meta }}</CardDescription>
</CardHeader>
<!-- Stacked there is no sibling to be bound by, so the panel caps itself
the way the task log does rather than letting one large payload
@@ -92,7 +86,7 @@ watch(selected, () => {
<CapturePayload label="Payload" :raw="selected.body" />
<CapturePayload label="Headers" :raw="selected.headers" />
<section class="flex flex-col gap-2">
<h3 class="text-sm font-medium">Dispatches</h3>
<h3 class="text-caption font-medium tracking-[0.06em] text-fg-subtle uppercase">Dispatches</h3>
<DispatchLinks kind="captures" :id="selected.id" />
</section>
</div>
+1 -1
View File
@@ -16,7 +16,7 @@ const text = computed(() => prettyPrint(props.raw));
<template>
<section class="min-w-0">
<h3
class="mb-2 text-xs font-semibold tracking-[0.05em] text-fg-subtle uppercase"
class="mb-2 text-caption font-medium tracking-[0.06em] text-fg-subtle uppercase"
>
{{ label }}
</h3>
+2 -4
View File
@@ -4,7 +4,7 @@ import { computed } from "vue";
import { Badge } from "@/components/ui/badge";
import { TableCell, TableRow } from "@/components/ui/table";
import { ago } from "@/lib/format";
import { Timestamp } from "@/components/ui/timestamp";
import { eventTypes } from "./event-type-state";
import { captureIdentity } from "./event-types";
import { captureSignature } from "./capture-signature";
@@ -52,9 +52,7 @@ function open(): void {
<TableCell class="font-mono">{{
props.capture.source || "(unknown)"
}}</TableCell>
<TableCell :title="props.capture.received_at || ''">{{
ago(props.capture.received_at)
}}</TableCell>
<TableCell><Timestamp :at="props.capture.received_at" /></TableCell>
<!-- An unidentified capture is never dispatched. -->
<TableCell>
<div class="flex items-center gap-1">
+4 -15
View File
@@ -1,11 +1,5 @@
<script setup lang="ts">
import {
Card,
CardContent,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Section } from "@/components/ui/section";
import CapturesList from "./CapturesList.vue";
/** The captured events panel, with the note that qualifies everything inside
@@ -17,12 +11,7 @@ import CapturesList from "./CapturesList.vue";
</script>
<template>
<Card>
<CardHeader>
<CardTitle>Recent captures</CardTitle>
</CardHeader>
<CardContent>
<CapturesList />
</CardContent>
</Card>
<Section title="Recent captures" class="mb-0">
<CapturesList />
</Section>
</template>
+10 -19
View File
@@ -24,13 +24,7 @@ import {
EmptyHeader,
EmptyTitle,
} from "@/components/ui/empty";
import {
Card,
CardAction,
CardContent,
CardHeader,
CardTitle,
} from "@/components/ui/card";
import { Section } from "@/components/ui/section";
import {
Table,
TableBody,
@@ -65,16 +59,13 @@ function fieldCount(schema: Record<string, string> | null | undefined): number {
</script>
<template>
<Card v-if="eventTypesEnabled">
<CardHeader>
<CardTitle>Event types</CardTitle>
<CardAction>
<Button variant="outline" size="sm" @click="pasteExample()"
><ClipboardPaste />From payload</Button
>
</CardAction>
</CardHeader>
<CardContent class="flex flex-col gap-6">
<Section v-if="eventTypesEnabled" title="Event types" class="mb-0">
<template #action>
<Button variant="outline" size="sm" @click="pasteExample()"
><ClipboardPaste />From payload</Button
>
</template>
<div class="flex flex-col gap-6">
<Alert v-if="eventTypesError" variant="destructive">
<TriangleAlert />
<AlertTitle>Event types</AlertTitle>
@@ -167,8 +158,8 @@ function fieldCount(schema: Record<string, string> | null | undefined): number {
<EmptyTitle>No event types yet</EmptyTitle>
</EmptyHeader>
</Empty>
</CardContent>
</Card>
</div>
</Section>
<EventTypeDialog />
<AlertDialog
:open="pendingDelete !== null"