mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-24 16:01:52 +08:00
fix(ui): use shellTool selector
This commit is contained in:
@@ -393,22 +393,31 @@ export default function MainConfigCard({
|
|||||||
}}
|
}}
|
||||||
className="w-full"
|
className="w-full"
|
||||||
>
|
>
|
||||||
<div className="relative bg-muted rounded-lg">
|
<FormField
|
||||||
<TabsList className="flex flex-wrap gap-1 w-full bg-transparent overflow-x-auto tabs-list">
|
control={form.control}
|
||||||
{shellTools.map((shellTool) => (
|
name="shellTool"
|
||||||
<TabsTrigger
|
render={({ field }) => (
|
||||||
key={shellTool}
|
<FormItem>
|
||||||
value={shellTool}
|
<Select onValueChange={field.onChange} defaultValue={field.value}>
|
||||||
className="flex-1 min-w-24 data-[state=active]:bg-background"
|
<FormControl>
|
||||||
>
|
<SelectTrigger>
|
||||||
<span className="flex items-center gap-2">
|
<SelectValue />
|
||||||
{shellToolIcons[shellTool]}
|
</SelectTrigger>
|
||||||
{shellTool}
|
</FormControl>
|
||||||
</span>
|
<SelectContent>
|
||||||
</TabsTrigger>
|
{shellTools.map((tool) => (
|
||||||
))}
|
<SelectItem key={tool} value={tool}>
|
||||||
</TabsList>
|
<span className="flex items-center gap-2">
|
||||||
</div>
|
{shellToolIcons[tool]}
|
||||||
|
{tool}
|
||||||
|
</span>
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
</FormItem>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
|
||||||
<GodzillaTabContent form={form} shellTypes={shellTypes} />
|
<GodzillaTabContent form={form} shellTypes={shellTypes} />
|
||||||
<CommandTabContent form={form} shellTypes={shellTypes} />
|
<CommandTabContent form={form} shellTypes={shellTypes} />
|
||||||
|
|||||||
@@ -160,6 +160,12 @@
|
|||||||
body {
|
body {
|
||||||
@apply bg-background text-foreground;
|
@apply bg-background text-foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
html, body {
|
||||||
|
overflow: hidden;
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tabs-list {
|
.tabs-list {
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ export default function MemShellPage() {
|
|||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="flex flex-col xl:flex-row gap-6"
|
className="flex flex-col xl:flex-row gap-6"
|
||||||
>
|
>
|
||||||
<div className="w-full xl:w-1/2 space-y-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-2">
|
||||||
<MainConfigCard
|
<MainConfigCard
|
||||||
servers={serverConfig}
|
servers={serverConfig}
|
||||||
mainConfig={mainConfig}
|
mainConfig={mainConfig}
|
||||||
@@ -145,7 +145,7 @@ export default function MemShellPage() {
|
|||||||
{t("memshell:buttons.generate")}
|
{t("memshell:buttons.generate")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full xl:w-1/2 space-y-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
||||||
<ShellResult
|
<ShellResult
|
||||||
packMethod={packMethod}
|
packMethod={packMethod}
|
||||||
generateResult={generateResult}
|
generateResult={generateResult}
|
||||||
|
|||||||
@@ -107,7 +107,7 @@ export default function ProbeShellGenerator() {
|
|||||||
onSubmit={form.handleSubmit(onSubmit)}
|
onSubmit={form.handleSubmit(onSubmit)}
|
||||||
className="flex flex-col xl:flex-row gap-6"
|
className="flex flex-col xl:flex-row gap-6"
|
||||||
>
|
>
|
||||||
<div className="w-full xl:w-1/2 space-y-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}>
|
||||||
@@ -119,7 +119,7 @@ export default function ProbeShellGenerator() {
|
|||||||
{t("probeshell:buttons.generate")}
|
{t("probeshell:buttons.generate")}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<div className="w-full xl:w-1/2 space-y-4">
|
<div className="w-full xl:w-1/2 flex flex-col gap-4">
|
||||||
<ShellResult
|
<ShellResult
|
||||||
packMethod={packMethod}
|
packMethod={packMethod}
|
||||||
generateResult={generateResult}
|
generateResult={generateResult}
|
||||||
|
|||||||
Reference in New Issue
Block a user