mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-12-01 03:21:51 +08:00
修复
1、修复流量包里的复制按钮不工作问题 2、修复新建任务关联资产不同步到任务测试范围问题
This commit is contained in:
1 parent
3675bd815c
commit
cf0989c67d
10 files changed
+297
-32
No files matched your search
@@ -39,7 +39,7 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
||||
import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { api } from "@/lib/api";
|
||||
import type { TrafficDetail, TrafficExchange, TrafficHost, TrafficResp } from "@/lib/types";
|
||||
import { cn } from "@/lib/utils";
|
||||
import { cn, copyText } from "@/lib/utils";
|
||||
|
||||
function fmtTime(ts: string) {
|
||||
return new Date(ts).toLocaleString("zh-CN", {
|
||||
@@ -199,12 +199,12 @@ function HttpCodeBlock({ raw }: { raw: string }) {
|
||||
}, [copied]);
|
||||
|
||||
const copyPacket = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(value);
|
||||
const ok = await copyText(value);
|
||||
if (ok) {
|
||||
setCopied(true);
|
||||
} catch {
|
||||
toast.error("复制失败,请使用 Ctrl/Cmd+A 后复制");
|
||||
return;
|
||||
}
|
||||
toast.error("复制失败,请使用 Ctrl/Cmd+A 后复制");
|
||||
};
|
||||
|
||||
const renderLine = (line: string, index: number) => {
|
||||
|
||||
Reference in new issue
Block a user