feat(help): Submit an issue and Community support links #113
No files matched your search
@@ -30,7 +30,10 @@
|
||||
<MenuFlyoutItem Text="Activity log…" AccessKey="A" AutomationProperties.AutomationId="MenuActivityLog" Click="ActivityLogMenuItem_Click" />
|
||||
</MenuBarItem>
|
||||
<MenuBarItem Title="Help" AccessKey="H">
|
||||
<MenuFlyoutItem Text="View on GitHub" AccessKey="G" Click="GitHubMenuItem_Click" />
|
||||
<MenuFlyoutItem Text="View on GitHub" AccessKey="G" AutomationProperties.AutomationId="MenuGitHub" Click="GitHubMenuItem_Click" />
|
||||
<MenuFlyoutItem Text="Submit an issue…" AccessKey="I" AutomationProperties.AutomationId="MenuSubmitIssue" ToolTipService.ToolTip="Report a bug or request a feature on GitHub" Click="SubmitIssueMenuItem_Click" />
|
||||
<MenuFlyoutItem Text="Community support…" AccessKey="S" AutomationProperties.AutomationId="MenuCommunitySupport" ToolTipService.ToolTip="Ask a question or share tips in GitHub Discussions" Click="CommunitySupportMenuItem_Click" />
|
||||
<MenuFlyoutSeparator />
|
||||
<MenuFlyoutItem x:Name="CheckUpdatesMenuItem" Text="Check for updates…" AccessKey="C" AutomationProperties.AutomationId="MenuCheckUpdates" Click="CheckForUpdatesMenuItem_Click" />
|
||||
<MenuFlyoutSeparator />
|
||||
<MenuFlyoutItem Text="About gclo…" AccessKey="A" AutomationProperties.AutomationId="MenuAbout" Click="AboutMenuItem_Click">
|
||||
|
||||
+21
-2
@@ -1132,9 +1132,28 @@ public sealed partial class MainWindow : Window
|
||||
|
||||
|
||||
private async void GitHubMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
=> await OpenRepositoryPageAsync("");
|
||||
|
||||
|
||||
|
||||
/// <summary>Help > Submit an issue: GitHub's new-issue chooser (bug report / feature request templates).</summary>
|
||||
private async void SubmitIssueMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
=> await OpenRepositoryPageAsync("/issues/new/choose");
|
||||
|
||||
|
||||
|
||||
/// <summary>Help > Community support: the repository's GitHub Discussions.</summary>
|
||||
private async void CommunitySupportMenuItem_Click(object sender, RoutedEventArgs e)
|
||||
=> await OpenRepositoryPageAsync("/discussions");
|
||||
|
||||
|
||||
|
||||
/// <summary>Opens a page of the repository in the default browser; the log names the page, never a token.</summary>
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user