mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-21 22:50:42 +08:00
style: lint code
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
"!**/.turbo",
|
"!**/.turbo",
|
||||||
"!**/.source",
|
"!**/.source",
|
||||||
"!**/convex/_generated",
|
"!**/convex/_generated",
|
||||||
"!**/components/ui/**"
|
"!**/components/ui"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"formatter": {
|
"formatter": {
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import {
|
|||||||
SelectValue,
|
SelectValue,
|
||||||
} from "@/components/ui/select.tsx";
|
} from "@/components/ui/select.tsx";
|
||||||
import { Switch } from "@/components/ui/switch.tsx";
|
import { Switch } from "@/components/ui/switch.tsx";
|
||||||
import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";
|
import { Tabs } from "@/components/ui/tabs";
|
||||||
import {
|
import {
|
||||||
type MainConfig,
|
type MainConfig,
|
||||||
type ServerConfig,
|
type ServerConfig,
|
||||||
@@ -133,7 +133,7 @@ export default function MainConfigCard({
|
|||||||
// 特殊环境的 JDK 版本
|
// 特殊环境的 JDK 版本
|
||||||
if (
|
if (
|
||||||
(value === "SpringWebFlux" || value === "XXLJOB") &&
|
(value === "SpringWebFlux" || value === "XXLJOB") &&
|
||||||
Number.parseInt(form.getValues("targetJdkVersion") as string) < 52
|
Number.parseInt(form.getValues("targetJdkVersion") as string, 10) < 52
|
||||||
) {
|
) {
|
||||||
form.setValue("targetJdkVersion", "52");
|
form.setValue("targetJdkVersion", "52");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ function safeParseYup<T>(schema: yup.ObjectSchema<any>, data: unknown) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const createEnv = () => {
|
const createEnv = () => {
|
||||||
// @ts-ignore
|
// @ts-expect-error
|
||||||
const envVars = Object.entries(import.meta.env).reduce<
|
const envVars = Object.entries(import.meta.env).reduce<
|
||||||
Record<string, string>
|
Record<string, string>
|
||||||
>((acc, curr) => {
|
>((acc, curr) => {
|
||||||
|
|||||||
@@ -34,4 +34,4 @@
|
|||||||
"usage": "Usage",
|
"usage": "Usage",
|
||||||
"version.updateAvailable": "Update Available",
|
"version.updateAvailable": "Update Available",
|
||||||
"version.updateAvailableTooltip": "Click to Open Github Release Page ( v{{currentVersion}} -> v{{latestVersion}})"
|
"version.updateAvailableTooltip": "Click to Open Github Release Page ( v{{currentVersion}} -> v{{latestVersion}})"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,4 +34,4 @@
|
|||||||
"usage": "使用指南",
|
"usage": "使用指南",
|
||||||
"version.updateAvailable": "有可用升级",
|
"version.updateAvailable": "有可用升级",
|
||||||
"version.updateAvailableTooltip": "点击前往 GitHub Release ( v{{currentVersion}} -> v{{latestVersion}})"
|
"version.updateAvailableTooltip": "点击前往 GitHub Release ( v{{currentVersion}} -> v{{latestVersion}})"
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -161,7 +161,8 @@
|
|||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html,
|
||||||
|
body {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|||||||
@@ -136,7 +136,11 @@ export default function MemShellPage() {
|
|||||||
form={form}
|
form={form}
|
||||||
/>
|
/>
|
||||||
<PackageConfigCard packerConfig={packerConfig} form={form} />
|
<PackageConfigCard packerConfig={packerConfig} form={form} />
|
||||||
<Button className="w-full" type="submit" disabled={isActionPending}>
|
<Button
|
||||||
|
className="w-full"
|
||||||
|
type="submit"
|
||||||
|
disabled={isActionPending}
|
||||||
|
>
|
||||||
{isActionPending ? (
|
{isActionPending ? (
|
||||||
<LoaderCircle className="animate-spin" />
|
<LoaderCircle className="animate-spin" />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -110,7 +110,11 @@ export default function ProbeShellGenerator() {
|
|||||||
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
||||||
<MainConfigCard form={form} servers={serverConfig} />
|
<MainConfigCard form={form} servers={serverConfig} />
|
||||||
<PackageConfigCard form={form} packerConfig={packerConfig} />
|
<PackageConfigCard form={form} packerConfig={packerConfig} />
|
||||||
<Button className="w-full" type="submit" disabled={isActionPending}>
|
<Button
|
||||||
|
className="w-full"
|
||||||
|
type="submit"
|
||||||
|
disabled={isActionPending}
|
||||||
|
>
|
||||||
{isActionPending ? (
|
{isActionPending ? (
|
||||||
<LoaderCircle className="animate-spin" />
|
<LoaderCircle className="animate-spin" />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
+31
-33
@@ -1,9 +1,9 @@
|
|||||||
import { createHashRouter } from "react-router-dom";
|
import { createHashRouter } from "react-router-dom";
|
||||||
import RootLayout from "@/components/layouts/root-layout";
|
import RootLayout from "@/components/layouts/root-layout";
|
||||||
|
import AboutPage from "@/pages/about";
|
||||||
import MemShellPage from "@/pages/memshell";
|
import MemShellPage from "@/pages/memshell";
|
||||||
import ProbeShellPage from "@/pages/probeshell";
|
import ProbeShellPage from "@/pages/probeshell";
|
||||||
import type { MemShellFormSchema } from "@/types/schema";
|
import type { MemShellFormSchema } from "@/types/schema";
|
||||||
import AboutPage from "@/pages/about";
|
|
||||||
|
|
||||||
// Function to parse URL parameters into form default values
|
// Function to parse URL parameters into form default values
|
||||||
const parseUrlParams = (
|
const parseUrlParams = (
|
||||||
@@ -63,37 +63,35 @@ const parseUrlParams = (
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const router = createHashRouter(
|
export const router = createHashRouter([
|
||||||
[
|
{
|
||||||
{
|
path: "/",
|
||||||
path: "/",
|
element: <RootLayout />,
|
||||||
element: <RootLayout />,
|
children: [
|
||||||
children: [
|
{
|
||||||
{
|
index: true,
|
||||||
index: true,
|
element: <MemShellPage />,
|
||||||
element: <MemShellPage />,
|
loader: ({ request }) => {
|
||||||
loader: ({ request }) => {
|
const url = new URL(request.url);
|
||||||
const url = new URL(request.url);
|
return parseUrlParams(url.searchParams);
|
||||||
return parseUrlParams(url.searchParams);
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
path: "memshell",
|
{
|
||||||
element: <MemShellPage />,
|
path: "memshell",
|
||||||
loader: ({ request }) => {
|
element: <MemShellPage />,
|
||||||
const url = new URL(request.url);
|
loader: ({ request }) => {
|
||||||
return parseUrlParams(url.searchParams);
|
const url = new URL(request.url);
|
||||||
},
|
return parseUrlParams(url.searchParams);
|
||||||
},
|
},
|
||||||
{
|
},
|
||||||
path: "probeshell",
|
{
|
||||||
element: <ProbeShellPage />,
|
path: "probeshell",
|
||||||
},
|
element: <ProbeShellPage />,
|
||||||
{
|
},
|
||||||
path: "about",
|
{
|
||||||
element: <AboutPage />,
|
path: "about",
|
||||||
},
|
element: <AboutPage />,
|
||||||
],
|
},
|
||||||
},
|
],
|
||||||
]
|
},
|
||||||
);
|
]);
|
||||||
|
|||||||
+1
-1
@@ -1,8 +1,8 @@
|
|||||||
import path from "node:path";
|
import path from "node:path";
|
||||||
|
import { env } from "node:process";
|
||||||
import tailwindcss from "@tailwindcss/vite";
|
import tailwindcss from "@tailwindcss/vite";
|
||||||
import react from "@vitejs/plugin-react";
|
import react from "@vitejs/plugin-react";
|
||||||
import { defineConfig } from "vite";
|
import { defineConfig } from "vite";
|
||||||
import { env } from "node:process";
|
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
|||||||
Reference in New Issue
Block a user