polish: refine lite admin controls

This commit is contained in:
JetSprow
2026-04-30 21:48:59 +10:00
parent 6ee9cf2857
commit c5592621a4
87 changed files with 326 additions and 272 deletions

View File

@@ -110,13 +110,11 @@ export function ProxyPricingFields({
plan,
pricingMode,
setPricingMode,
allowTrafficTopup,
}: {
fieldId: FieldId;
plan?: PlanFormValue;
pricingMode: PlanPricingMode;
setPricingMode: Dispatch<SetStateAction<PlanPricingMode>>;
allowTrafficTopup: boolean;
}) {
const pricingModeLabels: Record<string, string> = {
TRAFFIC_SLIDER: "用户自选流量",
@@ -150,7 +148,7 @@ export function ProxyPricingFields({
type="number"
step="0.01"
defaultValue={plan?.pricePerGb ?? ""}
placeholder="例如 0.5"
placeholder="0.5"
/>
</div>
<div>
@@ -160,7 +158,7 @@ export function ProxyPricingFields({
name="minTrafficGb"
type="number"
defaultValue={plan?.minTrafficGb ?? ""}
placeholder="例如 10"
placeholder="10"
/>
</div>
<div>
@@ -170,7 +168,7 @@ export function ProxyPricingFields({
name="maxTrafficGb"
type="number"
defaultValue={plan?.maxTrafficGb ?? ""}
placeholder="例如 1000"
placeholder="1000"
/>
</div>
</div>
@@ -184,7 +182,7 @@ export function ProxyPricingFields({
type="number"
min={1}
defaultValue={plan?.fixedTrafficGb ?? plan?.minTrafficGb ?? ""}
placeholder="例如 200"
placeholder="200"
/>
</div>
<div>
@@ -196,7 +194,7 @@ export function ProxyPricingFields({
step="0.01"
min={0.01}
defaultValue={plan?.fixedPrice ?? ""}
placeholder="例如 29.9"
placeholder="29.9"
/>
</div>
</div>
@@ -210,13 +208,8 @@ export function ProxyPricingFields({
type="number"
min={1}
defaultValue={plan?.totalTrafficGb ?? ""}
placeholder="空=无限流量"
placeholder="空=不限"
/>
{allowTrafficTopup && (
<p className="mt-1.5 text-xs text-muted-foreground">
</p>
)}
</div>
</>
);
@@ -234,7 +227,6 @@ export function ProxyConfigSection(props: {
selectedInboundIds: string[];
setSelectedInboundIds: Dispatch<SetStateAction<string[]>>;
toggleInbound: (inboundId: string) => void;
allowTrafficTopup: boolean;
pricingMode: PlanPricingMode;
setPricingMode: Dispatch<SetStateAction<PlanPricingMode>>;
}) {