code_style: keep ux/code in a uniform style

This commit is contained in:
leo 2024-05-26 14:35:57 +08:00
parent 66f2aab6a7
commit 8d27690473
4 changed files with 5 additions and 12 deletions

View file

@ -77,7 +77,7 @@
<x:String x:Key="Text.Close" xml:space="preserve">CLOSE</x:String>
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">Cherry-Pick This Commit</x:String>
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">Copy SHA</x:String>
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">Checkout commit${0}</x:String>
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">Checkout Commit</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">Rebase${0}$to Here</x:String>
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">Reset${0}$to Here</x:String>
<x:String x:Key="Text.CommitCM.Revert" xml:space="preserve">Revert Commit</x:String>

View file

@ -76,7 +76,7 @@
<x:String x:Key="Text.Clone.RemoteURL" xml:space="preserve">远程仓库 </x:String>
<x:String x:Key="Text.Close" xml:space="preserve">关闭</x:String>
<x:String x:Key="Text.CommitCM.CherryPick" xml:space="preserve">挑选(cherry-pick)此提交</x:String>
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">检出提交${0}</x:String>
<x:String x:Key="Text.CommitCM.Checkout" xml:space="preserve">检出提交</x:String>
<x:String x:Key="Text.CommitCM.CopySHA" xml:space="preserve">复制提交指纹</x:String>
<x:String x:Key="Text.CommitCM.Rebase" xml:space="preserve">变基(rebase)${0}$到此处</x:String>
<x:String x:Key="Text.CommitCM.Reset" xml:space="preserve">重置(reset)${0}$到此处</x:String>

View file

@ -236,11 +236,12 @@ namespace SourceGit.ViewModels
menu.Items.Add(reset);
var checkoutCommit = new MenuItem();
checkoutCommit.Header = new Views.NameHighlightedTextBlock("CommitCM.Checkout", commit.SHA.Substring(0, 10));
checkoutCommit.Header = App.Text("CommitCM.Checkout");
checkoutCommit.Icon = App.CreateMenuIcon("Icons.Check");
checkoutCommit.Click += (o, e) =>
{
_repo.CheckoutCommit(commit);
if (PopupHost.CanCreatePopup())
PopupHost.ShowPopup(new CheckoutCommit(_repo, commit));
e.Handled = true;
};
menu.Items.Add(checkoutCommit);

View file

@ -721,14 +721,6 @@ namespace SourceGit.ViewModels
else
PopupHost.ShowAndStartPopup(new Checkout(this, branch));
}
public void CheckoutCommit(Models.Commit commit)
{
if (!PopupHost.CanCreatePopup())
return;
PopupHost.ShowPopup(new CheckoutCommit(this, commit));
}
public void DeleteMultipleBranches(List<Models.Branch> branches, bool isLocal)
{