* fix(ui/topbar): replace Jump to with a command palette, drop filler chrome Jump to opens a shadcn-vue Command dialog that finds pages, tasks and workflows by name. The connection indicator shows only when the stream is lost, the dead documentation link is gone, and the profile menu label has no stray whitespace. * fix(ui): trim stray whitespace from template text and drop em dashes from copy Element text that started or ended with a line break rendered with leading and trailing spaces. Also removes the unused 'soon' nav state and the nav group components no route reaches. * fix(ui): drop the space a hidden spinner left before button text * fix(ui/status): one dense Status page, full-width settings, problems-only apply status Status drops its tabs and the duplicate health card; services list only what is wrong. Settings pages use the full width, the resizable sidebar handle is gone, and apply status shows only processes that have not applied a change. PageHeader puts the title and actions on one line. * refactor(ui): use shadcn ToggleGroup and Badge, drop SegmentedControl and StatusPill Status badges show only when a state needs attention: no Running, Enabled, Active, Listening or live pills next to healthy rows. Removes the unused pagination, radio-group and scroll-area components. * fix(ui/history): use the shadcn Table with fixed columns so nothing is clipped * fix(ui/workflows): apply ?workflow= only once the workflow is listed Selecting it before the definitions loaded opened an empty canvas. * refactor(ui/workflows): use shadcn Input, NativeSelect, Checkbox and Button in editors Replaces hand-rolled inputs, selects, the repository mode switch and icon buttons in the workflow editor, bind dialog, harness page, sources panel and review gate. Adds the upstream shadcn-vue NativeSelect. * style(ui): rounded-rectangle controls instead of pills Halves the radius scale so inputs, selects and buttons stop reading as pills, and badges and chips lose their full rounding. * fix(ui/alerts): centre the bell's failed state and stop it contradicting Needs you * fix(ui/tasks): one header line, aligned columns, no placeholder issue numbers Tasks puts its filters beside the title and drops the stat tiles the dashboard already shows. Sort headers align with their cells, chat tasks no longer show their synthetic issue number, and Logs and the task not-found page use the shared header. * fix(ui/dashboard): shared header and cards, empty cards stay silent Needs you uses the shadcn Card and drops its duplicate Open button; quality gates and token outlook render only when there is something to show; the throughput strip moves into the dashboard, its only user. * refactor(ui/stores): one Pinia store per feature Splits the site-wide control-plane store and the module-level refs into settings, workflows, tasks, events, org and session stores. Identity requests move into lib/api. Drops store fields nothing read: per-resource stream state, the states map and loadApplyStatus. * fix(ui/org): one header for the org area, sections drop their repeated titles The org name is the page title with the admin's org switcher and New org beside it; Members and Workspaces tables sit in cards like other pages. * fix(ui/events): shadcn Tabs for the capture, map and bind steps Replaces the numbered step strip with line tabs that carry each step's count; the Listening pill is gone and Capture off shows only when it is. * fix(ui/workflows): confirm a workflow delete in an AlertDialog, not window.confirm * style(ui/settings): denser setting rows
104 lines
2.9 KiB
Vue
104 lines
2.9 KiB
Vue
<script setup lang="ts">
|
|
import { Alert, AlertDescription } from "@/components/ui/alert";
|
|
import { Button } from "@/components/ui/button";
|
|
import {
|
|
Card,
|
|
CardContent,
|
|
CardFooter,
|
|
CardHeader,
|
|
CardTitle,
|
|
} from "@/components/ui/card";
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogFooter,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
} from "@/components/ui/dialog";
|
|
import { Spinner } from "@/components/ui/spinner";
|
|
import MappingActionError from "./MappingActionError.vue";
|
|
import MappingFieldsTable from "./MappingFieldsTable.vue";
|
|
import MappingForm from "./MappingForm.vue";
|
|
import PayloadTree from "./PayloadTree.vue";
|
|
import {
|
|
actionError,
|
|
addField,
|
|
closeEditor,
|
|
draft,
|
|
editorOpen,
|
|
runPreview,
|
|
saveMapping,
|
|
saving,
|
|
} from "./state";
|
|
|
|
/**
|
|
* One editing session, in an overlay: the mapping's own fields, the fields
|
|
* bound to payload paths, and the example event they were bound from.
|
|
*
|
|
* The payload panel is the editor's primary control rather than a preview of
|
|
* one: a field is bound by clicking a value that really is in a captured event,
|
|
* so no JSON path is ever typed by hand.
|
|
*/
|
|
function onOpenChange(open: boolean) {
|
|
if (!open) closeEditor();
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<Dialog :open="editorOpen" @update:open="onOpenChange">
|
|
<DialogContent class="max-h-[85vh] overflow-y-auto sm:max-w-3xl">
|
|
<DialogHeader>
|
|
<DialogTitle>{{
|
|
draft.id === null ? "New mapping" : "Edit mapping"
|
|
}}</DialogTitle>
|
|
</DialogHeader>
|
|
|
|
<Card>
|
|
<CardContent>
|
|
<MappingForm />
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>Bound fields</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<MappingFieldsTable />
|
|
</CardContent>
|
|
<CardFooter>
|
|
<Button variant="outline" @click="runPreview">Preview</Button>
|
|
</CardFooter>
|
|
</Card>
|
|
|
|
<Card>
|
|
<CardHeader>
|
|
<CardTitle>Payload</CardTitle>
|
|
</CardHeader>
|
|
<CardContent>
|
|
<Alert v-if="draft.payloadError" variant="destructive">
|
|
<AlertDescription>{{ draft.payloadError }}</AlertDescription>
|
|
</Alert>
|
|
<PayloadTree
|
|
v-else-if="draft.payload !== null"
|
|
:value="draft.payload"
|
|
@pick="addField"
|
|
/>
|
|
<p v-else class="text-sm text-fg-muted">No event selected.</p>
|
|
</CardContent>
|
|
</Card>
|
|
|
|
<!-- Beside the buttons, not at the top: the dialog scrolls, and Save is
|
|
clicked at the bottom, where a refusal must be seen. -->
|
|
<MappingActionError v-if="actionError" :failure="actionError" />
|
|
|
|
<DialogFooter>
|
|
<Button variant="outline" @click="closeEditor">Cancel</Button>
|
|
<Button :disabled="saving" @click="saveMapping">
|
|
<Spinner v-if="saving" data-icon="inline-start" />{{ saving ? "Saving..." : "Save" }}
|
|
</Button>
|
|
</DialogFooter>
|
|
</DialogContent>
|
|
</Dialog>
|
|
</template>
|