fix: node names everywhere, cloud peer names, sync timeout 180s

- Federation: nodeName() with Node-XXXX fallback for all views + map + sync results
- Cloud: peerDisplayName() replaces raw DIDs, hides onion addresses
- Sync timeout increased to 180s for Tor-connected nodes
- Better error message when sync fails

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-19 20:52:39 +00:00
parent 93aaeb4abe
commit d98a2512b7
2 changed files with 11 additions and 7 deletions

View File

@@ -64,8 +64,8 @@
</svg>
</div>
<div class="flex-1 min-w-0">
<h3 class="text-lg font-semibold text-white mb-0.5 truncate" :title="peer.did">{{ peer.name || truncateDid(peer.did) }}</h3>
<p class="text-xs text-white/50 truncate">{{ peer.onion }}</p>
<h3 class="text-lg font-semibold text-white mb-0.5 truncate" :title="peer.did">{{ peer.name || peerDisplayName(peer.did) }}</h3>
<p class="text-xs text-white/40 truncate">{{ peer.name ? peer.did.slice(0, 20) + '...' : 'Peer node' }}</p>
</div>
<svg class="w-5 h-5 text-white/30" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
@@ -275,9 +275,9 @@ async function loadPeers() {
}
}
function truncateDid(did: string): string {
if (did.length <= 24) return did
return did.slice(0, 16) + '...' + did.slice(-8)
function peerDisplayName(did: string): string {
const suffix = did.replace(/^did:key:z6Mk/, '').slice(-6).toUpperCase()
return `Node-${suffix}`
}
function openSection(section: ContentSection) {