feat: support suo5 v2 shell

This commit is contained in:
ReaJason
2025-12-10 02:09:13 +08:00
parent 9bfa58cbd4
commit c71a6c5a79
31 changed files with 11821 additions and 34 deletions
@@ -53,6 +53,7 @@ const shellToolIcons: Record<ShellToolType, JSX.Element> = {
[ShellToolType.Command]: <CommandIcon className="h-4 w-4" />,
[ShellToolType.AntSword]: <SwordIcon className="h-4 w-4" />,
[ShellToolType.Suo5]: <WaypointsIcon className="h-4 w-4" />,
[ShellToolType.Suo5v2]: <WaypointsIcon className="h-4 w-4" />,
[ShellToolType.NeoreGeorg]: <NetworkIcon className="h-4 w-4" />,
[ShellToolType.Custom]: <ZapIcon className="h-4 w-4" />,
};
@@ -467,7 +468,8 @@ export default function MainConfigCard({
<CommandTabContent form={form} shellTypes={shellTypes} />
<BehinderTabContent form={form} shellTypes={shellTypes} />
<AntSwordTabContent form={form} shellTypes={shellTypes} />
<Suo5TabContent form={form} shellTypes={shellTypes} />
<Suo5TabContent tabValue="Suo5" form={form} shellTypes={shellTypes} />
<Suo5TabContent tabValue="Suo5v2" form={form} shellTypes={shellTypes} />
<NeoRegTabContent form={form} shellTypes={shellTypes} />
<CustomTabContent form={form} shellTypes={shellTypes} />
</Tabs>
@@ -133,7 +133,8 @@ export function BasicInfo({
}
/>
)}
{generateResult?.shellConfig.shellTool === ShellToolType.Suo5 && (
{(generateResult?.shellConfig.shellTool === ShellToolType.Suo5 ||
generateResult?.shellConfig.shellTool === ShellToolType.Suo5v2) && (
<CopyableField
label={t("shellToolConfig.suo5Header")}
text={`${(generateResult?.shellToolConfig as Suo5ShellToolConfig).headerName}: ${(generateResult?.shellToolConfig as Suo5ShellToolConfig).headerValue}`}
@@ -12,14 +12,16 @@ import { UrlPatternFormField } from "./urlpattern-field";
export function Suo5TabContent({
form,
shellTypes,
tabValue,
}: Readonly<{
form: UseFormReturn<MemShellFormSchema>;
shellTypes: Array<string>;
tabValue: string;
}>) {
const { t } = useTranslation(["memshell", "common"]);
return (
<FormProvider {...form}>
<TabsContent value="Suo5">
<TabsContent value={tabValue}>
<Card>
<CardContent className="space-y-2 mt-4">
<div className="grid grid-cols-1 md:grid-cols-2 gap-2">
+1
View File
@@ -132,6 +132,7 @@ export enum ShellToolType {
Command = "Command",
AntSword = "AntSword",
Suo5 = "Suo5",
Suo5v2 = "Suo5v2",
NeoreGeorg = "NeoreGeorg",
Custom = "Custom",
}