diff --git a/index.html b/index.html index 46719ff..4d526e2 100644 --- a/index.html +++ b/index.html @@ -529,10 +529,14 @@ Display Name — -
+
Date Joined —
+
+ Last Synced + — +
@@ -1218,6 +1222,16 @@ window.openFriendProfile = async function(uid) { const addedAt = friendsData[uid]?.addedAt?.toDate?.(); document.getElementById('fp-joined').textContent = addedAt ? addedAt.toLocaleDateString('en-US', {month:'long', day:'numeric', year:'numeric'}) : '—'; + try { + const stepsDoc = await getDoc(doc(db, 'steps', uid)); + const syncTs = stepsDoc.data()?.lastSynced?.toDate?.(); + document.getElementById('fp-last-synced').textContent = syncTs + ? syncTs.toLocaleString('en-US', {month:'short', day:'numeric', year:'numeric', hour:'numeric', minute:'2-digit'}) + : 'Never'; + } catch(e) { + document.getElementById('fp-last-synced').textContent = 'Never'; + } + showScreen('friend-profile'); }