fix(inbounds): hide node UI when no enabled node exists

The Deploy-to selector, node column, node stat row, and node filter all
appeared whenever a node row existed in the DB. Local-only deployments
with no nodes (or only disabled nodes) saw a dropdown that only had
"Local Panel" and a filter that did nothing.

useNodeList now exposes hasActive (any node with enable === true).
Inbounds form and list gate node UI on hasActive instead of map size.
This commit is contained in:
MHSanaei
2026-05-13 17:42:40 +02:00
parent 4399fe2a85
commit b10a9f1de7
4 changed files with 11 additions and 7 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ export function useNodeList() {
return n != null && n.enable && n.status === 'online';
}
const hasActive = computed(() => nodes.value.some((n) => n.enable));
onMounted(refresh);
return { nodes, fetched, refresh, byId, nameFor, isOnline };
return { nodes, fetched, refresh, byId, nameFor, isOnline, hasActive };
}