2021-04-29 05:05:55 -07:00
|
|
|
<UserControl x:Class="SourceGit.Views.Widgets.CommitDetail"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
|
|
|
xmlns:models="clr-namespace:SourceGit.Models"
|
|
|
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
|
|
|
mc:Ignorable="d"
|
2021-04-30 00:33:26 -07:00
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
2021-05-12 19:55:25 -07:00
|
|
|
<TabControl x:Name="body">
|
2021-04-29 05:05:55 -07:00
|
|
|
<TabItem Header="{StaticResource Text.CommitViewer.Info}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- Author & Committer -->
|
|
|
|
<Grid Grid.Row="0" Margin="0,8">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="96"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="96"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!-- Author Avatar -->
|
|
|
|
<controls:Avatar
|
|
|
|
Grid.Column="0"
|
|
|
|
x:Name="avatarAuthor"
|
|
|
|
Width="64" Height="64"
|
|
|
|
HorizontalAlignment="Right"/>
|
|
|
|
|
|
|
|
<!-- Author Info -->
|
|
|
|
<StackPanel Grid.Column="1" Margin="16,0,8,0" Orientation="Vertical">
|
2021-05-17 18:08:55 -07:00
|
|
|
<TextBlock FontWeight="Bold" Text="{StaticResource Text.CommitViewer.Info.Author}" Foreground="{StaticResource Brush.FG2}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,12,0,8">
|
2021-05-17 18:08:55 -07:00
|
|
|
<controls:TextEdit x:Name="txtAuthorName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
|
|
|
|
<controls:TextEdit x:Name="txtAuthorEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
2021-05-17 18:08:55 -07:00
|
|
|
<controls:TextEdit x:Name="txtAuthorTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- Committer Avatar -->
|
|
|
|
<controls:Avatar
|
|
|
|
Grid.Column="2"
|
|
|
|
x:Name="avatarCommitter"
|
|
|
|
Width="64" Height="64"
|
|
|
|
HorizontalAlignment="Right"/>
|
|
|
|
|
|
|
|
<!-- Committer Info -->
|
|
|
|
<StackPanel x:Name="committerInfoPanel" Grid.Column="3" Margin="16,0,8,0" Orientation="Vertical">
|
2021-05-17 18:08:55 -07:00
|
|
|
<TextBlock FontWeight="Bold" Text="{StaticResource Text.CommitViewer.Info.Committer}" Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,12,0,8">
|
|
|
|
<controls:TextEdit x:Name="txtCommitterName" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0"/>
|
|
|
|
<controls:TextEdit x:Name="txtCommitterEmail" FontFamily="Consolas,Microsoft YaHei UI" FontSize="10pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
2021-05-17 18:08:55 -07:00
|
|
|
<controls:TextEdit x:Name="txtCommitterTime" FontFamily="Consolas" FontSize="9pt" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Line -->
|
|
|
|
<Rectangle Grid.Row="1" Height="1" Margin="8" Fill="{StaticResource Brush.Border2}" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
|
<!-- Base Information -->
|
|
|
|
<Grid Grid.Row="2">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto" x:Name="rowParents"/>
|
|
|
|
<RowDefinition Height="Auto" x:Name="rowRefs"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="96"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!-- SHA -->
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="0" Grid.Column="0"
|
|
|
|
HorizontalAlignment="Right"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontWeight="Bold"
|
2021-04-29 05:05:55 -07:00
|
|
|
Text="{StaticResource Text.CommitViewer.Info.SHA}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<controls:TextEdit
|
|
|
|
Grid.Row="0" Grid.Column="1"
|
|
|
|
Height="24"
|
|
|
|
x:Name="txtSHA"
|
|
|
|
IsReadOnly="True"
|
|
|
|
BorderThickness="0"
|
|
|
|
FontFamily="Consolas"
|
|
|
|
Margin="11,0,0,0"/>
|
|
|
|
|
|
|
|
<!-- PARENTS -->
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="1" Grid.Column="0"
|
|
|
|
HorizontalAlignment="Right"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontWeight="Bold"
|
2021-04-29 05:05:55 -07:00
|
|
|
Text="{StaticResource Text.CommitViewer.Info.Parents}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<ItemsControl Grid.Row="1" Grid.Column="1" x:Name="listParents" Height="24" Margin="13,0,0,0">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<VirtualizingStackPanel Orientation="Horizontal" VerticalAlignment="Center"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock Margin="0,0,8,0" FontFamily="Consolas">
|
|
|
|
<Hyperlink RequestNavigate="OnNavigateParent" NavigateUri="{Binding .}" ToolTip="{StaticResource Text.Goto}">
|
|
|
|
<Run Text="{Binding .}"/>
|
|
|
|
</Hyperlink>
|
|
|
|
</TextBlock>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
<!-- REFS -->
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="2" Grid.Column="0"
|
|
|
|
HorizontalAlignment="Right"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontWeight="Bold"
|
2021-04-29 05:05:55 -07:00
|
|
|
Text="{StaticResource Text.CommitViewer.Info.Refs}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<ItemsControl Grid.Row="2" Grid.Column="1" x:Name="listRefs" Height="24" Margin="11,0,0,0">
|
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<VirtualizingStackPanel Orientation="Horizontal" VerticalAlignment="Center"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type models:Decorator}">
|
|
|
|
<StackPanel Orientation="Horizontal" Height="16" Margin="2,0">
|
|
|
|
<Border Background="{StaticResource Brush.Decorator}">
|
|
|
|
<Path x:Name="Icon" Margin="4,0" Width="8" Height="8" Data="{StaticResource Icon.Branch}"/>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<Border x:Name="Color" Background="#FFFFB835">
|
2021-05-17 18:08:55 -07:00
|
|
|
<TextBlock Text="{Binding Name}" FontSize="8pt" Margin="4,0" Foreground="Black"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Border>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<DataTemplate.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static models:DecoratorType.CurrentBranchHead}">
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Check}"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static models:DecoratorType.RemoteBranchHead}">
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Remote}"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static models:DecoratorType.Tag}">
|
|
|
|
<Setter TargetName="Color" Property="Background" Value="#FF02C302"/>
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Tag}"/>
|
|
|
|
</DataTrigger>
|
|
|
|
</DataTemplate.Triggers>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
<!-- Message -->
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="3" Grid.Column="0"
|
|
|
|
Margin="0,4,0,0"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontWeight="Bold"
|
2021-04-29 05:05:55 -07:00
|
|
|
Text="{StaticResource Text.CommitViewer.Info.Message}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<controls:TextEdit
|
|
|
|
Grid.Row="3" Grid.Column="1"
|
|
|
|
x:Name="txtMessage"
|
|
|
|
IsReadOnly="true"
|
2021-05-17 01:47:56 -07:00
|
|
|
FontFamily="Consolas,SimSun"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontSize="9pt"
|
2021-04-29 05:05:55 -07:00
|
|
|
BorderThickness="0"
|
|
|
|
TextWrapping="Wrap"
|
|
|
|
Margin="11,5,16,0"
|
|
|
|
VerticalAlignment="Top"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Line -->
|
|
|
|
<Rectangle Grid.Row="3" Height="1" Margin="8" Fill="{StaticResource Brush.Border2}" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
|
<!-- Change List -->
|
|
|
|
<Grid Grid.Row="4">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="96"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Grid.Column="0"
|
|
|
|
Margin="0,4,0,0"
|
|
|
|
HorizontalAlignment="Right" VerticalAlignment="Top"
|
2021-05-17 18:08:55 -07:00
|
|
|
FontWeight="Bold"
|
2021-04-29 05:05:55 -07:00
|
|
|
Text="{StaticResource Text.CommitViewer.Info.Changed}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
|
|
|
|
<DataGrid
|
|
|
|
Grid.Column="1"
|
|
|
|
x:Name="changeList"
|
|
|
|
RowHeight="24"
|
|
|
|
Margin="11,0,0,2">
|
|
|
|
<DataGrid.RowStyle>
|
2021-04-30 00:33:26 -07:00
|
|
|
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<EventSetter Event="ContextMenuOpening" Handler="OnChangeListContextMenuOpening"/>
|
2021-05-12 19:55:25 -07:00
|
|
|
<EventSetter Event="MouseDoubleClick" Handler="OnChangeListMouseDoubleClick"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Style>
|
|
|
|
</DataGrid.RowStyle>
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="22" IsReadOnly="True">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<controls:ChangeStatusIcon Width="14" Height="14" IsLocalChange="False" Change="{Binding}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
<DataGridTemplateColumn Width="*" IsReadOnly="True">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<!-- Change Details -->
|
|
|
|
<TabItem Header="{StaticResource Text.CommitViewer.Changes}">
|
|
|
|
<widgets:CommitChanges x:Name="changeContainer"/>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<!-- Revision Files -->
|
|
|
|
<TabItem Header="{StaticResource Text.CommitViewer.Files}">
|
2021-04-30 00:33:26 -07:00
|
|
|
<widgets:RevisionFiles x:Name="revisionFiles"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
</UserControl>
|