mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-06-05 20:54:14 +00:00
fix(inbounds): keep Node column visible for node-attached inbounds
The Node column was bound to hasActiveNode, so disabling every node hid the column even when inbounds were still attached to those nodes — the admin lost the visual cue that those inbounds belonged to a node and would come back when it was re-enabled. Combine hasActiveNode with a new hasNodeAttachedInbound check (any dbInbound with nodeId != null) so the column survives node-disable.
This commit is contained in:
parent
d10fa8f3c0
commit
f50bae9225
1 changed files with 9 additions and 8 deletions
|
|
@ -61,9 +61,11 @@ useWebSocket({
|
||||||
inbounds: applyInboundsEvent,
|
inbounds: applyInboundsEvent,
|
||||||
});
|
});
|
||||||
const { isMobile } = useMediaQuery();
|
const { isMobile } = useMediaQuery();
|
||||||
// Node list lives on the central panel; the Inbounds page consumes
|
|
||||||
// the id→node map for the new "Node" column. Fetched once on mount.
|
|
||||||
const { byId: nodesById, hasActive: hasActiveNode } = useNodeList();
|
const { byId: nodesById, hasActive: hasActiveNode } = useNodeList();
|
||||||
|
const hasNodeAttachedInbound = computed(() =>
|
||||||
|
(dbInbounds.value || []).some((ib) => ib?.nodeId != null),
|
||||||
|
);
|
||||||
|
const showNodeInfo = computed(() => hasNodeAttachedInbound.value || hasActiveNode.value);
|
||||||
|
|
||||||
const basePath = window.X_UI_BASE_PATH || '';
|
const basePath = window.X_UI_BASE_PATH || '';
|
||||||
const requestUri = window.location.pathname;
|
const requestUri = window.location.pathname;
|
||||||
|
|
@ -460,18 +462,17 @@ function onRowAction({ key, dbInbound }) {
|
||||||
<InboundList :db-inbounds="dbInbounds" :client-count="clientCount" :online-clients="onlineClients"
|
<InboundList :db-inbounds="dbInbounds" :client-count="clientCount" :online-clients="onlineClients"
|
||||||
:last-online-map="lastOnlineMap" :is-dark-theme="themeState.isDark" :expire-diff="expireDiff"
|
:last-online-map="lastOnlineMap" :is-dark-theme="themeState.isDark" :expire-diff="expireDiff"
|
||||||
:traffic-diff="trafficDiff" :page-size="pageSize" :is-mobile="isMobile"
|
:traffic-diff="trafficDiff" :page-size="pageSize" :is-mobile="isMobile"
|
||||||
:sub-enable="subSettings.enable" :nodes-by-id="nodesById" :has-active-node="hasActiveNode"
|
:sub-enable="subSettings.enable" :nodes-by-id="nodesById" :has-active-node="showNodeInfo"
|
||||||
:stats-version="statsVersion"
|
:stats-version="statsVersion" @refresh="refresh" @add-inbound="onAddInbound"
|
||||||
@refresh="refresh"
|
@general-action="onGeneralAction" @row-action="onRowAction" />
|
||||||
@add-inbound="onAddInbound" @general-action="onGeneralAction" @row-action="onRowAction" />
|
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
</a-layout-content>
|
</a-layout-content>
|
||||||
</a-layout>
|
</a-layout>
|
||||||
|
|
||||||
<InboundFormModal v-model:open="formOpen" :mode="formMode" :db-inbound="formDbInbound"
|
<InboundFormModal v-model:open="formOpen" :mode="formMode" :db-inbound="formDbInbound" :db-inbounds="dbInbounds"
|
||||||
:db-inbounds="dbInbounds" @saved="refresh" />
|
@saved="refresh" />
|
||||||
<InboundInfoModal v-model:open="infoOpen" :db-inbound="infoDbInbound" :client-index="infoClientIndex"
|
<InboundInfoModal v-model:open="infoOpen" :db-inbound="infoDbInbound" :client-index="infoClientIndex"
|
||||||
:remark-model="remarkModel" :expire-diff="expireDiff" :traffic-diff="trafficDiff"
|
:remark-model="remarkModel" :expire-diff="expireDiff" :traffic-diff="trafficDiff"
|
||||||
:ip-limit-enable="ipLimitEnable" :tg-bot-enable="tgBotEnable" :sub-settings="subSettings"
|
:ip-limit-enable="ipLimitEnable" :tg-bot-enable="tgBotEnable" :sub-settings="subSettings"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue