feat: add support for basic web of trust (#65)

Reviewed-on: reya/coop#65
This commit is contained in:
2026-10-20 13:43:37 +00:00
parent a22aecc694
commit f44f0704f3
14 changed files with 720 additions and 241 deletions
+15
View File
@@ -459,9 +459,24 @@ impl Render for ProfileDialog {
.filter(|website| !website.trim().is_empty())
.map(SharedString::from);
let score = {
let wot = PersonRegistry::global(cx).read(cx).wot().read(cx);
wot.is_loaded().then(|| wot.score(&self.public_key))
}
.map(|score| {
SharedString::from(format!(
"{} mutual {}",
score,
if score == 1 { "contact" } else { "contacts" }
))
});
this.child(field("Name", name, "Unknown", cx))
.child(field("About", about, "No bio", cx))
.child(field("Website", website, "No website", cx))
.when(!self.is_current_user, |this| {
this.child(field("Web of Trust", score, "Not loaded yet", cx))
})
})
.child(
h_flex()