2024-02-05 23:08:37 -08:00
|
|
|
<UserControl xmlns="https://github.com/avaloniaui"
|
|
|
|
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:m="using:SourceGit.Models"
|
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
xmlns:c="using:SourceGit.Converters"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.CommitDetail"
|
|
|
|
x:DataType="vm:CommitDetail"
|
|
|
|
Background="{DynamicResource Brush.Window}">
|
|
|
|
<TabControl SelectedIndex="{Binding ActivePageIndex, Mode=TwoWay}" Padding="4">
|
|
|
|
<!-- Information Page -->
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.CommitDetail.Info}"/>
|
|
|
|
</TabItem.Header>
|
|
|
|
|
2024-05-28 21:50:26 -07:00
|
|
|
<Grid RowDefinitions="Auto,1,*">
|
2024-02-05 23:08:37 -08:00
|
|
|
<!-- Base Information -->
|
|
|
|
<v:CommitBaseInfo Grid.Row="0" Content="{Binding Commit}"/>
|
|
|
|
|
2024-05-28 21:50:26 -07:00
|
|
|
<!-- Line -->
|
|
|
|
<Rectangle Grid.Row="1" Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}" VerticalAlignment="Center"/>
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<!-- Change List -->
|
2024-06-02 19:06:23 -07:00
|
|
|
<DataGrid Grid.Row="2"
|
|
|
|
Background="Transparent"
|
|
|
|
ItemsSource="{Binding Changes}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
CanUserResizeColumns="False"
|
|
|
|
CanUserSortColumns="False"
|
|
|
|
IsReadOnly="True"
|
|
|
|
HeadersVisibility="None"
|
|
|
|
Focusable="False"
|
|
|
|
RowHeight="26"
|
2024-06-04 02:29:08 -07:00
|
|
|
Margin="64,0,8,16"
|
2024-06-02 19:06:23 -07:00
|
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
ContextRequested="OnChangeListContextRequested"
|
|
|
|
DoubleTapped="OnChangeListDoubleTapped">
|
2024-06-04 02:29:08 -07:00
|
|
|
<DataGrid.Styles>
|
|
|
|
<Style Selector="DataGridRow">
|
|
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
|
|
|
<Setter Property="ClipToBounds" Value="True"/>
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Styles>
|
|
|
|
|
2024-06-02 19:06:23 -07:00
|
|
|
<DataGrid.Columns>
|
2024-06-04 02:29:08 -07:00
|
|
|
<DataGridTemplateColumn Width="36" Header="ICON">
|
2024-06-02 19:06:23 -07:00
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
2024-06-04 02:29:08 -07:00
|
|
|
<v:ChangeStatusIcon Width="14" Height="14" HorizontalAlignment="Left" Margin="16,0,0,0" IsWorkingCopyChange="False" Change="{Binding}"/>
|
2024-06-02 19:06:23 -07:00
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="*" Header="PATH">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock Classes="monospace" Text="{Binding Path}" Margin="8,0,0,0"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.CommitDetail.Changes}"/>
|
|
|
|
</TabItem.Header>
|
|
|
|
<v:CommitChanges/>
|
|
|
|
</TabItem>
|
|
|
|
|
|
|
|
<TabItem>
|
|
|
|
<TabItem.Header>
|
|
|
|
<TextBlock Classes="tab_header" Text="{DynamicResource Text.CommitDetail.Files}"/>
|
|
|
|
</TabItem.Header>
|
|
|
|
<v:RevisionFiles/>
|
|
|
|
</TabItem>
|
|
|
|
</TabControl>
|
|
|
|
</UserControl>
|