ui: scan padding fix, remove connection ping log

This commit is contained in:
ardocrat 2024-05-25 10:45:25 +03:00
parent ca0cc3e33c
commit 8ccfa8f7fd
4 changed files with 9 additions and 11 deletions

View file

@ -16,7 +16,7 @@ use egui::{Align, Id, Layout, RichText, Rounding};
use url::Url; use url::Url;
use crate::gui::Colors; use crate::gui::Colors;
use crate::gui::icons::{CHECK, CHECK_CIRCLE, CHECK_FAT, COMPUTER_TOWER, DOTS_THREE_CIRCLE, GLOBE, PLUS_CIRCLE, POWER, X_CIRCLE}; use crate::gui::icons::{CHECK, CHECK_CIRCLE, CHECK_FAT, COMPUTER_TOWER, DOTS_THREE_CIRCLE, GLOBE, GLOBE_SIMPLE, PLUS_CIRCLE, POWER, X_CIRCLE};
use crate::gui::platform::PlatformCallbacks; use crate::gui::platform::PlatformCallbacks;
use crate::gui::views::{Modal, View}; use crate::gui::views::{Modal, View};
use crate::gui::views::types::{ModalContainer, ModalPosition, TextEditOptions}; use crate::gui::views::types::{ModalContainer, ModalPosition, TextEditOptions};
@ -296,7 +296,7 @@ impl ConnectionSetup {
ui.vertical(|ui| { ui.vertical(|ui| {
// Draw connections URL. // Draw connections URL.
ui.add_space(4.0); ui.add_space(4.0);
let conn_text = format!("{} {}", COMPUTER_TOWER, conn.url); let conn_text = format!("{} {}", GLOBE_SIMPLE, conn.url);
View::ellipsize_text(ui, conn_text, 15.0, Colors::TITLE); View::ellipsize_text(ui, conn_text, 15.0, Colors::TITLE);
ui.add_space(1.0); ui.add_space(1.0);
// Setup connection status text. // Setup connection status text.

View file

@ -916,7 +916,7 @@ impl WalletMessages {
.size(17.0) .size(17.0)
.color(Colors::RED)); .color(Colors::RED));
}); });
ui.add_space(6.0); ui.add_space(12.0);
// Setup spacing between buttons. // Setup spacing between buttons.
ui.spacing_mut().item_spacing = egui::Vec2::new(6.0, 0.0); ui.spacing_mut().item_spacing = egui::Vec2::new(6.0, 0.0);

View file

@ -572,18 +572,18 @@ impl WalletTransactions {
// Show buttons to close modal or come back to text request content. // Show buttons to close modal or come back to text request content.
ui.columns(2, |cols| { ui.columns(2, |cols| {
cols[0].vertical_centered_justified(|ui| { cols[0].vertical_centered_justified(|ui| {
View::button(ui, t!("back"), Colors::WHITE, || {
self.tx_info_qr_code_content.clear_state();
self.tx_info_show_qr = false;
});
});
cols[1].vertical_centered_justified(|ui| {
View::button(ui, t!("close"), Colors::WHITE, || { View::button(ui, t!("close"), Colors::WHITE, || {
self.tx_info_qr_code_content.clear_state(); self.tx_info_qr_code_content.clear_state();
self.tx_info_show_qr = false; self.tx_info_show_qr = false;
modal.close(); modal.close();
}); });
}); });
cols[1].vertical_centered_justified(|ui| {
View::button(ui, t!("back"), Colors::WHITE, || {
self.tx_info_qr_code_content.clear_state();
self.tx_info_show_qr = false;
});
});
}); });
} else if self.tx_info_show_scanner { } else if self.tx_info_show_scanner {
// Show buttons to close modal or scanner. // Show buttons to close modal or scanner.
@ -715,7 +715,6 @@ impl WalletTransactions {
self.tx_info_show_scanner = false; self.tx_info_show_scanner = false;
} else { } else {
self.tx_info_scanner_content.ui(ui, cb); self.tx_info_scanner_content.ui(ui, cb);
ui.add_space(2.0);
} }
return; return;
} }

View file

@ -57,7 +57,6 @@ impl ExternalConnection {
.build() .build()
.unwrap() .unwrap()
.block_on(async { .block_on(async {
println!("check {}", conn.url);
let url = url::Url::parse(conn.url.as_str()).unwrap(); let url = url::Url::parse(conn.url.as_str()).unwrap();
if let Ok(_) = url.socket_addrs(|| None) { if let Ok(_) = url.socket_addrs(|| None) {
let addr = format!("{}v2/foreign", url.to_string()); let addr = format!("{}v2/foreign", url.to_string());