Do not show 'push' on people if identity is not setup

This commit is contained in:
Mike Dilger 2023-02-24 09:25:27 +13:00
parent 83c23a2c59
commit bc4753a9fd

View File

@ -73,8 +73,11 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::PullFollowMerge);
}
if ui.button("↑ PUSH ↑\n").clicked() {
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::PushFollow);
#[allow(clippy::collapsible_if)]
if GLOBALS.signer.is_ready() {
if ui.button("↑ PUSH ↑\n").clicked() {
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::PushFollow);
}
}
if ui.button("Refresh\nMetadata").clicked() {
@ -84,6 +87,16 @@ pub(super) fn update(app: &mut GossipUi, ctx: &Context, _frame: &mut eframe::Fra
}
});
if !GLOBALS.signer.is_ready() {
ui.horizontal_wrapped(|ui| {
ui.label("You need to ");
if ui.link("setup your identity").clicked() {
app.set_page(Page::YourKeys);
}
ui.label(" to push.");
});
}
ui.add_space(10.0);
ui.separator();
ui.add_space(10.0);