From ec7563c3365b2fb4e990d9d17592ff824b299190 Mon Sep 17 00:00:00 2001 From: Bu5hm4nn <“bu5hm4nn@users.noreply.github.com”> Date: Thu, 24 Aug 2023 15:36:40 -1000 Subject: [PATCH] Place "Advertise Relay List" next to title --- src/ui/relays/mine.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ui/relays/mine.rs b/src/ui/relays/mine.rs index 7a8a756a2..53be95965 100644 --- a/src/ui/relays/mine.rs +++ b/src/ui/relays/mine.rs @@ -12,8 +12,16 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr ui.add_space(10.0); ui.horizontal_wrapped(|ui| { ui.heading("My Relays"); - ui.add_space(50.0); ui.set_enabled(!is_editing); + ui.add_space(10.0); + if ui.button("Advertise Relay List") + .on_hover_text("Advertise my relays. Will send 10002 kind to all relays that have 'ADVERTISE' usage enabled") + .clicked() { + let _ = GLOBALS + .to_overlord + .send(ToOverlordMessage::AdvertiseRelayList); + } + ui.add_space(50.0); widgets::search_filter_field(ui, &mut app.relays.search, 200.0); ui.with_layout(egui::Layout::right_to_left(egui::Align::Min), |ui| { ui.add_space(20.0); @@ -26,14 +34,6 @@ pub(super) fn update(app: &mut GossipUi, _ctx: &Context, _frame: &mut eframe::Fr }); ui.add_space(10.0); - ui.horizontal(|ui| { - if ui.button("↑ Advertise Relay List ↑").clicked() { - let _ = GLOBALS - .to_overlord - .send(ToOverlordMessage::AdvertiseRelayList); - } - }); - let relays = if !is_editing { // clear edit cache if present if !app.relays.edit_relays.is_empty() {