[PR #5175] [MERGED] feat(ui): add select all / clear all shortcuts for inbound multi-select #5804

Closed
opened 2026-11-02 04:04:11 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5175
Author: @NikanZeyaei
Created: 6/10/2026
Status: ✅ Merged
Merged: 6/11/2026
Merged by: @MHSanaei

Base: main ← Head: feature/select-all-inbounds-button


📝 Commits (4)

  • d28198f feat(ui): add select all / clear all shortcuts for inbound multi-select
  • ce02e37 Merge branch 'main' into feature/select-all-inbounds-button
  • 6d258ed Merge branch 'main' into feature/select-all-inbounds-button
  • c9492fa refactor(form): decouple SelectAllClearButtons labels and harden select-all

📊 Changes

19 files changed (+126 additions, -24 deletions)

View changed files

➕ frontend/src/components/form/SelectAllClearButtons.tsx (+51 -0)
📝 frontend/src/components/form/index.ts (+1 -0)
📝 frontend/src/pages/clients/BulkAttachInboundsModal.tsx (+18 -10)
📝 frontend/src/pages/clients/BulkDetachInboundsModal.tsx (+18 -10)
📝 frontend/src/pages/clients/ClientBulkAddModal.tsx (+6 -1)
📝 frontend/src/pages/clients/ClientFormModal.tsx (+6 -2)
📝 internal/web/translation/ar-EG.json (+2 -0)
📝 internal/web/translation/en-US.json (+2 -0)
📝 internal/web/translation/es-ES.json (+2 -0)
📝 internal/web/translation/fa-IR.json (+2 -0)
📝 internal/web/translation/id-ID.json (+2 -0)
📝 internal/web/translation/ja-JP.json (+2 -0)
📝 internal/web/translation/pt-BR.json (+2 -0)
📝 internal/web/translation/ru-RU.json (+2 -0)
📝 internal/web/translation/tr-TR.json (+2 -1)
📝 internal/web/translation/uk-UA.json (+2 -0)
📝 internal/web/translation/vi-VN.json (+2 -0)
📝 internal/web/translation/zh-CN.json (+2 -0)
📝 internal/web/translation/zh-TW.json (+2 -0)

📄 Description

Summary

Closes https://github.com/MHSanaei/3x-ui/issues/5144

Adds "Select all" and "Clear all" buttons to the inbound multi-select in the client settings modals, so users no longer have to manually click each inbound one by one.

The repeated button logic is extracted into a reusable SelectAllClearButtons component under frontend/src/components/form/. This keeps the UI consistent and makes the feature easy to add to future modals.

Why

Users with many inbounds previously had to click each one individually in the "Attached Inbounds" dropdown when creating or editing a client, or when bulk-attaching/detaching clients. This was tedious and error-prone. The backend already supported inboundIds: [id1, id2, ...] — this PR closes the UX gap.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  1. cd frontend && npm run typecheck && npm run lint — all pass.
  2. go build ./... passes.
  3. Opened the Add Client modal → clicked "Select all" → all inbounds were selected.
  4. Clicked "Clear all" → selection emptied.
  5. Opened the Edit Client modal → same behavior.
  6. Opened the Bulk Attach modal (selected 2+ clients, clicked "Attach to inbounds") → buttons work correctly.
  7. Opened the Bulk Detach modal (selected 2+ clients, clicked "Detach from inbounds") → buttons work correctly.
  8. Verified that when no multi-user inbounds exist, the buttons are appropriately disabled.
  9. Confirmed that when all inbounds are already selected, the "Select all" button disables itself.

Implementation details

  • New component: frontend/src/components/form/SelectAllClearButtons.tsx — a small reusable component that renders the two buttons and handles the disabled states.
  • Files changed: ClientFormModal.tsx, BulkAttachInboundsModal.tsx, BulkDetachInboundsModal.tsx, and 13 translation files.

Screenshots / recordings

https://github.com/user-attachments/assets/2c0c343b-1227-44dd-acdc-3a379ccab60b

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/5175 **Author:** [@NikanZeyaei](https://github.com/NikanZeyaei) **Created:** 6/10/2026 **Status:** ✅ Merged **Merged:** 6/11/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `feature/select-all-inbounds-button` --- ### 📝 Commits (4) - [`d28198f`](https://github.com/MHSanaei/3x-ui/commit/d28198f3519e2980fab7b13659a98a1cf39e7c75) feat(ui): add select all / clear all shortcuts for inbound multi-select - [`ce02e37`](https://github.com/MHSanaei/3x-ui/commit/ce02e371c04aa522a2099cbbb95df9f916da7031) Merge branch 'main' into feature/select-all-inbounds-button - [`6d258ed`](https://github.com/MHSanaei/3x-ui/commit/6d258ed7b86147c2586db1f4277965fbc8d5d046) Merge branch 'main' into feature/select-all-inbounds-button - [`c9492fa`](https://github.com/MHSanaei/3x-ui/commit/c9492fa9d3adaf3ca29b942da6139bc99fc631ef) refactor(form): decouple SelectAllClearButtons labels and harden select-all ### 📊 Changes **19 files changed** (+126 additions, -24 deletions) <details> <summary>View changed files</summary> ➕ `frontend/src/components/form/SelectAllClearButtons.tsx` (+51 -0) 📝 `frontend/src/components/form/index.ts` (+1 -0) 📝 `frontend/src/pages/clients/BulkAttachInboundsModal.tsx` (+18 -10) 📝 `frontend/src/pages/clients/BulkDetachInboundsModal.tsx` (+18 -10) 📝 `frontend/src/pages/clients/ClientBulkAddModal.tsx` (+6 -1) 📝 `frontend/src/pages/clients/ClientFormModal.tsx` (+6 -2) 📝 `internal/web/translation/ar-EG.json` (+2 -0) 📝 `internal/web/translation/en-US.json` (+2 -0) 📝 `internal/web/translation/es-ES.json` (+2 -0) 📝 `internal/web/translation/fa-IR.json` (+2 -0) 📝 `internal/web/translation/id-ID.json` (+2 -0) 📝 `internal/web/translation/ja-JP.json` (+2 -0) 📝 `internal/web/translation/pt-BR.json` (+2 -0) 📝 `internal/web/translation/ru-RU.json` (+2 -0) 📝 `internal/web/translation/tr-TR.json` (+2 -1) 📝 `internal/web/translation/uk-UA.json` (+2 -0) 📝 `internal/web/translation/vi-VN.json` (+2 -0) 📝 `internal/web/translation/zh-CN.json` (+2 -0) 📝 `internal/web/translation/zh-TW.json` (+2 -0) </details> ### 📄 Description ## Summary Closes https://github.com/MHSanaei/3x-ui/issues/5144 Adds **"Select all"** and **"Clear all"** buttons to the inbound multi-select in the client settings modals, so users no longer have to manually click each inbound one by one. The repeated button logic is extracted into a reusable `SelectAllClearButtons` component under `frontend/src/components/form/`. This keeps the UI consistent and makes the feature easy to add to future modals. ## Why Users with many inbounds previously had to click each one individually in the "Attached Inbounds" dropdown when creating or editing a client, or when bulk-attaching/detaching clients. This was tedious and error-prone. The backend already supported `inboundIds: [id1, id2, ...]` — this PR closes the UX gap. ## Type of change - [ ] Bug fix - [x] New feature - [ ] Refactoring (no behavior change) - [ ] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [x] Frontend (UI / panel pages) - [ ] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [ ] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? 1. `cd frontend && npm run typecheck && npm run lint` — all pass. 2. `go build ./...` passes. 3. Opened the **Add Client** modal → clicked **"Select all"** → all inbounds were selected. 4. Clicked **"Clear all"** → selection emptied. 5. Opened the **Edit Client** modal → same behavior. 6. Opened the **Bulk Attach** modal (selected 2+ clients, clicked "Attach to inbounds") → buttons work correctly. 7. Opened the **Bulk Detach** modal (selected 2+ clients, clicked "Detach from inbounds") → buttons work correctly. 8. Verified that when no multi-user inbounds exist, the buttons are appropriately disabled. 9. Confirmed that when all inbounds are already selected, the "Select all" button disables itself. ## Implementation details - **New component:** `frontend/src/components/form/SelectAllClearButtons.tsx` — a small reusable component that renders the two buttons and handles the disabled states. - **Files changed:** `ClientFormModal.tsx`, `BulkAttachInboundsModal.tsx`, `BulkDetachInboundsModal.tsx`, and 13 translation files. ## Screenshots / recordings https://github.com/user-attachments/assets/2c0c343b-1227-44dd-acdc-3a379ccab60b ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [x] `go build ./...` and the test suite pass locally. - [x] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:04:11 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#5804
No description provided.