From cf6e2d76549d435556cd05350a08f1158a28e4d2 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Fri, 12 Jun 2026 08:16:39 +0200 Subject: [PATCH] refactor(app): replace AddressInfoWindow with in-app overlay The address detail panel is now rendered as a modal overlay inside MainWindow instead of a separate top-level Window, avoiding the create/destroy cost of a dialog and working better under WSLg. Backdrop tap and Esc both close the overlay. --- src/App/ViewModels/MainWindowViewModel.cs | 11 +++++ src/App/Views/AddressInfoWindow.axaml | 49 -------------------- src/App/Views/AddressInfoWindow.axaml.cs | 20 --------- src/App/Views/MainWindow.axaml | 55 +++++++++++++++++++++++ src/App/Views/MainWindow.axaml.cs | 29 +++++++++--- 5 files changed, 89 insertions(+), 75 deletions(-) delete mode 100644 src/App/Views/AddressInfoWindow.axaml delete mode 100644 src/App/Views/AddressInfoWindow.axaml.cs diff --git a/src/App/ViewModels/MainWindowViewModel.cs b/src/App/ViewModels/MainWindowViewModel.cs index f8679fc..50ecde0 100644 --- a/src/App/ViewModels/MainWindowViewModel.cs +++ b/src/App/ViewModels/MainWindowViewModel.cs @@ -249,6 +249,17 @@ public partial class MainWindowViewModel : ViewModelBase [ObservableProperty] private AddressRow? selectedAddressRow; + /// Dettaglio indirizzo mostrato nell'overlay in-app; null = nascosto. + [ObservableProperty] + private AddressInfo? addressInfo; + + /// Apre l'overlay con i dati dell'indirizzo passato. + public void ShowAddressInfo(AddressRow row) => + AddressInfo = new AddressInfo(Loc, row.Indirizzo, row.DerivPath, row.PubKey, row.PrivKey); + + [RelayCommand] + private void CloseAddressInfo() => AddressInfo = null; + // ---- rubrica contatti ---- public ObservableCollection Contacts { get; } = []; diff --git a/src/App/Views/AddressInfoWindow.axaml b/src/App/Views/AddressInfoWindow.axaml deleted file mode 100644 index c451f1b..0000000 --- a/src/App/Views/AddressInfoWindow.axaml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - -