feat(app): server selector, peer discovery, address view, menu bar, keep-alive

This commit is contained in:
2026-06-11 11:27:41 +02:00
parent 08217e5306
commit 46d8c19784
3 changed files with 283 additions and 31 deletions
+35 -11
View File
@@ -1,11 +1,35 @@
using Avalonia.Controls;
namespace PalladiumWallet.App.Views;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
}
using System.Linq;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Platform.Storage;
using PalladiumWallet.App.ViewModels;
namespace PalladiumWallet.App.Views;
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
/// <summary>File → Apri wallet da file (il picker richiede il TopLevel, da qui).</summary>
private async void OnOpenWalletFileClick(object? sender, RoutedEventArgs e)
{
if (DataContext is not MainWindowViewModel vm)
return;
var files = await StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions
{
Title = "Apri file wallet",
AllowMultiple = false,
FileTypeFilter =
[
new FilePickerFileType("Wallet Palladium") { Patterns = ["*.wallet.json", "*.json"] },
],
});
if (files.FirstOrDefault()?.TryGetLocalPath() is { } path)
vm.OpenFromPath(path);
}
}