mirror of
https://github.com/jwinterm/grim.git
synced 2026-10-21 23:48:34 +02:00
ui: network type label, update translations
This commit is contained in:
@@ -87,6 +87,7 @@ impl ConnectionsContent {
|
||||
// Show network type selection.
|
||||
let saved_chain_type = AppConfig::chain_type();
|
||||
NodeSetup::chain_type_ui(ui);
|
||||
|
||||
// Start external connections availability check on network type change.
|
||||
if saved_chain_type != AppConfig::chain_type() {
|
||||
ExternalConnection::start_ext_conn_availability_check();
|
||||
|
||||
@@ -221,6 +221,11 @@ impl NodeSetup {
|
||||
|
||||
/// Draw [`ChainTypes`] setup content.
|
||||
pub fn chain_type_ui(ui: &mut egui::Ui) {
|
||||
ui.add_space(1.0);
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.label(RichText::new(t!("network.type")).size(16.0).color(Colors::GRAY));
|
||||
});
|
||||
|
||||
let saved_chain_type = AppConfig::chain_type();
|
||||
let mut selected_chain_type = saved_chain_type;
|
||||
|
||||
@@ -245,10 +250,7 @@ impl NodeSetup {
|
||||
|
||||
/// Draw API port setup content.
|
||||
fn api_port_setup_ui(&mut self, ui: &mut egui::Ui, cb: &dyn PlatformCallbacks) {
|
||||
ui.label(RichText::new(t!("network_settings.api_port"))
|
||||
.size(16.0)
|
||||
.color(Colors::GRAY)
|
||||
);
|
||||
ui.label(RichText::new(t!("network_settings.api_port")).size(16.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
|
||||
let (_, port) = NodeConfig::get_api_ip_port();
|
||||
@@ -280,9 +282,7 @@ impl NodeSetup {
|
||||
fn api_port_modal(&mut self, ui: &mut egui::Ui, modal: &Modal, cb: &dyn PlatformCallbacks) {
|
||||
ui.add_space(6.0);
|
||||
ui.vertical_centered(|ui| {
|
||||
ui.label(RichText::new(t!("network_settings.api_port"))
|
||||
.size(17.0)
|
||||
.color(Colors::GRAY));
|
||||
ui.label(RichText::new(t!("network_settings.api_port")).size(17.0).color(Colors::GRAY));
|
||||
ui.add_space(6.0);
|
||||
|
||||
// Draw API port text edit.
|
||||
|
||||
Reference in New Issue
Block a user