2021-04-29 05:05:55 -07:00
|
|
|
<Window x:Class="SourceGit.Views.Histories"
|
|
|
|
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"
|
|
|
|
xmlns:models="clr-namespace:SourceGit.Models"
|
|
|
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
|
|
|
mc:Ignorable="d"
|
2021-04-30 07:35:50 -07:00
|
|
|
UseLayoutRounding="True"
|
2021-04-29 05:05:55 -07:00
|
|
|
Title="{StaticResource Text.FileHistory}"
|
|
|
|
WindowStartupLocation="CenterOwner"
|
|
|
|
MinHeight="600" MinWidth="800">
|
|
|
|
<WindowChrome.WindowChrome>
|
|
|
|
<WindowChrome UseAeroCaptionButtons="False" CornerRadius="0" CaptionHeight="28" ResizeBorderThickness="1"/>
|
|
|
|
</WindowChrome.WindowChrome>
|
|
|
|
|
|
|
|
<controls:WindowBorder>
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
2021-04-30 07:35:50 -07:00
|
|
|
<RowDefinition Height="28"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- Title Bar -->
|
|
|
|
<Grid Grid.Row="0" Background="{StaticResource 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.Histories}"/>
|
|
|
|
|
|
|
|
<!-- Title -->
|
|
|
|
<TextBlock Grid.Column="1" Text="{StaticResource Text.FileHistory}"/>
|
|
|
|
|
|
|
|
<!-- Window Commands -->
|
|
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal" WindowChrome.IsHitTestVisibleInChrome="True">
|
|
|
|
<controls:IconButton Click="Minimize" Width="28" Padding="8" Icon="{StaticResource Icon.Minimize}" HoverBackground="#40000000" Opacity="1"/>
|
|
|
|
<controls:IconButton Click="MaximizeOrRestore" Width="28" Padding="8" Icon="{StaticResource Icon.Maximize}" HoverBackground="#40000000" Opacity="1"/>
|
|
|
|
<controls:IconButton Click="Quit" Width="28" Padding="8" Icon="{StaticResource Icon.Close}" HoverBackground="Red" Opacity="1"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Body -->
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="300" MinWidth="300" MaxWidth="600"/>
|
|
|
|
<ColumnDefinition Width="1"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!-- Commit List -->
|
|
|
|
<DataGrid
|
|
|
|
x:Name="commitList"
|
|
|
|
Grid.Column="0"
|
|
|
|
Background="{StaticResource Brush.Contents}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
SelectedCellsChanged="OnCommitSelectedChanged">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="*">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type models:Commit}">
|
|
|
|
<Border BorderBrush="{StaticResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="36"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<controls:Avatar
|
|
|
|
Grid.Column="0"
|
|
|
|
HorizontalAlignment="Center"
|
|
|
|
Width="32" Height="32"
|
|
|
|
Email="{Binding Author.Email}"
|
|
|
|
FallbackLabel="{Binding Author.Name}"/>
|
|
|
|
|
|
|
|
<Grid Grid.Column="1" Margin="8,0,0,0">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Grid Grid.Row="0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="72"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="120"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="0" FontSize="11">
|
|
|
|
<Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT">
|
|
|
|
<Run Text="{Binding ShortSHA, Mode=OneWay}"/>
|
|
|
|
</Hyperlink>
|
|
|
|
</TextBlock>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Author.Name}" FontSize="11" Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
<TextBlock Grid.Column="2" Text="{Binding Author.Time}" FontSize="11" Foreground="{StaticResource Brush.FG2}"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<TextBlock Grid.Row="1" Text="{Binding Subject}" Margin="0,6,0,0"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
<!-- Loading -->
|
|
|
|
<controls:Loading Grid.Column="0" x:Name="loading" Width="48" Height="48" IsAnimating="True"/>
|
|
|
|
|
|
|
|
<!-- Splitter -->
|
|
|
|
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="Transparent"/>
|
|
|
|
|
|
|
|
<!-- Diff Viewer -->
|
|
|
|
<widgets:DiffViewer Grid.Column="2" x:Name="diffViewer"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</controls:WindowBorder>
|
|
|
|
</Window>
|