mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 19:46:50 +00:00
Improve person page
This commit is contained in:
parent
2ff85497a9
commit
47faa42c07
@ -144,18 +144,31 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
|
|||||||
ui.label(RichText::new(GossipUi::hex_pubkey_short(&person.pubkey)).weak());
|
ui.label(RichText::new(GossipUi::hex_pubkey_short(&person.pubkey)).weak());
|
||||||
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label(RichText::new(person.name.as_deref().unwrap_or("")).strong());
|
if let Some(name) = &person.name {
|
||||||
|
ui.label(RichText::new(name).strong());
|
||||||
|
} else {
|
||||||
|
ui.label(
|
||||||
|
RichText::new(GossipUi::hex_pubkey_short(&person.pubkey))
|
||||||
|
.weak(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
ui.add_space(24.0);
|
ui.add_space(24.0);
|
||||||
|
|
||||||
if let Some(dns_id) = person.dns_id.as_deref() {
|
if let Some(dns_id) = &person.dns_id {
|
||||||
ui.label(dns_id);
|
if person.dns_id_valid > 0 {
|
||||||
|
ui.label(RichText::new(dns_id).monospace().small());
|
||||||
|
} else {
|
||||||
|
ui.label(
|
||||||
|
RichText::new(dns_id).monospace().small().strikethrough(),
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
ui.add_space(12.0);
|
ui.add_space(4.0);
|
||||||
|
|
||||||
ui.separator();
|
ui.separator();
|
||||||
}
|
}
|
||||||
@ -183,12 +196,28 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
|
|||||||
ui.label(RichText::new(GossipUi::hex_pubkey_short(&person.pubkey)).weak());
|
ui.label(RichText::new(GossipUi::hex_pubkey_short(&person.pubkey)).weak());
|
||||||
|
|
||||||
ui.horizontal(|ui| {
|
ui.horizontal(|ui| {
|
||||||
ui.label(RichText::new(person.name.as_deref().unwrap_or("")).strong());
|
if let Some(name) = &person.name {
|
||||||
|
ui.label(RichText::new(name).strong());
|
||||||
|
} else {
|
||||||
|
ui.label(
|
||||||
|
RichText::new(GossipUi::hex_pubkey_short(&person.pubkey)).weak(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
ui.add_space(24.0);
|
ui.add_space(24.0);
|
||||||
|
|
||||||
if let Some(dns_id) = person.dns_id.as_deref() {
|
if let Some(dns_id) = &person.dns_id {
|
||||||
ui.label(dns_id);
|
if person.dns_id_valid > 0 {
|
||||||
|
ui.label(RichText::new(dns_id).monospace().small());
|
||||||
|
} else {
|
||||||
|
ui.label(RichText::new(dns_id).monospace().small().strikethrough());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if person.followed > 0 {
|
||||||
|
ui.label("FOLLOWED");
|
||||||
|
} else {
|
||||||
|
ui.label("not followed");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user