mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-02 01:34:58 +00:00
feature<AssumeUnchanged>: supports update-index --[no]-assume-unchanged
This commit is contained in:
parent
79b5136a46
commit
f13b1ee9fe
9 changed files with 272 additions and 3 deletions
100
src/Views/AssumeUnchanged.xaml
Normal file
100
src/Views/AssumeUnchanged.xaml
Normal file
|
@ -0,0 +1,100 @@
|
|||
<controls:Window
|
||||
x:Class="SourceGit.Views.AssumeUnchanged"
|
||||
x:Name="me"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
||||
mc:Ignorable="d"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Title="{DynamicResource Text.AssumeUnchanged}"
|
||||
Width="600" MinHeight="200" SizeToContent="Height"
|
||||
ResizeMode="NoResize">
|
||||
<Window.Resources>
|
||||
<Style x:Key="Style.DataGridRow.Change" TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
||||
<EventSetter Event="RequestBringIntoView" Handler="OnRequestBringIntoView"/>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="28"/>
|
||||
<RowDefinition Height="1"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title bar -->
|
||||
<Grid Grid.Row="0" Background="{DynamicResource Brush.TitleBar}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Icon -->
|
||||
<Path Grid.Column="0" Margin="6,0" Width="16" Height="16" Data="{StaticResource Icon.Ignores}"/>
|
||||
|
||||
<!-- Title -->
|
||||
<TextBlock Grid.Column="1" Text="{DynamicResource Text.AssumeUnchanged}"/>
|
||||
|
||||
<!-- Close -->
|
||||
<controls:IconButton
|
||||
Grid.Column="3"
|
||||
Click="OnQuit"
|
||||
Width="28"
|
||||
IconSize="10"
|
||||
Icon="{StaticResource Icon.Close}"
|
||||
HoverBackground="Red"
|
||||
WindowChrome.IsHitTestVisibleInChrome="True"/>
|
||||
</Grid>
|
||||
|
||||
<Rectangle
|
||||
Grid.Row="1"
|
||||
Height="1"
|
||||
HorizontalAlignment="Stretch"
|
||||
Fill="{DynamicResource Brush.Border0}"/>
|
||||
|
||||
<DataGrid
|
||||
Grid.Row="2"
|
||||
x:Name="list"
|
||||
Margin="8,4"
|
||||
RowHeight="24"
|
||||
SelectionMode="Extended"
|
||||
SelectionUnit="FullRow"
|
||||
Background="{DynamicResource Brush.Contents}"
|
||||
ItemsSource="{Binding ElementName=me, Path=Files}"
|
||||
RowStyle="{StaticResource Style.DataGridRow.Change}"
|
||||
Visibility="Collapsed">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTemplateColumn IsReadOnly="True" Width="*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Margin="8,0" Text="{Binding .}" FontSize="14"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
|
||||
<DataGridTemplateColumn Width="32">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
<controls:IconButton
|
||||
Grid.Column="6"
|
||||
Click="Remove"
|
||||
Width="12" Height="12"
|
||||
Margin="4,0"
|
||||
Icon="{StaticResource Icon.Close}"
|
||||
ToolTip="{DynamicResource Text.AssumeUnchanged.Remove}"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
|
||||
<StackPanel Grid.Row="2" x:Name="mask" Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed">
|
||||
<Path Width="48" Height="48" Margin="0,32,0,8" Data="{StaticResource Icon.Empty}" Fill="{DynamicResource Brush.FG2}"/>
|
||||
<TextBlock Margin="0,0,0,32" Text="{DynamicResource Text.AssumeUnchanged.Empty}" Foreground="{DynamicResource Brush.FG2}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</controls:Window>
|
Loading…
Add table
Add a link
Reference in a new issue