From df4a68956308315bd2bf6c8c4bbb697d2312fc39 Mon Sep 17 00:00:00 2001 From: James Maes Date: Sat, 10 Oct 2026 18:08:59 -0500 Subject: [PATCH] feat(help): Submit an issue and Community support links Two Help menu items open the repository's GitHub pages in the default browser, like View on GitHub: the new-issue chooser (the bug and feature templates) and Discussions. The log names the page. Closes #108 Co-Authored-By: Claude Fable 5.1 Signed-off-by: James Maes --- gclo/MainWindow.xaml | 5 ++++- gclo/MainWindow.xaml.cs | 23 +++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/gclo/MainWindow.xaml b/gclo/MainWindow.xaml index 031bb99..c692f7e 100644 --- a/gclo/MainWindow.xaml +++ b/gclo/MainWindow.xaml @@ -30,7 +30,10 @@ - + + + + diff --git a/gclo/MainWindow.xaml.cs b/gclo/MainWindow.xaml.cs index a515722..f03711e 100644 --- a/gclo/MainWindow.xaml.cs +++ b/gclo/MainWindow.xaml.cs @@ -1132,9 +1132,28 @@ public sealed partial class MainWindow : Window private async void GitHubMenuItem_Click(object sender, RoutedEventArgs e) + => await OpenRepositoryPageAsync(""); + + + + /// Help > Submit an issue: GitHub's new-issue chooser (bug report / feature request templates). + private async void SubmitIssueMenuItem_Click(object sender, RoutedEventArgs e) + => await OpenRepositoryPageAsync("/issues/new/choose"); + + + + /// Help > Community support: the repository's GitHub Discussions. + private async void CommunitySupportMenuItem_Click(object sender, RoutedEventArgs e) + => await OpenRepositoryPageAsync("/discussions"); + + + + /// Opens a page of the repository in the default browser; the log names the page, never a token. + private async Task OpenRepositoryPageAsync(string path) { - _log.Info($"Opening {RepoUrl} in the browser."); - await Windows.System.Launcher.LaunchUriAsync(new Uri(RepoUrl)); + string url = RepoUrl + path; + _log.Info($"Opening {url} in the browser."); + await Windows.System.Launcher.LaunchUriAsync(new Uri(url)); } -- 2.54.0