feat(ui): add user guide button to help overlay
Adds a "User guide" button next to "Report a bug" in the Help > Info tab, linking to USERGUIDE.md on GitHub via the same Launcher pattern used for bug reports and release pages.
This commit is contained in:
@@ -63,6 +63,7 @@ public sealed class Loc
|
|||||||
["help.tab.info"] = ["Info", "Info", "Info", "Info", "Info", "Info"],
|
["help.tab.info"] = ["Info", "Info", "Info", "Info", "Info", "Info"],
|
||||||
["help.tab.donate"] = ["Dona", "Donate", "Donar", "Faire un don", "Doar", "Spenden"],
|
["help.tab.donate"] = ["Dona", "Donate", "Donar", "Faire un don", "Doar", "Spenden"],
|
||||||
["help.bug.report"] = ["Segnala un bug", "Report a bug", "Informar un error", "Signaler un bug", "Reportar um bug", "Fehler melden"],
|
["help.bug.report"] = ["Segnala un bug", "Report a bug", "Informar un error", "Signaler un bug", "Reportar um bug", "Fehler melden"],
|
||||||
|
["help.user.guide"] = ["Guida utente", "User guide", "Guía del usuario", "Guide utilisateur", "Guia do usuário", "Benutzerhandbuch"],
|
||||||
["update.title"] = ["Aggiornamento disponibile", "Update available", "Actualización disponible", "Mise à jour disponible", "Atualização disponível", "Update verfügbar"],
|
["update.title"] = ["Aggiornamento disponibile", "Update available", "Actualización disponible", "Mise à jour disponible", "Atualização disponível", "Update verfügbar"],
|
||||||
["update.message"] = ["È disponibile una nuova versione:", "A new version is available:", "Hay una nueva versión disponible:", "Une nouvelle version est disponible :", "Uma nova versão está disponível:", "Eine neue Version ist verfügbar:"],
|
["update.message"] = ["È disponibile una nuova versione:", "A new version is available:", "Hay una nueva versión disponible:", "Une nouvelle version est disponible :", "Uma nova versão está disponível:", "Eine neue Version ist verfügbar:"],
|
||||||
["update.download"] = ["Scarica", "Download", "Descargar", "Télécharger", "Baixar", "Herunterladen"],
|
["update.download"] = ["Scarica", "Download", "Descargar", "Télécharger", "Baixar", "Herunterladen"],
|
||||||
|
|||||||
@@ -1563,9 +1563,14 @@
|
|||||||
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
Foreground="{DynamicResource TextSecondaryBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
|
<TextBlock Text="{Binding Loc[help.info]}" TextWrapping="Wrap"/>
|
||||||
|
<StackPanel Orientation="Horizontal" Spacing="8">
|
||||||
<Button Content="{Binding Loc[help.bug.report]}"
|
<Button Content="{Binding Loc[help.bug.report]}"
|
||||||
Click="OnOpenBugReportClick"
|
Click="OnOpenBugReportClick"
|
||||||
HorizontalAlignment="Left"/>
|
HorizontalAlignment="Left"/>
|
||||||
|
<Button Content="{Binding Loc[help.user.guide]}"
|
||||||
|
Click="OnOpenUserGuideClick"
|
||||||
|
HorizontalAlignment="Left"/>
|
||||||
|
</StackPanel>
|
||||||
<Border BorderBrush="{DynamicResource BorderSubtleBrush}"
|
<Border BorderBrush="{DynamicResource BorderSubtleBrush}"
|
||||||
BorderThickness="0,1,0,0" Margin="0,4,0,0"/>
|
BorderThickness="0,1,0,0" Margin="0,4,0,0"/>
|
||||||
<StackPanel Spacing="4">
|
<StackPanel Spacing="4">
|
||||||
|
|||||||
@@ -144,6 +144,14 @@ public partial class MainView : UserControl
|
|||||||
await launcher.LaunchUriAsync(new Uri(issueUrl));
|
await launcher.LaunchUriAsync(new Uri(issueUrl));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async void OnOpenUserGuideClick(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
const string userGuideUrl = "https://github.com/davide3011/PalladiumWallet/blob/main/USERGUIDE.md";
|
||||||
|
var launcher = TopLevel.GetTopLevel(this)?.Launcher;
|
||||||
|
if (launcher is not null)
|
||||||
|
await launcher.LaunchUriAsync(new Uri(userGuideUrl));
|
||||||
|
}
|
||||||
|
|
||||||
private async void OnOpenReleasePageClick(object? sender, RoutedEventArgs e)
|
private async void OnOpenReleasePageClick(object? sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
if (DataContext is not MainWindowViewModel vm || string.IsNullOrEmpty(vm.UpdateReleaseUrl)) return;
|
if (DataContext is not MainWindowViewModel vm || string.IsNullOrEmpty(vm.UpdateReleaseUrl)) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user