From 80031e67ccaf8fa8338017a94061f008dd44c17f Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Tue, 12 May 2026 12:30:07 +0200 Subject: [PATCH] feat(inbounds): restore copy-clients-between-inbounds modal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The menu item, backend endpoint (POST /panel/api/inbounds/:id/copyClients), and i18n keys were already in place after the Vue3 migration, but the modal itself was never ported — clicking the menu just toasted "coming soon". Adds CopyClientsModal.vue: source inbound dropdown (multi-user inbounds except the target), per-client checkbox selection via a-table row-selection, optional Flow override when the target supports TLS flow, and result toasts for added/skipped/errors. --- .../src/pages/inbounds/CopyClientsModal.vue | 185 ++++++++++++++++++ frontend/src/pages/inbounds/InboundsPage.vue | 11 +- 2 files changed, 192 insertions(+), 4 deletions(-) create mode 100644 frontend/src/pages/inbounds/CopyClientsModal.vue diff --git a/frontend/src/pages/inbounds/CopyClientsModal.vue b/frontend/src/pages/inbounds/CopyClientsModal.vue new file mode 100644 index 00000000..685bc9a0 --- /dev/null +++ b/frontend/src/pages/inbounds/CopyClientsModal.vue @@ -0,0 +1,185 @@ + + + diff --git a/frontend/src/pages/inbounds/InboundsPage.vue b/frontend/src/pages/inbounds/InboundsPage.vue index 5a4915f0..de02fe16 100644 --- a/frontend/src/pages/inbounds/InboundsPage.vue +++ b/frontend/src/pages/inbounds/InboundsPage.vue @@ -21,6 +21,7 @@ import InboundList from './InboundList.vue'; import InboundFormModal from './InboundFormModal.vue'; import ClientFormModal from './ClientFormModal.vue'; import ClientBulkModal from './ClientBulkModal.vue'; +import CopyClientsModal from './CopyClientsModal.vue'; import InboundInfoModal from './InboundInfoModal.vue'; import QrCodeModal from './QrCodeModal.vue'; import TextModal from '@/components/TextModal.vue'; @@ -88,6 +89,8 @@ const clientIndex = ref(null); const bulkOpen = ref(false); const bulkDbInbound = ref(null); +const copyOpen = ref(false); +const copyDbInbound = ref(null); // === Info / QR-code modals =========================================== const infoOpen = ref(false); @@ -515,10 +518,8 @@ function onRowAction({ key, dbInbound }) { exportInboundClipboard(dbInbound); break; case 'copyClients': - // Copy-clients-from-inbound is a tiny dedicated modal in legacy - // (lets you tick clients to copy across inbounds). Defer to a - // future commit — surface a friendly message for now. - message.info('Copy clients across inbounds — coming soon'); + copyDbInbound.value = dbInbound; + copyOpen.value = true; break; case 'delete': confirmDelete(dbInbound); @@ -663,6 +664,8 @@ function onRowAction({ key, dbInbound }) { :ip-limit-enable="ipLimitEnable" :traffic-diff="trafficDiff" @saved="refresh" /> +