feat(clients): selective bulk attach + new bulk detach

Inbounds page:
- AttachClientsModal now shows a per-client selection table (email,
  comment, enabled tag) with search and a live "selected of total"
  counter; all clients are pre-selected so the old "attach all"
  workflow stays a single OK click.
- New DetachClientsModal on the inbound row menu lets you pick which
  clients to remove from that inbound (records are kept so they can be
  re-attached later; for full removal use Delete).

Clients page:
- New "Attach (N)" bulk-action button + BulkAttachInboundsModal that
  attaches selected clients to one or more multi-user inbounds.
- New "Detach (N)" bulk-action button + BulkDetachInboundsModal that
  removes selected clients from chosen inbounds; (email, inbound) pairs
  where the client isn't attached are silently skipped.

Backend adds POST /panel/api/clients/bulkDetach, wrapping the existing
Detach service for each email and reporting per-email
detached/skipped/errors. ClientRecord rows are kept on detach to match
the single-client endpoint; bulkDel remains the path for full removal.
This commit is contained in:
MHSanaei
2026-05-28 11:08:52 +02:00
parent a07b68894c
commit 72b68cce22
15 changed files with 809 additions and 13 deletions
+23
View File
@@ -306,6 +306,16 @@
"attachClientsNoTargets": "No other compatible inbounds available to attach to.",
"attachClientsResult": "Attached {attached}, skipped {skipped}.",
"attachClientsResultMixed": "Attached {attached}, skipped {skipped}, errors {errors}.",
"attachClientsSelectLabel": "Clients to attach",
"attachClientsSearchPlaceholder": "Search email or comment",
"attachClientsStatusDisabled": "Disabled",
"attachClientsSelectedCount": "{selected} of {total} selected",
"detachClients": "Detach Clients",
"detachClientsTitle": "Detach clients of \"{remark}\"",
"detachClientsDesc": "Removes the selected client(s) from this inbound only. Client records themselves are kept (use Delete to remove fully). Source has {count} clients in total.",
"detachClientsResult": "Detached {detached}, skipped {skipped}.",
"detachClientsResultMixed": "Detached {detached}, skipped {skipped}, errors {errors}.",
"detachClientsSelectLabel": "Clients to detach",
"exportLinksTitle": "Export inbound links",
"exportSubsTitle": "Export subscription links",
"exportAllLinksTitle": "Export all inbound links",
@@ -532,6 +542,19 @@
"assignGroupPlaceholder": "Group name (leave blank to clear)",
"assignGroupAssignedToast": "Assigned {count} client(s) to {group}",
"assignGroupClearedToast": "Cleared group from {count} client(s)",
"attachSelected": "Attach ({count})",
"attachToInboundsTitle": "Attach {count} client(s) to inbound(s)",
"attachToInboundsDesc": "Attaches the selected {count} client(s) (same UUID/password and shared traffic) to the chosen inbound(s). They keep their existing attachments too.",
"attachToInboundsTargets": "Target inbounds",
"attachToInboundsNoTargets": "No multi-user inbounds available to attach to.",
"detachSelected": "Detach ({count})",
"detach": "Detach",
"detachFromInboundsTitle": "Detach {count} client(s) from inbound(s)",
"detachFromInboundsDesc": "Removes the selected {count} client(s) from the chosen inbound(s). Pairs where the client wasn't attached are silently skipped. Client records are kept (use Delete to remove fully).",
"detachFromInboundsTargets": "Inbounds to detach from",
"detachFromInboundsNoTargets": "No multi-user inbounds available.",
"detachFromInboundsResult": "Detached {detached}, skipped {skipped}.",
"detachFromInboundsResultMixed": "Detached {detached}, skipped {skipped}, errors {errors}.",
"subLinksTitle": "Sub links ({count})",
"subLinkColumn": "Subscription URL",
"subJsonLinkColumn": "Subscription JSON URL",