2021-06-17 18:26:19 -07:00
|
|
|
<controls:Window
|
2022-01-12 02:43:21 -08:00
|
|
|
x:Class="SourceGit.Views.FileHistories"
|
2021-06-21 19:09:50 -07:00
|
|
|
x:Name="me"
|
2021-06-17 18:26:19 -07:00
|
|
|
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-07-20 01:26:10 -07:00
|
|
|
Title="{DynamicResource Text.FileHistory}"
|
2021-06-17 18:26:19 -07:00
|
|
|
WindowStartupLocation="CenterOwner"
|
|
|
|
MinHeight="600" MinWidth="800">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="28"/>
|
|
|
|
<RowDefinition Height="1"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- Title Bar -->
|
2021-07-20 01:26:10 -07:00
|
|
|
<Grid Grid.Row="0" Background="{DynamicResource Brush.TitleBar}">
|
2021-06-17 18:26:19 -07:00
|
|
|
<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 -->
|
2021-07-20 01:26:10 -07:00
|
|
|
<TextBlock Grid.Column="1" Text="{DynamicResource Text.FileHistory}"/>
|
2021-06-17 18:26:19 -07:00
|
|
|
|
|
|
|
<!-- Window Commands -->
|
|
|
|
<StackPanel Grid.Column="3" Orientation="Horizontal" WindowChrome.IsHitTestVisibleInChrome="True">
|
2022-11-03 21:48:41 -07:00
|
|
|
<controls:IconButton Click="Minimize" Width="48" IconSize="10" Icon="{StaticResource Icon.Minimize}" HoverBackground="#40000000" Opacity="1"/>
|
2022-10-14 05:38:53 -07:00
|
|
|
<ToggleButton Style="{StaticResource Style.ToggleButton.MaxOrRestore}" Width="48" IsChecked="{Binding ElementName=me, Path=IsMaximized}"/>
|
2022-11-03 21:48:41 -07:00
|
|
|
<controls:IconButton Click="Quit" Width="48" IconSize="10" Icon="{StaticResource Icon.Close}" HoverBackground="Red" Opacity="1"/>
|
2021-06-17 18:26:19 -07:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<Rectangle
|
|
|
|
Grid.Row="1"
|
|
|
|
Height="1"
|
|
|
|
HorizontalAlignment="Stretch"
|
2021-07-20 01:26:10 -07:00
|
|
|
Fill="{DynamicResource Brush.Border0}"/>
|
2021-06-17 18:26:19 -07:00
|
|
|
|
|
|
|
<!-- Body -->
|
|
|
|
<Grid Grid.Row="2">
|
|
|
|
<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"
|
2021-07-20 01:26:10 -07:00
|
|
|
Background="{DynamicResource Brush.Contents}"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border0}"
|
2021-06-17 18:26:19 -07:00
|
|
|
BorderThickness="0,0,1,0"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
SelectedCellsChanged="OnCommitSelectedChanged">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="*">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate DataType="{x:Type models:Commit}">
|
2021-07-20 01:26:10 -07:00
|
|
|
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
2021-06-17 18:26:19 -07:00
|
|
|
<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}"
|
|
|
|
ToolTip="{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="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Hyperlink NavigateUri="{Binding SHA}" RequestNavigate="GotoCommit" Foreground="DarkOrange" ToolTip="GOTO COMMIT">
|
|
|
|
<Run Text="{Binding ShortSHA, Mode=OneWay}"/>
|
|
|
|
</Hyperlink>
|
2021-06-17 18:26:19 -07:00
|
|
|
</TextBlock>
|
2021-04-29 05:05:55 -07:00
|
|
|
|
2021-05-17 18:08:55 -07:00
|
|
|
<TextBlock
|
2021-06-17 18:26:19 -07:00
|
|
|
Grid.Column="1"
|
2021-08-04 22:44:25 -07:00
|
|
|
Text="{Binding Author.Time}"
|
2021-07-20 01:26:10 -07:00
|
|
|
Foreground="{DynamicResource Brush.FG2}"
|
2021-06-17 18:26:19 -07:00
|
|
|
Margin="4,0,0,0"
|
|
|
|
HorizontalAlignment="Right"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
2021-06-17 18:26:19 -07:00
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Grid.Row="1"
|
2021-08-04 22:44:25 -07:00
|
|
|
Text="{Binding Subject}"
|
2021-06-17 18:26:19 -07:00
|
|
|
Margin="0,6,0,0"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
2021-06-17 18:26:19 -07:00
|
|
|
</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" Padding="4"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
2021-06-17 18:26:19 -07:00
|
|
|
</Grid>
|
|
|
|
</controls:Window>
|