mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-06 12:13:49 +08:00
feat(ui): add traffic and tool detail drawers
This commit is contained in:
1 parent
fd2ddbc9d7
commit
af3149901e
6 files changed
+436
-271
No files matched your search
@@ -18,6 +18,7 @@ import {
|
||||
import { toast } from "sonner";
|
||||
import { api } from "@/lib/api";
|
||||
import { Markdown } from "@/components/markdown";
|
||||
import { Badge } from "@/components/ui/badge";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import type { Activity } from "@/lib/types";
|
||||
|
||||
@@ -208,7 +209,7 @@ function InterceptCard({
|
||||
}, [pendingId]);
|
||||
|
||||
async function decide(decision: "allowed" | "denied") {
|
||||
if (!pendingId || deciding) return;
|
||||
if (step.inherited || !pendingId || deciding) return;
|
||||
setDeciding(true);
|
||||
try {
|
||||
await api.interceptDecide(pendingId, decision);
|
||||
@@ -246,7 +247,9 @@ function InterceptCard({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{decided ? (
|
||||
{step.inherited ? (
|
||||
<Badge variant="outline">历史记录 · 只读</Badge>
|
||||
) : decided ? (
|
||||
<span className={
|
||||
"shrink-0 rounded px-2 py-0.5 text-[11px] font-medium " +
|
||||
(decided === "allowed"
|
||||
|
||||
Reference in new issue
Block a user