mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 14:15:00 +00:00
enhance: supports search commits by changed file path like src/Commands/*
or */Add.cs
.
This commit is contained in:
parent
89f2d3dd11
commit
6426da3289
5 changed files with 59 additions and 16 deletions
|
@ -493,17 +493,17 @@
|
|||
</Grid>
|
||||
|
||||
<!-- Left Search Mode -->
|
||||
<Grid Grid.Column="0" RowDefinitions="32,*" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
||||
<Grid Grid.Column="0" RowDefinitions="32,32,*" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
||||
<!-- Search -->
|
||||
<TextBox Grid.Row="0"
|
||||
x:Name="txtSearchCommitsBox"
|
||||
Margin="4,2"
|
||||
Margin="4,2,4,0"
|
||||
Height="24"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
CornerRadius="4"
|
||||
Watermark="{DynamicResource Text.Repository.SearchTip}"
|
||||
Watermark="{DynamicResource Text.Repository.Search}"
|
||||
Text="{Binding SearchCommitFilter, Mode=TwoWay}"
|
||||
VerticalContentAlignment="Center"
|
||||
KeyDown="OnSearchKeyDown">
|
||||
|
@ -529,7 +529,27 @@
|
|||
</TextBox.InnerRightContent>
|
||||
</TextBox>
|
||||
|
||||
<DataGrid Grid.Row="1"
|
||||
<Grid Grid.Row="1" ColumnDefinitions="Auto,*" Margin="4,0">
|
||||
<TextBlock Grid.Column="0"
|
||||
Text="{DynamicResource Text.Repository.Search.By}"
|
||||
Foreground="{DynamicResource Brush.FG2}"
|
||||
Margin="2,0,0,0"/>
|
||||
|
||||
<ComboBox Grid.Column="1"
|
||||
MinHeight="24" Height="24"
|
||||
Padding="8,0"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
HorizontalAlignment="Right"
|
||||
SelectedIndex="{Binding SearchCommitFilterType, Mode=TwoWay}">
|
||||
<ComboBox.Items>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByBaseInfo}" FontSize="12"/>
|
||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByFile}" FontSize="12"/>
|
||||
</ComboBox.Items>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<DataGrid Grid.Row="2"
|
||||
ItemsSource="{Binding SearchedCommits}"
|
||||
SelectionMode="Single"
|
||||
SelectedItem="{Binding SearchResultSelectedCommit, Mode=OneWay}"
|
||||
|
@ -544,6 +564,7 @@
|
|||
BorderBrush="{DynamicResource Brush.Border2}"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
Margin="4,0,4,4"
|
||||
CornerRadius="4"
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
SelectionChanged="OnSearchResultDataGridSelectionChanged">
|
||||
|
@ -572,7 +593,7 @@
|
|||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<Path Grid.Row="1"
|
||||
<Path Grid.Row="2"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
Width="48" Height="48"
|
||||
Data="{StaticResource Icons.Empty}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue