mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-05 03:53:49 +08:00
fix: 将报告调整对话改为弹窗
This commit is contained in:
1 parent
53840faf7f
commit
8828d01eae
2 files changed
+9
-2
No files matched your search
@@ -423,6 +423,7 @@ function FindingDetailInner() {
|
||||
agentKey="reporter"
|
||||
agentLabel="报告撰写 Agent"
|
||||
promptPlaceholder="描述要如何调整漏洞报告…"
|
||||
modal
|
||||
open={reportChatOpen}
|
||||
onOpenChange={setReportChatOpen}
|
||||
/>
|
||||
|
||||
@@ -25,6 +25,7 @@ export function FindingAutoChat({
|
||||
agentKey = "auto",
|
||||
agentLabel = "Auto Agent",
|
||||
promptPlaceholder = "询问这个漏洞…",
|
||||
modal = false,
|
||||
open,
|
||||
onOpenChange,
|
||||
}: {
|
||||
@@ -33,6 +34,7 @@ export function FindingAutoChat({
|
||||
agentKey?: string;
|
||||
agentLabel?: string;
|
||||
promptPlaceholder?: string;
|
||||
modal?: boolean;
|
||||
open: boolean;
|
||||
onOpenChange: (open: boolean) => void;
|
||||
}) {
|
||||
@@ -209,8 +211,12 @@ export function FindingAutoChat({
|
||||
if (!open) return null;
|
||||
|
||||
return (
|
||||
<div className="pointer-events-none fixed inset-x-0 top-20 z-40 flex justify-end px-4 pb-4 sm:px-6">
|
||||
<section className="pointer-events-auto flex min-w-0 h-[calc(100svh-6rem)] w-[min(520px,calc(100vw-2rem))] flex-col overflow-hidden rounded-xl border bg-background shadow-2xl">
|
||||
<div className={modal
|
||||
? "pointer-events-none fixed inset-0 z-50 flex items-center justify-center bg-black/35 p-4"
|
||||
: "pointer-events-none fixed inset-x-0 top-20 z-40 flex justify-end px-4 pb-4 sm:px-6"}>
|
||||
<section className={modal
|
||||
? "pointer-events-auto flex min-w-0 h-[min(760px,calc(100svh-2rem))] w-[min(760px,calc(100vw-2rem))] flex-col overflow-hidden rounded-xl border bg-background shadow-2xl"
|
||||
: "pointer-events-auto flex min-w-0 h-[calc(100svh-6rem)] w-[min(520px,calc(100vw-2rem))] flex-col overflow-hidden rounded-xl border bg-background shadow-2xl"}>
|
||||
<header className="flex items-center gap-2 border-b p-3">
|
||||
<BotIcon className="size-4 text-primary" />
|
||||
<div className="min-w-0 flex-1">
|
||||
|
||||
Reference in new issue
Block a user