feat(ui): unified audit page with server filters and live tail
This commit is contained in:
1 parent
f8c3dbedf2
commit
2d2ca156d8
19 files changed
+1519
-424
No files matched your search
@@ -5,8 +5,12 @@ import { Button } from "@/components/ui/button";
|
||||
import { formatValue, type Change } from "@/lib/changes";
|
||||
|
||||
/** One row per changed leaf, each revertable on its own, so a reviewer keeps
|
||||
* the changes they want and drops the rest before saving. */
|
||||
defineProps<{ changes: Change[]; label?: (path: string) => string }>();
|
||||
* the changes they want and drops the rest before saving. A read-only diff
|
||||
* passes `revertable: false`. */
|
||||
withDefaults(
|
||||
defineProps<{ changes: Change[]; label?: (path: string) => string; revertable?: boolean }>(),
|
||||
{ revertable: true },
|
||||
);
|
||||
defineEmits<{ revert: [change: Change] }>();
|
||||
</script>
|
||||
|
||||
@@ -18,7 +22,7 @@ defineEmits<{ revert: [change: Change] }>();
|
||||
<p class="whitespace-pre-wrap break-words text-danger"><span class="font-sans">Before: </span>{{ formatValue(change.before) }}</p>
|
||||
<p class="whitespace-pre-wrap break-words text-ok"><span class="font-sans">After: </span>{{ formatValue(change.after) }}</p>
|
||||
</div>
|
||||
<Button variant="ghost" size="icon-sm" :aria-label="`Revert ${label ? label(change.path) : change.path}`" title="Revert" @click="$emit('revert', change)">
|
||||
<Button v-if="revertable" variant="ghost" size="icon-sm" :aria-label="`Revert ${label ? label(change.path) : change.path}`" title="Revert" @click="$emit('revert', change)">
|
||||
<Undo2 />
|
||||
</Button>
|
||||
</li>
|
||||
|
||||
Reference in new issue
Block a user