mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
ux: re-design UI for checkout commit as deteched action
This commit is contained in:
parent
662c9e1580
commit
b59c12e1f0
3 changed files with 24 additions and 18 deletions
|
@ -209,17 +209,6 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(reset);
|
||||
|
||||
var checkoutCommit = new MenuItem();
|
||||
checkoutCommit.Header = App.Text("CommitCM.Checkout");
|
||||
checkoutCommit.Icon = App.CreateMenuIcon("Icons.Check");
|
||||
checkoutCommit.Click += (o, e) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new CheckoutCommit(_repo, commit));
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(checkoutCommit);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -290,6 +279,20 @@ namespace SourceGit.ViewModels
|
|||
menu.Items.Add(revert);
|
||||
}
|
||||
|
||||
if (current.Head != commit.SHA)
|
||||
{
|
||||
var checkoutCommit = new MenuItem();
|
||||
checkoutCommit.Header = App.Text("CommitCM.Checkout");
|
||||
checkoutCommit.Icon = App.CreateMenuIcon("Icons.Detached");
|
||||
checkoutCommit.Click += (o, e) =>
|
||||
{
|
||||
if (PopupHost.CanCreatePopup())
|
||||
PopupHost.ShowPopup(new CheckoutCommit(_repo, commit));
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(checkoutCommit);
|
||||
}
|
||||
|
||||
menu.Items.Add(new MenuItem() { Header = "-" });
|
||||
|
||||
if (current.Head != commit.SHA)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue