mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-06 13:01:51 +08:00
fix: polish credential traffic cards and support copying over HTTP
This commit is contained in:
1 parent
851e3f99ed
commit
123b9dcd61
3 files changed
+130
-49
No files matched your search
@@ -23,6 +23,7 @@ import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { api } from "@/lib/api";
|
||||
import { statusMeta } from "@/lib/status";
|
||||
import type { IntelligenceKind, IntelligencePage, TaskIntelligence } from "@/lib/types";
|
||||
import { copyText } from "@/lib/utils";
|
||||
|
||||
const KINDS: { value: IntelligenceKind; label: string }[] = [
|
||||
{ value: "credential", label: "凭据" },
|
||||
@@ -397,12 +398,8 @@ export function IntelligencePanel({
|
||||
size="sm"
|
||||
variant="ghost"
|
||||
onClick={async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(selected.content);
|
||||
toast.success("已复制");
|
||||
} catch {
|
||||
toast.error("复制失败,请手动选择内容复制");
|
||||
}
|
||||
if (await copyText(selected.content)) toast.success("已复制");
|
||||
else toast.error("复制失败,请手动选择内容复制");
|
||||
}}
|
||||
>
|
||||
<CopyIcon data-icon="inline-start" />
|
||||
|
||||
Reference in new issue
Block a user