diff --git a/public/index.html b/public/index.html index 1fca655b..dfd21e21 100644 --- a/public/index.html +++ b/public/index.html @@ -81,7 +81,7 @@ - + diff --git a/public/nodes.js b/public/nodes.js index b3d7a573..40643f0a 100644 --- a/public/nodes.js +++ b/public/nodes.js @@ -333,9 +333,14 @@ return; } - // Favorites always on top + // Claimed ("My Mesh") nodes always on top, then favorites + const myNodes = JSON.parse(localStorage.getItem('meshcore-my-nodes') || '[]'); + const myKeys = new Set(myNodes.map(n => n.pubkey)); const favs = getFavorites(); const sorted = [...nodes].sort((a, b) => { + const aMy = myKeys.has(a.public_key) ? 0 : 1; + const bMy = myKeys.has(b.public_key) ? 0 : 1; + if (aMy !== bMy) return aMy - bMy; const aFav = favs.includes(a.public_key) ? 0 : 1; const bFav = favs.includes(b.public_key) ? 0 : 1; return aFav - bFav;