mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-23 15:31:53 +08:00
1. 将枚举 Server 改为字符串常量,使得 memshell 和 probeshell 都能共用 2. 移除 memshell 模块直接内置在 generator 中 3. 通用类从 memshell 移动至 javaweb 下,命名修改,增加辨识度
28 lines
747 B
TypeScript
28 lines
747 B
TypeScript
import {useTranslation} from "react-i18next";
|
|
import {Button} from "@/components/ui/button";
|
|
import {downloadBytes} from "@/lib/utils";
|
|
import type {MemShellResult} from "@/types/memshell";
|
|
|
|
export function JarResult({
|
|
packResult,
|
|
generateResult,
|
|
}: Readonly<{ packResult: string; generateResult?: MemShellResult }>) {
|
|
const { t } = useTranslation();
|
|
return (
|
|
<div className="flex items-center justify-center">
|
|
<Button
|
|
type="button"
|
|
onClick={() =>
|
|
downloadBytes(
|
|
packResult,
|
|
undefined,
|
|
`${generateResult?.shellConfig.server}${generateResult?.shellConfig.shellTool}MemShell`,
|
|
)
|
|
}
|
|
>
|
|
{t("download")} Jar
|
|
</Button>
|
|
</div>
|
|
);
|
|
}
|