feat(app): version in window title and Help overlay

- csproj: add <Version>0.9.0</Version> as single source of truth
- AppVersion reads Major.Minor.Build from the assembly; WindowTitle
  exposes "Palladium Wallet 0.9.0" bound to Window.Title
- Menu Help → in-app overlay (same pattern as settings/server overlays)
  showing app name, version and a short description; backdrop tap and
  Esc close it
- i18n: menu.help, help.title, help.info in all 6 languages
This commit is contained in:
2026-06-12 12:01:08 +02:00
parent 4735490759
commit 865daa137d
5 changed files with 70 additions and 1 deletions
+9
View File
@@ -51,6 +51,15 @@ public sealed class Loc
["menu.net.discover"] = ["Cerca altri server (peer)", "Discover servers (peers)", "Buscar otros servidores (peers)", "Rechercher d'autres serveurs (pairs)", "Procurar outros servidores (peers)", "Weitere Server suchen (Peers)"], ["menu.net.discover"] = ["Cerca altri server (peer)", "Discover servers (peers)", "Buscar otros servidores (peers)", "Rechercher d'autres serveurs (pairs)", "Procurar outros servidores (peers)", "Weitere Server suchen (Peers)"],
["menu.net.resetcerts"] = ["Reset certificati SSL", "Reset SSL certificates", "Restablecer certificados SSL", "Réinitialiser les certificats SSL", "Redefinir certificados SSL", "SSL-Zertifikate zurücksetzen"], ["menu.net.resetcerts"] = ["Reset certificati SSL", "Reset SSL certificates", "Restablecer certificados SSL", "Réinitialiser les certificats SSL", "Redefinir certificados SSL", "SSL-Zertifikate zurücksetzen"],
["menu.settings"] = ["_Impostazioni", "_Settings", "_Configuración", "_Paramètres", "_Configurações", "_Einstellungen"], ["menu.settings"] = ["_Impostazioni", "_Settings", "_Configuración", "_Paramètres", "_Configurações", "_Einstellungen"],
["menu.help"] = ["_Help", "_Help", "_Ayuda", "_Aide", "_Ajuda", "_Hilfe"],
["help.title"] = ["Informazioni sul software", "About this software", "Información del software", "À propos du logiciel", "Sobre o software", "Über die Software"],
["help.info"] = [
"Wallet SPV per la criptovaluta Palladium (PLM).",
"SPV wallet for the Palladium (PLM) cryptocurrency.",
"Monedero SPV para la criptomoneda Palladium (PLM).",
"Portefeuille SPV pour la cryptomonnaie Palladium (PLM).",
"Carteira SPV para a criptomoeda Palladium (PLM).",
"SPV-Wallet für die Kryptowährung Palladium (PLM)."],
["settings.unit.short"] = ["Unità", "Unit", "Unidad", "Unité", "Unidade", "Einheit"], ["settings.unit.short"] = ["Unità", "Unit", "Unidad", "Unité", "Unidade", "Einheit"],
// Wizard // Wizard
+3
View File
@@ -2,6 +2,9 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework> <TargetFramework>net8.0</TargetFramework>
<!-- Versione dell'applicazione: unico punto da modificare. Compare nel
titolo della finestra ed è incisa nei binari pubblicati. -->
<Version>0.9.0</Version>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>Assets\logo.ico</ApplicationIcon> <ApplicationIcon>Assets\logo.ico</ApplicationIcon>
+19
View File
@@ -73,6 +73,15 @@ public partial class MainWindowViewModel : ViewModelBase
private Loc _loc = Loc.Instance; private Loc _loc = Loc.Instance;
public Loc Loc => _loc; public Loc Loc => _loc;
/// <summary>Versione dell'app (da &lt;Version&gt; nel csproj), formato Major.Minor.Patch.</summary>
public static string AppVersion =>
typeof(MainWindowViewModel).Assembly.GetName().Version is { } v
? $"{v.Major}.{v.Minor}.{v.Build}"
: "";
/// <summary>Titolo della finestra con la versione, es. "Palladium Wallet 0.9.0".</summary>
public string WindowTitle => $"Palladium Wallet {AppVersion}";
/// <summary>Unità corrente per il campo importo del pannello Invia.</summary> /// <summary>Unità corrente per il campo importo del pannello Invia.</summary>
public string UnitLabel => _config.Unit; public string UnitLabel => _config.Unit;
@@ -309,6 +318,16 @@ public partial class MainWindowViewModel : ViewModelBase
[RelayCommand] [RelayCommand]
private void CloseSettings() => IsSettingsOpen = false; private void CloseSettings() => IsSettingsOpen = false;
/// <summary>Overlay informazioni sul software (menu Help).</summary>
[ObservableProperty]
private bool isHelpOpen;
[RelayCommand]
private void OpenHelp() => IsHelpOpen = true;
[RelayCommand]
private void CloseHelp() => IsHelpOpen = false;
[ObservableProperty] [ObservableProperty]
private string connectionStatus = Loc.Tr("conn.none"); private string connectionStatus = Loc.Tr("conn.none");
+31 -1
View File
@@ -9,7 +9,7 @@
x:DataType="vm:MainWindowViewModel" x:DataType="vm:MainWindowViewModel"
Icon="/Assets/logo.ico" Icon="/Assets/logo.ico"
Width="900" Height="620" Width="900" Height="620"
Title="Palladium Wallet"> Title="{Binding WindowTitle}">
<Design.DataContext> <Design.DataContext>
<vm:MainWindowViewModel/> <vm:MainWindowViewModel/>
@@ -28,6 +28,8 @@
</MenuItem> </MenuItem>
<MenuItem Header="{Binding Loc[menu.settings]}" <MenuItem Header="{Binding Loc[menu.settings]}"
Command="{Binding OpenSettingsCommand}"/> Command="{Binding OpenSettingsCommand}"/>
<MenuItem Header="{Binding Loc[menu.help]}"
Command="{Binding OpenHelpCommand}"/>
</Menu> </Menu>
<!-- ============ WIZARD DI SETUP (§15): un passo alla volta ============ --> <!-- ============ WIZARD DI SETUP (§15): un passo alla volta ============ -->
@@ -714,5 +716,33 @@
</StackPanel> </StackPanel>
</Border> </Border>
</Border> </Border>
<!-- ============ OVERLAY HELP / INFORMAZIONI ============ -->
<!-- Stesso pattern dell'overlay impostazioni: apertura/chiusura istantanee. -->
<Border Grid.Row="0" Grid.RowSpan="3"
Background="#99000000"
Tapped="OnHelpOverlayBackdropTapped"
IsVisible="{Binding IsHelpOpen}">
<Border Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"
BorderBrush="Gray" BorderThickness="1" CornerRadius="8"
Width="460"
HorizontalAlignment="Center" VerticalAlignment="Center">
<StackPanel Margin="24" Spacing="16">
<TextBlock Text="{Binding Loc[help.title]}"
FontSize="18" FontWeight="Bold"/>
<StackPanel Spacing="4">
<TextBlock Text="Palladium Wallet" FontSize="16" FontWeight="Bold"/>
<TextBlock Text="{Binding WindowTitle}" FontSize="12" Foreground="Gray"/>
</StackPanel>
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
<Button Content="{Binding Loc[addr.close]}"
HorizontalAlignment="Right"
Command="{Binding CloseHelpCommand}"/>
</StackPanel>
</Border>
</Border>
</Grid> </Grid>
</Window> </Window>
+8
View File
@@ -128,6 +128,13 @@ public partial class MainWindow : Window
vm.IsSettingsOpen = false; vm.IsSettingsOpen = false;
} }
private void OnHelpOverlayBackdropTapped(object? sender, TappedEventArgs e)
{
if (!ReferenceEquals(e.Source, sender)) return;
if (DataContext is MainWindowViewModel vm)
vm.IsHelpOpen = false;
}
protected override void OnKeyDown(KeyEventArgs e) protected override void OnKeyDown(KeyEventArgs e)
{ {
if (e.Key == Key.Escape && DataContext is MainWindowViewModel vm) if (e.Key == Key.Escape && DataContext is MainWindowViewModel vm)
@@ -136,6 +143,7 @@ public partial class MainWindow : Window
if (vm.AddressInfo is not null) { 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; } if (vm.IsServerSettingsOpen) { vm.IsServerSettingsOpen = false; e.Handled = true; return; }
if (vm.IsSettingsOpen) { vm.IsSettingsOpen = false; e.Handled = true; return; } if (vm.IsSettingsOpen) { vm.IsSettingsOpen = false; e.Handled = true; return; }
if (vm.IsHelpOpen) { vm.IsHelpOpen = false; e.Handled = true; return; }
} }
base.OnKeyDown(e); base.OnKeyDown(e);
} }