mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 19:55:00 +00:00
feature: supports visit remote url in browser
This commit is contained in:
parent
3afb134037
commit
ad2fc68c6b
6 changed files with 58 additions and 9 deletions
|
@ -1214,6 +1214,21 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var menu = new ContextMenu();
|
||||
|
||||
if (remote.TryGetVisitURL(out string visitURL))
|
||||
{
|
||||
var visit = new MenuItem();
|
||||
visit.Header = App.Text("RemoteCM.OpenInBrowser");
|
||||
visit.Icon = App.CreateMenuIcon("Icons.OpenWith");
|
||||
visit.Click += (o, e) =>
|
||||
{
|
||||
Native.OS.OpenBrowser(visitURL);
|
||||
e.Handled = true;
|
||||
};
|
||||
|
||||
menu.Items.Add(visit);
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
}
|
||||
|
||||
var fetch = new MenuItem();
|
||||
fetch.Header = App.Text("RemoteCM.Fetch");
|
||||
fetch.Icon = App.CreateMenuIcon("Icons.Fetch");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue