sourcegit/src/Views/CommitDetail.axaml

68 lines
2.8 KiB
Text
Raw Normal View History

<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>
<Grid RowDefinitions="Auto,1,*">
<!-- Base Information -->
<v:CommitBaseInfo Grid.Row="0" Content="{Binding Commit}"/>
<!-- Line -->
<Rectangle Grid.Row="1" Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}" VerticalAlignment="Center"/>
<!-- Change List -->
<Grid Grid.Row="2" ColumnDefinitions="96,*" Margin="0,0,8,0">
<TextBlock Grid.Column="0"
Classes="group_header_label"
Margin="0"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Text="{DynamicResource Text.CommitDetail.Changes}"/>
<v:ChangeCollectionView Grid.Column="1"
IsWorkingCopy="False"
Margin="8,0,0,0"
ViewMode="List"
Changes="{Binding Changes}"
ContextRequested="OnChangeListContextRequested"
ChangeDoubleTapped="OnChangeDoubleTapped">
<v:ChangeCollectionView.Styles>
<Style Selector="TreeDataGrid">
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/>
</Style>
</v:ChangeCollectionView.Styles>
</v:ChangeCollectionView>
</Grid>
</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>