From 302e8fbb8f327f14835dd31e15f7f9b34dd2ee91 Mon Sep 17 00:00:00 2001 From: ReaJason Date: Mon, 12 Jan 2026 18:19:12 +0800 Subject: [PATCH] refactor(ui): change serverVersion field localtion --- .../memshell/results/basic-info.tsx | 4 +- .../components/memshell/tabs/antsword-tab.tsx | 6 +- .../components/memshell/tabs/behinder-tab.tsx | 6 +- .../components/memshell/tabs/command-tab.tsx | 6 +- .../components/memshell/tabs/custom-tab.tsx | 51 +++--- .../components/memshell/tabs/godzilla-tab.tsx | 6 +- .../components/memshell/tabs/neoreg-tab.tsx | 6 +- .../memshell/tabs/shelltype-field.tsx | 154 ++++++++++++++---- web/app/components/memshell/tabs/suo5-tab.tsx | 6 +- .../memshell/tabs/urlpattern-field.tsx | 29 ---- web/app/lib/utils.ts | 2 +- 11 files changed, 154 insertions(+), 122 deletions(-) delete mode 100644 web/app/components/memshell/tabs/urlpattern-field.tsx 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" + /> +
) : (