2026-06-11 10:47:52 +02:00
|
|
|
<Window xmlns="https://github.com/avaloniaui"
|
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
|
xmlns:vm="using:PalladiumWallet.App.ViewModels"
|
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="620"
|
|
|
|
|
x:Class="PalladiumWallet.App.Views.MainWindow"
|
|
|
|
|
x:DataType="vm:MainWindowViewModel"
|
|
|
|
|
Icon="/Assets/avalonia-logo.ico"
|
|
|
|
|
Width="900" Height="620"
|
|
|
|
|
Title="Palladium Wallet">
|
|
|
|
|
|
|
|
|
|
<Design.DataContext>
|
|
|
|
|
<vm:MainWindowViewModel/>
|
|
|
|
|
</Design.DataContext>
|
|
|
|
|
|
2026-06-11 11:27:41 +02:00
|
|
|
<Grid RowDefinitions="Auto,*,Auto">
|
|
|
|
|
|
|
|
|
|
<!-- ============ MENU (stile Electrum) ============ -->
|
|
|
|
|
<Menu Grid.Row="0">
|
|
|
|
|
<MenuItem Header="_File">
|
|
|
|
|
<MenuItem Header="Nuovo / ripristina wallet…" Command="{Binding NewWalletCommand}"/>
|
|
|
|
|
<MenuItem Header="Apri wallet da file…" Click="OnOpenWalletFileClick"/>
|
|
|
|
|
<Separator/>
|
|
|
|
|
<MenuItem Header="Chiudi wallet" Command="{Binding CloseWalletCommand}"
|
|
|
|
|
IsEnabled="{Binding IsWalletOpen}"/>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
<MenuItem Header="_Rete">
|
|
|
|
|
<MenuItem Header="Cerca altri server (peer)" Command="{Binding DiscoverServersCommand}"/>
|
|
|
|
|
<MenuItem Header="Reset certificati SSL" Command="{Binding ResetCertificatesCommand}"/>
|
|
|
|
|
</MenuItem>
|
|
|
|
|
</Menu>
|
2026-06-11 10:47:52 +02:00
|
|
|
|
2026-06-11 16:04:25 +02:00
|
|
|
<!-- ============ WIZARD DI SETUP (§15): un passo alla volta ============ -->
|
2026-06-11 11:27:41 +02:00
|
|
|
<ScrollViewer Grid.Row="1" IsVisible="{Binding IsSetupVisible}">
|
2026-06-11 16:04:25 +02:00
|
|
|
<StackPanel MaxWidth="560" Margin="24,40" Spacing="18"
|
|
|
|
|
HorizontalAlignment="Center">
|
|
|
|
|
<TextBlock Text="Palladium Wallet" FontSize="28" FontWeight="Bold"
|
|
|
|
|
HorizontalAlignment="Center"/>
|
2026-06-11 10:47:52 +02:00
|
|
|
|
2026-06-11 16:04:25 +02:00
|
|
|
<!-- Passo 1: scelta iniziale -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepStart}" Spacing="12">
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10" HorizontalAlignment="Center">
|
|
|
|
|
<TextBlock Text="Rete:" VerticalAlignment="Center"/>
|
|
|
|
|
<ComboBox ItemsSource="{Binding Networks}"
|
|
|
|
|
SelectedItem="{Binding SelectedNetwork}" MinWidth="140"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Button Content="Apri il wallet esistente" FontSize="16"
|
|
|
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
|
|
|
|
IsVisible="{Binding WalletFileExists}"
|
|
|
|
|
Command="{Binding WizardStartOpenCommand}"/>
|
|
|
|
|
<Button Content="Crea un nuovo wallet" FontSize="16"
|
|
|
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
|
|
|
|
Command="{Binding WizardStartNewCommand}"/>
|
|
|
|
|
<Button Content="Ripristina da seed" FontSize="16"
|
|
|
|
|
HorizontalAlignment="Stretch" HorizontalContentAlignment="Center"
|
|
|
|
|
Command="{Binding WizardStartRestoreCommand}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Passo: password del wallet esistente -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepOpen}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Apri il wallet" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<TextBox PlaceholderText="Password del file (vuoto se non impostata)"
|
|
|
|
|
PasswordChar="●" Text="{Binding PasswordInput}"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Apri" Classes="accent" Command="{Binding OpenExistingCommand}"/>
|
|
|
|
|
</StackPanel>
|
2026-06-11 10:47:52 +02:00
|
|
|
</StackPanel>
|
|
|
|
|
|
2026-06-11 16:04:25 +02:00
|
|
|
<!-- Passo: mostra il nuovo seed -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepShowSeed}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Il tuo seed (12 parole)" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<Border BorderBrush="{DynamicResource SystemAccentColor}" BorderThickness="1"
|
|
|
|
|
CornerRadius="6" Padding="14">
|
|
|
|
|
<SelectableTextBlock Text="{Binding MnemonicInput}"
|
|
|
|
|
FontFamily="monospace" FontSize="16" TextWrapping="Wrap"/>
|
|
|
|
|
</Border>
|
|
|
|
|
<TextBlock Foreground="Orange" TextWrapping="Wrap"
|
|
|
|
|
Text="Scrivi le parole su carta, nell'ordine. Chi le possiede controlla i fondi; se le perdi, i fondi sono irrecuperabili."/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Le ho scritte — Avanti" Classes="accent"
|
|
|
|
|
Command="{Binding WizardNextFromShowSeedCommand}"/>
|
2026-06-11 10:47:52 +02:00
|
|
|
</StackPanel>
|
2026-06-11 16:04:25 +02:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Passo: conferma del seed -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepConfirmSeed}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Conferma il seed" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<TextBox PlaceholderText="Reinserisci le 12 parole separate da spazi"
|
|
|
|
|
AcceptsReturn="False" Text="{Binding ConfirmMnemonicInput}"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Avanti" Classes="accent"
|
|
|
|
|
Command="{Binding WizardNextFromConfirmSeedCommand}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
2026-06-11 10:47:52 +02:00
|
|
|
|
2026-06-11 16:04:25 +02:00
|
|
|
<!-- Passo: inserimento seed (ripristino) -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepWords}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Ripristina da seed" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<TextBox PlaceholderText="Mnemonica BIP39 (12 o 24 parole separate da spazi)"
|
|
|
|
|
AcceptsReturn="False" Text="{Binding MnemonicInput}"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Avanti" Classes="accent"
|
|
|
|
|
Command="{Binding WizardNextFromWordsCommand}"/>
|
2026-06-11 10:47:52 +02:00
|
|
|
</StackPanel>
|
2026-06-11 16:04:25 +02:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Passo: passphrase opzionale -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepPassphrase}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Passphrase opzionale" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<TextBox PlaceholderText="Lascia vuoto per non usarla"
|
|
|
|
|
Text="{Binding PassphraseInput}"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Avanti" Classes="accent"
|
|
|
|
|
Command="{Binding WizardNextFromPassphraseCommand}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
|
|
<!-- Passo finale: password del file -->
|
|
|
|
|
<StackPanel IsVisible="{Binding IsStepPassword}" Spacing="12">
|
|
|
|
|
<TextBlock Text="Password del file wallet" FontSize="18" FontWeight="Bold"/>
|
|
|
|
|
<TextBox PlaceholderText="Consigliata (vuoto = file in chiaro su disco)"
|
|
|
|
|
PasswordChar="●" Text="{Binding PasswordInput}"/>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Indietro" Command="{Binding WizardBackCommand}"/>
|
|
|
|
|
<Button Content="Crea il wallet" Classes="accent"
|
|
|
|
|
Command="{Binding CreateOrRestoreCommand}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</StackPanel>
|
2026-06-11 10:47:52 +02:00
|
|
|
</StackPanel>
|
|
|
|
|
</ScrollViewer>
|
|
|
|
|
|
|
|
|
|
<!-- ============ PANNELLO WALLET ============ -->
|
2026-06-11 11:27:41 +02:00
|
|
|
<Grid Grid.Row="1" RowDefinitions="Auto,Auto,*" IsVisible="{Binding IsWalletOpen}" Margin="16">
|
2026-06-11 10:47:52 +02:00
|
|
|
|
|
|
|
|
<!-- Testata: saldo + rete + chiudi -->
|
|
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="*,Auto">
|
|
|
|
|
<StackPanel Grid.Column="0" Spacing="2">
|
|
|
|
|
<TextBlock Text="{Binding BalanceText}" FontSize="30" FontWeight="Bold"/>
|
|
|
|
|
<TextBlock Text="{Binding UnconfirmedText}" Foreground="Orange"/>
|
|
|
|
|
<TextBlock Text="{Binding NetworkInfo}" FontSize="12" Foreground="Gray"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<Button Grid.Column="1" Content="Chiudi wallet" VerticalAlignment="Top"
|
|
|
|
|
Command="{Binding CloseWalletCommand}"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<!-- Server -->
|
|
|
|
|
<Border Grid.Row="1" Margin="0,12,0,12" Padding="10"
|
|
|
|
|
BorderBrush="Gray" BorderThickness="1" CornerRadius="6">
|
2026-06-11 11:27:41 +02:00
|
|
|
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto,Auto">
|
|
|
|
|
<TextBlock Grid.Row="0" Grid.Column="0" Text="Server:"
|
|
|
|
|
VerticalAlignment="Center" Margin="0,0,8,0"/>
|
|
|
|
|
<ComboBox Grid.Row="0" Grid.Column="1"
|
|
|
|
|
ItemsSource="{Binding KnownServers}"
|
|
|
|
|
SelectedItem="{Binding SelectedKnownServer}"
|
|
|
|
|
HorizontalAlignment="Stretch"/>
|
|
|
|
|
<CheckBox Grid.Row="0" Grid.Column="2" Content="TLS"
|
|
|
|
|
IsChecked="{Binding UseSsl}" Margin="8,0"/>
|
|
|
|
|
<Button Grid.Row="0" Grid.Column="3" Content="Connetti e sincronizza"
|
2026-06-11 10:47:52 +02:00
|
|
|
Command="{Binding ConnectAndSyncCommand}" IsEnabled="{Binding !IsSyncing}"/>
|
2026-06-11 11:27:41 +02:00
|
|
|
|
|
|
|
|
<StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal"
|
|
|
|
|
Spacing="8" Margin="0,8,0,0">
|
|
|
|
|
<TextBox Text="{Binding ServerInput}" MinWidth="220"
|
|
|
|
|
PlaceholderText="oppure host:porta manuale"/>
|
|
|
|
|
<Button Content="Cerca altri server"
|
|
|
|
|
Command="{Binding DiscoverServersCommand}"/>
|
|
|
|
|
<Button Content="Reset cert."
|
|
|
|
|
Command="{Binding ResetCertificatesCommand}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<StackPanel Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2"
|
|
|
|
|
Orientation="Horizontal" Spacing="6" Margin="8,8,0,0"
|
|
|
|
|
VerticalAlignment="Center">
|
|
|
|
|
<Ellipse Width="10" Height="10" Fill="LimeGreen"
|
|
|
|
|
IsVisible="{Binding IsConnected}"/>
|
|
|
|
|
<Ellipse Width="10" Height="10" Fill="IndianRed"
|
|
|
|
|
IsVisible="{Binding !IsConnected}"/>
|
|
|
|
|
<TextBlock Text="{Binding ConnectionStatus}" Foreground="Gray"/>
|
|
|
|
|
</StackPanel>
|
2026-06-11 10:47:52 +02:00
|
|
|
</Grid>
|
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
<!-- Tab: Ricevi / Storico / Invia -->
|
|
|
|
|
<TabControl Grid.Row="2">
|
|
|
|
|
<TabItem Header="Ricevi">
|
|
|
|
|
<StackPanel Spacing="10" Margin="8">
|
|
|
|
|
<TextBlock Text="Prossimo indirizzo non usato:"/>
|
|
|
|
|
<SelectableTextBlock Text="{Binding ReceiveAddress}"
|
|
|
|
|
FontFamily="monospace" FontSize="16"/>
|
|
|
|
|
<TextBlock Text="Ogni pagamento ricevuto qui comparirà nello storico alla prossima sincronizzazione."
|
|
|
|
|
Foreground="Gray" FontSize="12" TextWrapping="Wrap"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
|
|
<TabItem Header="Storico">
|
|
|
|
|
<ListBox ItemsSource="{Binding History}" Margin="4">
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate x:DataType="vm:HistoryRow">
|
|
|
|
|
<Grid ColumnDefinitions="90,160,*,70">
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Conferma}" Foreground="Gray"/>
|
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Importo}" FontFamily="monospace"/>
|
|
|
|
|
<SelectableTextBlock Grid.Column="2" Text="{Binding Txid}"
|
|
|
|
|
FontFamily="monospace" FontSize="12"/>
|
|
|
|
|
<TextBlock Grid.Column="3" Text="{Binding Verificata}" Foreground="Green"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
|
</ListBox>
|
|
|
|
|
</TabItem>
|
|
|
|
|
|
2026-06-11 11:27:41 +02:00
|
|
|
<TabItem Header="Indirizzi">
|
|
|
|
|
<Grid RowDefinitions="Auto,*" Margin="4">
|
|
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="90,60,*,140,60" Margin="12,4">
|
|
|
|
|
<TextBlock Grid.Column="0" Text="Tipo" FontWeight="Bold"/>
|
|
|
|
|
<TextBlock Grid.Column="1" Text="Indice" FontWeight="Bold"/>
|
|
|
|
|
<TextBlock Grid.Column="2" Text="Indirizzo" FontWeight="Bold"/>
|
|
|
|
|
<TextBlock Grid.Column="3" Text="Saldo" FontWeight="Bold"/>
|
|
|
|
|
<TextBlock Grid.Column="4" Text="Tx" FontWeight="Bold"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
<ListBox Grid.Row="1" ItemsSource="{Binding Addresses}">
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
|
<DataTemplate x:DataType="vm:AddressRow">
|
|
|
|
|
<Grid ColumnDefinitions="90,60,*,140,60">
|
|
|
|
|
<TextBlock Grid.Column="0" Text="{Binding Tipo}" Foreground="Gray"/>
|
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Indice}" Foreground="Gray"/>
|
|
|
|
|
<SelectableTextBlock Grid.Column="2" Text="{Binding Indirizzo}"
|
|
|
|
|
FontFamily="monospace" FontSize="13"/>
|
|
|
|
|
<TextBlock Grid.Column="3" Text="{Binding Saldo}" FontFamily="monospace"/>
|
|
|
|
|
<TextBlock Grid.Column="4" Text="{Binding NumTx}" Foreground="Gray"/>
|
|
|
|
|
</Grid>
|
|
|
|
|
</DataTemplate>
|
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
|
</ListBox>
|
|
|
|
|
</Grid>
|
|
|
|
|
</TabItem>
|
|
|
|
|
|
2026-06-11 10:47:52 +02:00
|
|
|
<TabItem Header="Invia">
|
|
|
|
|
<StackPanel Spacing="10" Margin="8" MaxWidth="640" HorizontalAlignment="Left">
|
|
|
|
|
<TextBox PlaceholderText="Indirizzo destinatario" Text="{Binding SendTo}"
|
|
|
|
|
FontFamily="monospace"/>
|
|
|
|
|
<Grid ColumnDefinitions="*,Auto,Auto">
|
|
|
|
|
<TextBox Grid.Column="0" PlaceholderText="Importo (es. 1.5)"
|
|
|
|
|
Text="{Binding SendAmount}" IsEnabled="{Binding !SendAll}"/>
|
|
|
|
|
<CheckBox Grid.Column="1" Content="Invia tutto" Margin="10,0"
|
|
|
|
|
IsChecked="{Binding SendAll}"/>
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="6">
|
|
|
|
|
<TextBlock Text="fee sat/vB:" VerticalAlignment="Center"/>
|
|
|
|
|
<TextBox Text="{Binding SendFeeRate}" MinWidth="60"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
<StackPanel Orientation="Horizontal" Spacing="10">
|
|
|
|
|
<Button Content="Prepara transazione" Command="{Binding PrepareSendCommand}"/>
|
|
|
|
|
<Button Content="CONFERMA E TRASMETTI" Classes="accent"
|
|
|
|
|
Command="{Binding ConfirmSendCommand}"
|
|
|
|
|
IsEnabled="{Binding HasPendingSend}"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
<SelectableTextBlock Text="{Binding SendPreview}" TextWrapping="Wrap"
|
|
|
|
|
FontSize="13"/>
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</TabItem>
|
|
|
|
|
</TabControl>
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
<!-- Barra di stato -->
|
2026-06-11 11:27:41 +02:00
|
|
|
<Border Grid.Row="2" Background="{DynamicResource SystemControlBackgroundChromeMediumBrush}"
|
2026-06-11 10:47:52 +02:00
|
|
|
Padding="10,6">
|
|
|
|
|
<TextBlock Text="{Binding StatusMessage}" FontSize="12" TextWrapping="Wrap"/>
|
|
|
|
|
</Border>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|