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:
@@ -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.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.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"],
|
||||
|
||||
// Wizard
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<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>
|
||||
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||
<ApplicationIcon>Assets\logo.ico</ApplicationIcon>
|
||||
|
||||
@@ -73,6 +73,15 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
private Loc _loc = Loc.Instance;
|
||||
public Loc Loc => _loc;
|
||||
|
||||
/// <summary>Versione dell'app (da <Version> 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>
|
||||
public string UnitLabel => _config.Unit;
|
||||
|
||||
@@ -309,6 +318,16 @@ public partial class MainWindowViewModel : ViewModelBase
|
||||
[RelayCommand]
|
||||
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]
|
||||
private string connectionStatus = Loc.Tr("conn.none");
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Icon="/Assets/logo.ico"
|
||||
Width="900" Height="620"
|
||||
Title="Palladium Wallet">
|
||||
Title="{Binding WindowTitle}">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:MainWindowViewModel/>
|
||||
@@ -28,6 +28,8 @@
|
||||
</MenuItem>
|
||||
<MenuItem Header="{Binding Loc[menu.settings]}"
|
||||
Command="{Binding OpenSettingsCommand}"/>
|
||||
<MenuItem Header="{Binding Loc[menu.help]}"
|
||||
Command="{Binding OpenHelpCommand}"/>
|
||||
</Menu>
|
||||
|
||||
<!-- ============ WIZARD DI SETUP (§15): un passo alla volta ============ -->
|
||||
@@ -714,5 +716,33 @@
|
||||
</StackPanel>
|
||||
</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>
|
||||
</Window>
|
||||
|
||||
@@ -128,6 +128,13 @@ public partial class MainWindow : Window
|
||||
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)
|
||||
{
|
||||
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.IsServerSettingsOpen) { vm.IsServerSettingsOpen = 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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user