update sidebar to match new design

also adds interaction on hover & click

Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
kernelkind
2024-09-20 17:10:35 -04:00
parent d76678dffc
commit 0ea3132ee2
2 changed files with 184 additions and 41 deletions

View File

@@ -167,6 +167,14 @@ pub fn get_profile_url<'a>(profile: Option<&'a ProfileRecord<'a>>) -> &'a str {
}
}
pub fn get_profile_url_owned(profile: Option<ProfileRecord<'_>>) -> &str {
if let Some(url) = profile.and_then(|pr| pr.record().profile().and_then(|p| p.picture())) {
url
} else {
ProfilePic::no_pfp_url()
}
}
fn display_name_widget(
display_name: DisplayName<'_>,
add_placeholder_space: bool,