diff --git a/src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs b/src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs index f161ed36c2..fa65012187 100644 --- a/src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs +++ b/src/GitHub.App/ViewModels/GitHubPane/GitHubPaneViewModel.cs @@ -160,6 +160,14 @@ public GitHubPaneViewModel( }, currentPage.Select(x => x is IOpenInBrowser)); + BrowseRepository = ReactiveCommand.Create( + () => + { + var url = LocalRepository.CloneUrl.ToRepositoryUrl(); + if (url != null) browser.OpenUrl(url); + }, + currentPage.Select(x => x is IOpenInBrowser)); + help = ReactiveCommand.Create(() => { }); help.Subscribe(_ => { @@ -531,5 +539,7 @@ static Regex CreateRoute(string route) var routeFormat = "^" + new Regex("(:([a-z]+))\\b").Replace(route, @"(?<$2>[\w_.\-=]+)") + "$"; return new Regex(routeFormat, RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase); } + + public ReactiveCommand BrowseRepository { get; } } } diff --git a/src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml b/src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml index f6c832966f..83a25537bd 100644 --- a/src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml +++ b/src/GitHub.VisualStudio.UI/Views/GitHubPane/GitHubPaneView.xaml @@ -57,11 +57,8 @@ - - + +