From 1fb2942246dba23086d3b94b44a1b72b1d4e8352 Mon Sep 17 00:00:00 2001 From: ReaJason Date: Sat, 13 Dec 2025 11:42:57 +0800 Subject: [PATCH] feat: add tooltip for paramName --- web/app/components/memshell/shell-result.tsx | 7 +++--- .../components/memshell/tabs/command-tab.tsx | 23 +++++++++++++++---- .../probeshell/main-config-card.tsx | 16 ++++++++++--- .../components/probeshell/shell-result.tsx | 4 ++-- web/app/i18n/common/en.json | 1 + web/app/i18n/common/zh-CN.json | 1 + web/app/routes/memshell.tsx | 2 +- web/app/routes/probeshell.tsx | 4 ++-- 8 files changed, 43 insertions(+), 15 deletions(-) diff --git a/web/app/components/memshell/shell-result.tsx b/web/app/components/memshell/shell-result.tsx index 918494c2..3c03f6e2 100644 --- a/web/app/components/memshell/shell-result.tsx +++ b/web/app/components/memshell/shell-result.tsx @@ -26,6 +26,7 @@ export default function ShellResult({ if (!generateResult) { return ; } + const height = 800; return ( @@ -37,7 +38,7 @@ export default function ShellResult({ {t("memshell:injectorClass")} - + } wrapLongLines={true} - height={600} + height={height} code={generateResult?.shellBytesBase64Str ?? ""} language="text" /> @@ -107,7 +108,7 @@ export default function ShellResult({ } - height={600} + height={height} code={generateResult?.injectorBytesBase64Str ?? ""} language="text" /> diff --git a/web/app/components/memshell/tabs/command-tab.tsx b/web/app/components/memshell/tabs/command-tab.tsx index 59b98aba..caf92d4e 100644 --- a/web/app/components/memshell/tabs/command-tab.tsx +++ b/web/app/components/memshell/tabs/command-tab.tsx @@ -1,5 +1,5 @@ import { useQuery } from "@tanstack/react-query"; -import { ChevronDown, ChevronRight } from "lucide-react"; +import { ChevronDown, ChevronRight, InfoIcon } from "lucide-react"; import { useState } from "react"; import { FormProvider, type UseFormReturn } from "react-hook-form"; import { useTranslation } from "react-i18next"; @@ -24,6 +24,11 @@ import { SelectValue, } from "@/components/ui/select"; import { TabsContent } from "@/components/ui/tabs"; +import { + Tooltip, + TooltipContent, + TooltipTrigger, +} from "@/components/ui/tooltip"; import { env } from "@/config"; import type { MemShellFormSchema } from "@/types/schema"; import { OptionalClassFormField } from "./classname-field"; @@ -64,9 +69,19 @@ export function CommandTabContent({ name="commandParamName" render={({ field }) => ( - - {t("common:paramName")} {t("common:optional")} - +
+ + {t("common:paramName")} {t("common:optional")} + + + + + + +

{t("common:paramName.description")}

+
+
+
( - - {t("common:paramName")} {t("common:optional")} - +
+ + {t("common:paramName")} {t("common:optional")} + + + + + + +

{t("common:paramName.description")}

+
+
+
diff --git a/web/app/components/probeshell/shell-result.tsx b/web/app/components/probeshell/shell-result.tsx index 077ad2e7..6531e3e5 100644 --- a/web/app/components/probeshell/shell-result.tsx +++ b/web/app/components/probeshell/shell-result.tsx @@ -22,7 +22,7 @@ export default function ShellResult({ return ; } const showCode = packMethod === "JSP"; - const height = 550; + const height = 600; return ( @@ -30,7 +30,7 @@ export default function ShellResult({ {t("common:generateResult")} - + {allPackResults && ( -
+
-
+
-
+