mirror of
https://github.com/JetSprow/J-Board-Lite.git
synced 2026-05-01 01:14:10 +05:30
polish: refine admin ui controls
This commit is contained in:
@@ -43,7 +43,7 @@ export function ProxyNodeFields({
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("nodeId")}>节点</Label>
|
||||
<Select
|
||||
value={nodeId}
|
||||
@@ -71,7 +71,7 @@ export function ProxyNodeFields({
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label id={fieldId("inboundIds-label")}>可售入站(可多选)</Label>
|
||||
<input type="hidden" name="inboundIds" value={selectedInboundIds.join(",")} />
|
||||
<div className="grid gap-2 sm:grid-cols-2" role="group" aria-labelledby={fieldId("inboundIds-label")}>
|
||||
@@ -82,17 +82,17 @@ export function ProxyNodeFields({
|
||||
key={inbound.id}
|
||||
type="button"
|
||||
className={cn(
|
||||
"choice-card text-left px-3 py-2.5 text-sm",
|
||||
"choice-card flex min-h-8 items-center justify-between gap-2 px-2.5 py-1.5 text-left text-xs leading-4",
|
||||
selected
|
||||
? "border-primary/30 bg-primary/10 text-primary"
|
||||
: "hover:bg-muted/45",
|
||||
)}
|
||||
onClick={() => toggleInbound(inbound.id)}
|
||||
>
|
||||
<p className="font-medium">
|
||||
<span className="shrink-0 font-medium leading-4">
|
||||
{inbound.protocol} · {inbound.port}
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">{inbound.tag}</p>
|
||||
</span>
|
||||
<span className="min-w-0 truncate text-[11px] leading-4 text-muted-foreground">{inbound.tag}</span>
|
||||
</button>
|
||||
);
|
||||
})}
|
||||
@@ -123,7 +123,7 @@ export function ProxyPricingFields({
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("pricingMode")}>售卖方式</Label>
|
||||
<Select value={pricingMode} onValueChange={(value) => setPricingMode(value as PlanPricingMode)}>
|
||||
<SelectTrigger id={fieldId("pricingMode")}>
|
||||
@@ -139,8 +139,8 @@ export function ProxyPricingFields({
|
||||
</div>
|
||||
|
||||
{pricingMode === "TRAFFIC_SLIDER" ? (
|
||||
<div className="grid gap-4 sm:grid-cols-3">
|
||||
<div>
|
||||
<div className="grid gap-3 sm:grid-cols-3">
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("pricePerGb")}>价格(¥/GB)</Label>
|
||||
<Input
|
||||
id={fieldId("pricePerGb")}
|
||||
@@ -151,7 +151,7 @@ export function ProxyPricingFields({
|
||||
placeholder="0.5"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("minTrafficGb")}>最小 GB</Label>
|
||||
<Input
|
||||
id={fieldId("minTrafficGb")}
|
||||
@@ -161,7 +161,7 @@ export function ProxyPricingFields({
|
||||
placeholder="10"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("maxTrafficGb")}>最大 GB</Label>
|
||||
<Input
|
||||
id={fieldId("maxTrafficGb")}
|
||||
@@ -173,8 +173,8 @@ export function ProxyPricingFields({
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="grid gap-4 sm:grid-cols-2">
|
||||
<div>
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("fixedTrafficGb")}>固定流量(GB)</Label>
|
||||
<Input
|
||||
id={fieldId("fixedTrafficGb")}
|
||||
@@ -185,7 +185,7 @@ export function ProxyPricingFields({
|
||||
placeholder="200"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("fixedPrice")}>固定价格(¥)</Label>
|
||||
<Input
|
||||
id={fieldId("fixedPrice")}
|
||||
@@ -200,7 +200,7 @@ export function ProxyPricingFields({
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<div className="space-y-1.5">
|
||||
<Label htmlFor={fieldId("totalTrafficGb")}>总流量池(GB)</Label>
|
||||
<Input
|
||||
id={fieldId("totalTrafficGb")}
|
||||
|
||||
Reference in New Issue
Block a user