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:
MHSanaei
2026-05-27 13:43:52 +02:00
parent 43288e6686
commit f1e433e839
3 changed files with 46 additions and 13 deletions
+1
View File
@@ -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'),
});