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-04-29 05:05:55 -07:00
|
|
|
<TabControl>
|
|
|
|
<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">
|
|
|
|
<TextBlock Text="{StaticResource Text.CommitViewer.Info.Author}" Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,12,0,8">
|
|
|
|
<controls:TextEdit x:Name="txtAuthorName" IsReadOnly="True" BorderThickness="0"/>
|
|
|
|
<controls:TextEdit x:Name="txtAuthorEmail" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
<controls:TextEdit x:Name="txtAuthorTime" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" FontSize="10"/>
|
|
|
|
</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">
|
|
|
|
<TextBlock Text="{StaticResource Text.CommitViewer.Info.Committer}" Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<StackPanel Orientation="Horizontal" Margin="0,12,0,6">
|
|
|
|
<controls:TextEdit x:Name="txtCommitterName" IsReadOnly="True" BorderThickness="0"/>
|
|
|
|
<controls:TextEdit x:Name="txtCommitterEmail" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" Margin="4,0,0,0"/>
|
|
|
|
</StackPanel>
|
|
|
|
<controls:TextEdit x:Name="txtCommitterTime" IsReadOnly="True" BorderThickness="0" Foreground="{StaticResource Brush.FG2}" FontSize="10"/>
|
|
|
|
</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"
|
|
|
|
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"
|
|
|
|
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"
|
|
|
|
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">
|
|
|
|
<TextBlock Text="{Binding Name}" FontSize="11" Margin="4,0" Foreground="Black"/>
|
|
|
|
</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"
|
|
|
|
Text="{StaticResource Text.CommitViewer.Info.Message}"
|
|
|
|
Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<controls:TextEdit
|
|
|
|
Grid.Row="3" Grid.Column="1"
|
|
|
|
x:Name="txtMessage"
|
|
|
|
IsReadOnly="true"
|
|
|
|
FontFamily="Consolas"
|
|
|
|
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"
|
|
|
|
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"/>
|
|
|
|
</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>
|