feat(mesh): server name in adverts + clear-all button + CI fix
- Mesh adverts now use the node's configured server name (e.g. "ThinkPad",
"Arch Dev") instead of DID key fragments ("Archy-z6MkmkSB")
- Added mesh.clear-all RPC to reset peers, messages, contacts, and history
- Added "Clear All" button in Mesh UI peers panel
- Both glibc and musl builds verified
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -229,6 +229,17 @@ async function refreshOutboxCount() {
|
||||
}
|
||||
}
|
||||
|
||||
async function clearAllMesh() {
|
||||
if (!window.confirm('Clear all mesh peers, messages, and chat history? This cannot be undone.')) return
|
||||
try {
|
||||
await rpcClient('mesh.clear-all')
|
||||
await mesh.refreshAll()
|
||||
selectedPeer.value = null
|
||||
} catch (e) {
|
||||
console.error('Failed to clear mesh:', e)
|
||||
}
|
||||
}
|
||||
|
||||
// Phase 4: Off-grid Bitcoin + Dead Man's Switch
|
||||
const activeTab = ref<'chat' | 'bitcoin' | 'deadman' | 'map'>('chat')
|
||||
|
||||
@@ -1341,7 +1352,10 @@ function isImageMime(mime?: string): boolean {
|
||||
|
||||
<!-- Peers list -->
|
||||
<div data-controller-container tabindex="0" class="glass-card mesh-peers-card">
|
||||
<h2 class="mesh-section-title">Peers <span class="mesh-peer-count">{{ mesh.peers.length }}</span></h2>
|
||||
<div class="flex items-center justify-between">
|
||||
<h2 class="mesh-section-title">Peers <span class="mesh-peer-count">{{ mesh.peers.length }}</span></h2>
|
||||
<button class="text-xs text-white/40 hover:text-red-400 transition-colors px-2 py-1" @click="clearAllMesh" title="Clear all peers, messages, and chat history">Clear All</button>
|
||||
</div>
|
||||
|
||||
<div v-if="mesh.peers.length === 0 && !mesh.status?.device_connected" class="mesh-empty">
|
||||
No peers discovered yet.
|
||||
|
||||
Reference in New Issue
Block a user