mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-25 13:56:10 +00:00
feat(clients,inbound): Auto Renew in Bulk Add + cleaner inbound wire payload
Bulk Add now exposes the same Auto Renew (`reset`, days) input as the single-client form, applied to every client the batch produces. The field was already on ClientBulkAddFormSchema's siblings; just wire it into the schema, the empty-form defaults, the UI, and the bulkCreate payload. Also relabel "Subscription info" to "Subscription ID" by switching to the canonical pages.clients.subId key and modernise the SyncOutlined-in-label random affordance on the same row. On the inbound submit path, two payload-shape cleanups in dropLegacyOptionalEmpties: - streamSettings.hysteriaSettings.auth is a holdover slot whose real per-client value lives in settings.clients[*].auth; drop the field entirely when empty instead of shipping `"auth": ""`. - finalmask's `tcp` / `udp` arrays were already dropped together when both were empty, but a UDP-only setup still emitted a stray `"tcp": []`. Drop each sub-array on its own when empty so a Hysteria-style "salamander on udp only" config no longer carries the empty tcp sibling.
This commit is contained in:
@@ -142,6 +142,7 @@ export const ClientBulkAddFormSchema = z.object({
|
||||
limitIp: z.number().int().min(0),
|
||||
totalGB: z.number().min(0),
|
||||
expiryTime: z.number(),
|
||||
reset: z.number().int().min(0),
|
||||
inboundIds: z.array(z.number()).min(1, 'pages.clients.selectInbound'),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user