mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 16:44:59 +00:00
refactor: commit search (#256)
This commit is contained in:
parent
38c6c7713e
commit
6a8527a394
6 changed files with 37 additions and 20 deletions
|
@ -580,7 +580,9 @@
|
|||
HorizontalAlignment="Right"
|
||||
SelectedIndex="{Binding SearchCommitFilterType, Mode=TwoWay}">
|
||||
<ComboBox.Items>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByBaseInfo}" FontSize="12"/>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.BySHA}" FontSize="12"/>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByUser}" FontSize="12"/>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByMessage}" FontSize="12"/>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByFile}" FontSize="12"/>
|
||||
</ComboBox.Items>
|
||||
</ComboBox>
|
||||
|
|
|
@ -73,7 +73,7 @@ namespace SourceGit.Views
|
|||
{
|
||||
if (e.Key == Key.Enter)
|
||||
{
|
||||
if (DataContext is ViewModels.Repository repo)
|
||||
if (DataContext is ViewModels.Repository repo && !string.IsNullOrWhiteSpace(repo.SearchCommitFilter))
|
||||
repo.StartSearchCommits();
|
||||
|
||||
e.Handled = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue