From 267fb1c86662875e2e78df47b2a517a4bfa5a965 Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 10 May 2026 01:59:02 +0200 Subject: [PATCH] refactor(inbounds): reorder Inbound's Data tabs (client first, sub inline) Show the per-client pane as the default tab and fold the subscription URLs into its bottom (under a divider) so the modal has two tabs instead of three. Inbound details move to the second tab and remain the default fallback for protocol-only entries (HTTP/Mixed/Tunnel/ WireGuard) that have no per-client view. --- .../src/pages/inbounds/InboundInfoModal.vue | 418 +++++++++--------- 1 file changed, 210 insertions(+), 208 deletions(-) diff --git a/frontend/src/pages/inbounds/InboundInfoModal.vue b/frontend/src/pages/inbounds/InboundInfoModal.vue index 05af6a13..4db14323 100644 --- a/frontend/src/pages/inbounds/InboundInfoModal.vue +++ b/frontend/src/pages/inbounds/InboundInfoModal.vue @@ -180,8 +180,7 @@ function downloadText(content, filename) { FileManager.downloadTextFile(content, filename); } -// Active tab in the 3-pane layout. Reset on each open below. -const activeTab = ref('inbound'); +const activeTab = ref('client'); // === Build state on open =========================================== function genSubLink(subId) { @@ -195,7 +194,7 @@ watch(() => props.open, (next) => { if (!next) return; if (!props.dbInbound) return; - activeTab.value = 'inbound'; + activeTab.value = props.dbInbound.toInbound().clients?.length ? 'client' : 'inbound'; dbInbound.value = props.dbInbound; inbound.value = props.dbInbound.toInbound(); @@ -272,7 +271,214 @@ const showSubscriptionTab = computed( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
{{ t('pages.inbounds.email') }} - {{ clientSettings.email }} - {{ t('none') }} -
ID{{ clientSettings.id }}
{{ t('security') }}{{ clientSettings.security }}
Flow - {{ clientSettings.flow }} - {{ t('none') }} -
{{ t('password') }}{{ clientSettings.password }}
{{ t('status') }} - {{ t('depleted') }} - {{ t('enabled') }} - {{ t('disabled') }} -
{{ t('usage') }} - - {{ SizeFormatter.sizeFormat(clientStats.up + clientStats.down) }} - - - ↑ {{ SizeFormatter.sizeFormat(clientStats.up) }} / - {{ SizeFormatter.sizeFormat(clientStats.down) }} ↓ - -
{{ t('pages.inbounds.createdAt') }} - {{ IntlUtil.formatDate(clientSettings.created_at, datepicker) }} - - -
{{ t('pages.inbounds.updatedAt') }} - {{ IntlUtil.formatDate(clientSettings.updated_at, datepicker) }} - - -
{{ t('lastOnline') }}{{ formatLastOnline(clientSettings.email || '') }}
{{ t('comment') }}{{ clientSettings.comment }}
{{ t('pages.inbounds.IPLimit') }}{{ clientSettings.limitIp }}
{{ t('pages.inbounds.IPLimitlog') }} -
-
- {{ item - }} -
- {{ clientIpsText || t('tgbot.noIpRecord') }} -
-
- - - - -
-
- - - - - - - - - - - - - - - - - -
{{ t('remained') }}{{ t('pages.inbounds.totalUsage') }}{{ t('pages.inbounds.expireDate') }}
- {{ - getRemainingStats() }} - - {{ - SizeFormatter.sizeFormat(clientSettings.totalGB) }} - - - - - {{ - IntlUtil.formatDate(clientSettings.expiryTime, datepicker) }} - - {{ clientSettings.expiryTime / -86400000 }} {{ t('day') }} - - - - -
- - - - - - -
- - - - - - -