From ac85bdc21d002a117a6cc776b2014da2f01dff17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20Lo=CC=81pez=20Guevara?= Date: Tue, 15 Jul 2025 09:55:12 -0300 Subject: [PATCH] feat(profile-view): split nip05 when is_narrow --- crates/notedeck_ui/src/profile/mod.rs | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/crates/notedeck_ui/src/profile/mod.rs b/crates/notedeck_ui/src/profile/mod.rs index 4b44297c..40048833 100644 --- a/crates/notedeck_ui/src/profile/mod.rs +++ b/crates/notedeck_ui/src/profile/mod.rs @@ -8,7 +8,7 @@ pub use picture::ProfilePic; pub use preview::ProfilePreview; use egui::{load::TexturePoll, Label, RichText}; -use notedeck::{IsFollowing, NostrName, NotedeckTextStyle}; +use notedeck::{ui::is_narrow, IsFollowing, NostrName, NotedeckTextStyle}; use crate::{app_images, colors, widgets::styled_button_toggleable}; @@ -39,12 +39,18 @@ pub fn display_name_widget<'a>( ) }); - let nip05_resp = name.nip05.map(|nip05| { - ui.add(app_images::verified_image()); + if is_narrow(ui.ctx()) { + ui.end_row(); + } - ui.add(Label::new( - RichText::new(nip05).size(16.0).color(crate::colors::TEAL), - )) + let nip05_resp = name.nip05.map(|nip05| { + ui.horizontal(|ui| { + ui.add(app_images::verified_image()); + + ui.label(RichText::new(nip05).size(16.0).color(crate::colors::TEAL)) + .on_hover_text(nip05) + }) + .inner }); (username_resp, nip05_resp)