diff --git a/web/app/components/memshell/results/basic-info.tsx b/web/app/components/memshell/results/basic-info.tsx index 09661c2d..7ed9180b 100644 --- a/web/app/components/memshell/results/basic-info.tsx +++ b/web/app/components/memshell/results/basic-info.tsx @@ -2,7 +2,7 @@ import { FileTextIcon } from "lucide-react"; import { useTranslation } from "react-i18next"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; import { Separator } from "@/components/ui/separator"; -import { shouldHidden } from "@/lib/utils"; +import { notNeedUrlPattern } from "@/lib/utils"; import { type AntSwordShellToolConfig, type BehinderShellToolConfig, @@ -45,7 +45,7 @@ export function BasicInfo({ label={t("mainConfig.shellMountType")} text={generateResult?.shellConfig.shellType} /> - {!shouldHidden(generateResult?.shellConfig?.shellType) && ( + {!notNeedUrlPattern(generateResult?.shellConfig?.shellType) && ( -
- - -
+ -
- - -
+ -
- - -
+ -
- - -
+ ( - + {t("shellClass")} -
+
-
+
{isFile ? ( - { - const file = e.target.files?.[0]; - if (file) { - const reader = new FileReader(); - reader.onload = (event) => { - const base64String = - (event.target?.result as string)?.split(",")[1] || - ""; - field.onChange(base64String); - }; - reader.readAsDataURL(file); - } - }} - accept=".class" - placeholder={t("common:placeholders.input")} - type="file" - /> +
+ { + const file = e.target.files?.[0]; + if (file) { + const reader = new FileReader(); + reader.onload = (event) => { + const base64String = + (event.target?.result as string)?.split( + ",", + )[1] || ""; + field.onChange(base64String); + }; + reader.readAsDataURL(file); + } + }} + accept=".class" + placeholder={t("common:placeholders.input")} + type="file" + /> +
) : (