feat(profile-view): split nip05 when is_narrow
This commit is contained in:
committed by
William Casarin
parent
e344b09475
commit
ac85bdc21d
@@ -8,7 +8,7 @@ pub use picture::ProfilePic;
|
|||||||
pub use preview::ProfilePreview;
|
pub use preview::ProfilePreview;
|
||||||
|
|
||||||
use egui::{load::TexturePoll, Label, RichText};
|
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};
|
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| {
|
if is_narrow(ui.ctx()) {
|
||||||
ui.add(app_images::verified_image());
|
ui.end_row();
|
||||||
|
}
|
||||||
|
|
||||||
ui.add(Label::new(
|
let nip05_resp = name.nip05.map(|nip05| {
|
||||||
RichText::new(nip05).size(16.0).color(crate::colors::TEAL),
|
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)
|
(username_resp, nip05_resp)
|
||||||
|
|||||||
Reference in New Issue
Block a user