From a66e4bac6dd4ad60edf175661aeff58055faf113 Mon Sep 17 00:00:00 2001 From: Dorian Date: Fri, 17 Jul 2026 02:38:07 +0100 Subject: [PATCH] =?UTF-8?q?fix(ui):=20Connected=20Nodes=20=E2=80=94=20cons?= =?UTF-8?q?istent=20bottom=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop the 'Discover Nodes on Nostr' button and the >=1800px header buttons; Find Nodes + Refresh are now a 50/50 bottom pair on every screen size, with Refresh acting on the active tab. Co-Authored-By: Claude Fable 5 --- .../src/views/web5/Web5ConnectedNodes.vue | 78 +++---------------- 1 file changed, 12 insertions(+), 66 deletions(-) diff --git a/neode-ui/src/views/web5/Web5ConnectedNodes.vue b/neode-ui/src/views/web5/Web5ConnectedNodes.vue index b376a3e0..9d4db73d 100644 --- a/neode-ui/src/views/web5/Web5ConnectedNodes.vue +++ b/neode-ui/src/views/web5/Web5ConnectedNodes.vue @@ -11,21 +11,6 @@

{{ t('web5.connectedNodes') }}

-
- - -
@@ -174,7 +159,9 @@
-
+ +
- - -
@@ -328,7 +291,6 @@ const observers = ref(cached.observers ?? []) const loadingPeers = ref(false) const peerReachableLocal = ref>(cached.peerReachable ?? {}) const peerReachable = computed(() => ({ ...appStore.peerHealth, ...peerReachableLocal.value })) -const discovering = ref(false) // Send message modal const showSendMessageModal = ref(false) @@ -378,6 +340,12 @@ function switchToRequestsTab() { } } +// The single bottom Refresh acts on whichever tab is open. +function refreshActiveTab() { + if (nodesContainerTab.value === 'requests') void loadConnectionRequests() + else void loadPeers() +} + async function loadPeers() { const hadPeers = peers.value.length > 0 || observers.value.length > 0 loadingPeers.value = true @@ -456,28 +424,6 @@ async function sendMessage() { } } -async function discoverAndAddPeers() { - discovering.value = true - try { - const res = await rpcClient.discoverNodes() - const nodes = res.nodes || [] - for (const n of nodes) { - if (n.onion && n.pubkey) { - try { - await rpcClient.addPeer({ onion: n.onion, pubkey: n.pubkey }) - } catch (e) { - if (import.meta.env.DEV) console.warn('Peer may already exist', e) - } - } - } - await loadPeers() - } catch (e) { - if (import.meta.env.DEV) console.error('Discover failed:', e) - } finally { - discovering.value = false - } -} - async function loadConnectionRequests() { const hadRequests = connectionRequests.value.length > 0 loadingRequests.value = true