feat(app): server settings as in-app overlay, split host/port fields
- Moves server configuration from the wallet panel into an overlay (Impostazioni → Server), same pattern as the address detail overlay - Splits the single "host:port" text box into separate Host and Port fields; port changes auto-toggle the TLS checkbox when the typed port matches a known SSL/TCP port, and vice-versa - Adds DisconnectAsync() so changing server/TLS reconnects to the new endpoint instead of reusing the old socket - Adds i18n keys (IT/EN/ES/FR/PT/DE) for the new overlay - Removes the server row from the main wallet panel; connection status indicator (green/red dot) is now shown in the wallet header
This commit is contained in:
@@ -65,13 +65,19 @@ public partial class MainWindow : Window
|
||||
vm.AddressInfo = null;
|
||||
}
|
||||
|
||||
private void OnServerOverlayBackdropTapped(object? sender, TappedEventArgs e)
|
||||
{
|
||||
if (!ReferenceEquals(e.Source, sender)) return;
|
||||
if (DataContext is MainWindowViewModel vm)
|
||||
vm.IsServerSettingsOpen = false;
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
if (e.Key == Key.Escape && DataContext is MainWindowViewModel { AddressInfo: not null } vm)
|
||||
if (e.Key == Key.Escape && DataContext is MainWindowViewModel vm)
|
||||
{
|
||||
vm.AddressInfo = null;
|
||||
e.Handled = true;
|
||||
return;
|
||||
if (vm.AddressInfo is not null) { vm.AddressInfo = null; e.Handled = true; return; }
|
||||
if (vm.IsServerSettingsOpen) { vm.IsServerSettingsOpen = false; e.Handled = true; return; }
|
||||
}
|
||||
base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user