mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-28 17:28:32 +01:00
ui: move connections add button from panel, wallet settings titles lines color
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user