mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
style: move maxConn and speed limit inputs to advanced settings accordion (#464)
This commit is contained in:
@@ -54,6 +54,7 @@ import { Switch } from "@/shadcn-bridge/heroui/switch";
|
|||||||
import { Alert } from "@/shadcn-bridge/heroui/alert";
|
import { Alert } from "@/shadcn-bridge/heroui/alert";
|
||||||
import { Progress } from "@/shadcn-bridge/heroui/progress";
|
import { Progress } from "@/shadcn-bridge/heroui/progress";
|
||||||
import { Checkbox } from "@/shadcn-bridge/heroui/checkbox";
|
import { Checkbox } from "@/shadcn-bridge/heroui/checkbox";
|
||||||
|
import { Accordion, AccordionItem } from "@/shadcn-bridge/heroui/accordion";
|
||||||
import {
|
import {
|
||||||
createForward,
|
createForward,
|
||||||
getForwardList,
|
getForwardList,
|
||||||
@@ -4729,6 +4730,25 @@ export default function ForwardPage() {
|
|||||||
</ModalHeader>
|
</ModalHeader>
|
||||||
<ModalBody>
|
<ModalBody>
|
||||||
<div className="space-y-4 pb-4">
|
<div className="space-y-4 pb-4">
|
||||||
|
<Input
|
||||||
|
errorMessage={errors.name}
|
||||||
|
isInvalid={!!errors.name}
|
||||||
|
label="规则名称"
|
||||||
|
placeholder="请输入规则名称"
|
||||||
|
value={form.name}
|
||||||
|
variant="bordered"
|
||||||
|
onChange={(e) =>
|
||||||
|
setForm((prev) => ({ ...prev, name: e.target.value }))
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Accordion variant="bordered">
|
||||||
|
<AccordionItem
|
||||||
|
key="advanced"
|
||||||
|
aria-label="高级设置"
|
||||||
|
title="高级设置"
|
||||||
|
>
|
||||||
|
<div className="space-y-4 pb-2">
|
||||||
<Input
|
<Input
|
||||||
label="最大连接数"
|
label="最大连接数"
|
||||||
placeholder="0 或空表示不限制"
|
placeholder="0 或空表示不限制"
|
||||||
@@ -4742,19 +4762,6 @@ export default function ForwardPage() {
|
|||||||
description="此设置优先于用户的全局连接数限制。0 表示不限制。"
|
description="此设置优先于用户的全局连接数限制。0 表示不限制。"
|
||||||
variant="bordered"
|
variant="bordered"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Input
|
|
||||||
errorMessage={errors.name}
|
|
||||||
isInvalid={!!errors.name}
|
|
||||||
label="规则名称"
|
|
||||||
placeholder="请输入规则名称"
|
|
||||||
value={form.name}
|
|
||||||
variant="bordered"
|
|
||||||
onChange={(e) =>
|
|
||||||
setForm((prev) => ({ ...prev, name: e.target.value }))
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
|
|
||||||
{isAdmin && (
|
{isAdmin && (
|
||||||
<Select
|
<Select
|
||||||
label="规则限速"
|
label="规则限速"
|
||||||
@@ -4786,6 +4793,9 @@ export default function ForwardPage() {
|
|||||||
))}
|
))}
|
||||||
</Select>
|
</Select>
|
||||||
)}
|
)}
|
||||||
|
</div>
|
||||||
|
</AccordionItem>
|
||||||
|
</Accordion>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
description={
|
description={
|
||||||
|
|||||||
Reference in New Issue
Block a user