From 9f7e8178d46dde2398b0729e50fbd8faeb8ec37a Mon Sep 17 00:00:00 2001 From: Abdalrahman Date: Wed, 13 May 2026 02:27:10 +0300 Subject: [PATCH] fix: delete button missing after searching for a user (#4315) When searching for a user, the projected DBInbound only contains the matching clients, so isRemovable evaluated to alse (since a single match made clients.value.length === 1), hiding the Delete button. Pass the original total client count from the parent's clientCount prop and use it in the isRemovable check instead of the projected clients array length. --- frontend/src/pages/inbounds/ClientRowTable.vue | 3 ++- frontend/src/pages/inbounds/InboundList.vue | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/inbounds/ClientRowTable.vue b/frontend/src/pages/inbounds/ClientRowTable.vue index f6119323..dc4b8b84 100644 --- a/frontend/src/pages/inbounds/ClientRowTable.vue +++ b/frontend/src/pages/inbounds/ClientRowTable.vue @@ -32,6 +32,7 @@ const props = defineProps({ lastOnlineMap: { type: Object, default: () => ({}) }, isDarkTheme: { type: Boolean, default: false }, pageSize: { type: Number, default: 0 }, + totalClientCount: { type: Number, default: 0 }, }); const emit = defineEmits([ @@ -138,7 +139,7 @@ function statsExpColor(email) { return PURPLE; } -const isRemovable = computed(() => clients.value.length > 1); +const isRemovable = computed(() => (props.totalClientCount || clients.value.length) > 1); function totalGbDisplay(client) { if (!client.totalGB || client.totalGB <= 0) return ''; diff --git a/frontend/src/pages/inbounds/InboundList.vue b/frontend/src/pages/inbounds/InboundList.vue index 30ffcc68..38465818 100644 --- a/frontend/src/pages/inbounds/InboundList.vue +++ b/frontend/src/pages/inbounds/InboundList.vue @@ -457,7 +457,7 @@ function showQrCodeMenu(dbInbound) {