ui: move connections add button from panel, wallet settings titles lines color
This commit is contained in:
parent
1783f2c3f7
commit
cf541ee8ed
5 changed files with 35 additions and 29 deletions
|
@ -17,7 +17,7 @@ use url::Url;
|
|||
|
||||
use crate::AppConfig;
|
||||
use crate::gui::Colors;
|
||||
use crate::gui::icons::{CARET_RIGHT, CHECK_CIRCLE, COMPUTER_TOWER, DOTS_THREE_CIRCLE, GLOBE_SIMPLE, PENCIL, POWER, TRASH, X_CIRCLE};
|
||||
use crate::gui::icons::{CARET_RIGHT, CHECK_CIRCLE, COMPUTER_TOWER, DOTS_THREE_CIRCLE, GLOBE_SIMPLE, PENCIL, PLUS_CIRCLE, POWER, TRASH, X_CIRCLE};
|
||||
use crate::gui::platform::PlatformCallbacks;
|
||||
use crate::gui::views::{Modal, NodeSetup, View};
|
||||
use crate::gui::views::types::{ModalContainer, ModalPosition, TextEditOptions};
|
||||
|
@ -100,11 +100,20 @@ impl ConnectionsContent {
|
|||
Self::integrated_node_item_ui(ui);
|
||||
|
||||
// Show external connections.
|
||||
ui.add_space(8.0);
|
||||
ui.label(RichText::new(t!("wallets.ext_conn")).size(16.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
|
||||
// Show button to add new external node connection.
|
||||
let add_node_text = format!("{} {}", PLUS_CIRCLE, t!("wallets.add_node"));
|
||||
View::button(ui, add_node_text, Colors::WHITE, || {
|
||||
self.show_add_ext_conn_modal(None, cb);
|
||||
});
|
||||
|
||||
ui.add_space(12.0);
|
||||
|
||||
let ext_conn_list = ConnectionsConfig::ext_conn_list();
|
||||
if !ext_conn_list.is_empty() {
|
||||
ui.add_space(6.0);
|
||||
ui.label(RichText::new(t!("wallets.ext_conn")).size(16.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
for (index, conn) in ext_conn_list.iter().enumerate() {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
// Draw connection list item.
|
||||
|
|
|
@ -16,7 +16,7 @@ use egui::{Margin, RichText, ScrollArea, Stroke};
|
|||
|
||||
use crate::AppConfig;
|
||||
use crate::gui::Colors;
|
||||
use crate::gui::icons::{BRIEFCASE, DATABASE, DOTS_THREE_OUTLINE_VERTICAL, FACTORY, FADERS, GAUGE, PLUS_CIRCLE, POWER};
|
||||
use crate::gui::icons::{BRIEFCASE, DATABASE, DOTS_THREE_OUTLINE_VERTICAL, FACTORY, FADERS, GAUGE, POWER};
|
||||
use crate::gui::platform::PlatformCallbacks;
|
||||
use crate::gui::views::{ConnectionsContent, NetworkMetrics, NetworkMining, NetworkNode, NetworkSettings, Root, TitlePanel, View};
|
||||
use crate::gui::views::network::types::{NetworkTab, NetworkTabType};
|
||||
|
@ -212,10 +212,6 @@ impl NetworkContent {
|
|||
ExternalConnection::start_ext_conn_availability_check();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
View::title_button(ui, PLUS_CIRCLE, || {
|
||||
self.connections.show_add_ext_conn_modal(None, cb);
|
||||
});
|
||||
}
|
||||
}, |ui, _| {
|
||||
if !Root::is_dual_panel_mode(ui) {
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use egui::{Align, Id, Layout, RichText, TextStyle, Widget};
|
||||
use egui::{Id, RichText, Widget};
|
||||
|
||||
use crate::gui::Colors;
|
||||
use crate::gui::icons::{CLOCK_COUNTDOWN, EYE, EYE_SLASH, PASSWORD, PENCIL};
|
||||
use crate::gui::icons::{CLOCK_COUNTDOWN, PASSWORD, PENCIL};
|
||||
use crate::gui::platform::PlatformCallbacks;
|
||||
use crate::gui::views::{Modal, View};
|
||||
use crate::gui::views::types::{ModalPosition, TextEditOptions};
|
||||
|
@ -131,7 +131,7 @@ impl CommonSetup {
|
|||
});
|
||||
|
||||
ui.add_space(12.0);
|
||||
View::horizontal_line(ui, Colors::ITEM_STROKE);
|
||||
View::horizontal_line(ui, Colors::STROKE);
|
||||
ui.add_space(4.0);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -149,28 +149,28 @@ impl ConnectionSetup {
|
|||
|
||||
ui.add_space(2.0);
|
||||
View::sub_title(ui, format!("{} {}", GLOBE, t!("wallets.conn_method")));
|
||||
View::horizontal_line(ui, Colors::ITEM_STROKE);
|
||||
ui.add_space(4.0);
|
||||
View::horizontal_line(ui, Colors::STROKE);
|
||||
ui.add_space(6.0);
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
// Show integrated node selection.
|
||||
ui.add_space(6.0);
|
||||
self.integrated_node_item_ui(ui);
|
||||
|
||||
// Show external connections.
|
||||
ui.add_space(8.0);
|
||||
ui.label(RichText::new(t!("wallets.ext_conn")).size(16.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
|
||||
// Show button to add new external node connection.
|
||||
let add_node_text = format!("{} {}", PLUS_CIRCLE, t!("wallets.add_node"));
|
||||
View::button(ui, add_node_text, Colors::WHITE, || {
|
||||
self.show_add_ext_conn_modal(cb);
|
||||
});
|
||||
ui.add_space(12.0);
|
||||
|
||||
let ext_conn_list = ConnectionsConfig::ext_conn_list();
|
||||
if !ext_conn_list.is_empty() {
|
||||
ui.add_space(6.0);
|
||||
ui.label(RichText::new(t!("wallets.ext_conn")).size(16.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
|
||||
// Show button to add new external node connection.
|
||||
let add_node_text = format!("{} {}", PLUS_CIRCLE, t!("wallets.add_node"));
|
||||
View::button(ui, add_node_text, Colors::WHITE, || {
|
||||
self.show_add_ext_conn_modal(cb);
|
||||
});
|
||||
ui.add_space(12.0);
|
||||
|
||||
// Show external connections.
|
||||
for (index, conn) in ext_conn_list.iter().enumerate() {
|
||||
ui.horizontal_wrapped(|ui| {
|
||||
// Draw connection list item.
|
||||
|
@ -179,6 +179,9 @@ impl ConnectionSetup {
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
ui.add_space(10.0);
|
||||
View::horizontal_line(ui, Colors::STROKE);
|
||||
}
|
||||
|
||||
/// Draw integrated node connection item content.
|
||||
|
|
|
@ -59,11 +59,9 @@ impl RecoverySetup {
|
|||
// Show modal content for this ui container.
|
||||
self.modal_content_ui(ui, wallet, cb);
|
||||
|
||||
ui.add_space(10.0);
|
||||
View::horizontal_line(ui, Colors::ITEM_STROKE);
|
||||
ui.add_space(6.0);
|
||||
View::sub_title(ui, format!("{} {}", WRENCH, t!("wallets.recovery")));
|
||||
View::horizontal_line(ui, Colors::ITEM_STROKE);
|
||||
View::horizontal_line(ui, Colors::STROKE);
|
||||
ui.add_space(4.0);
|
||||
|
||||
ui.vertical_centered(|ui| {
|
||||
|
|
Loading…
Reference in a new issue