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"
|
2024-07-29 00:07:41 -07:00
|
|
|
x:DataType="vm:CommitDetail">
|
2024-02-05 23:08:37 -08:00
|
|
|
<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-07-02 05:59:28 -07:00
|
|
|
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
|
|
|
|
<StackPanel Orientation="Vertical">
|
|
|
|
<!-- Base Information -->
|
2024-08-05 02:34:49 -07:00
|
|
|
<v:CommitBaseInfo Content="{Binding Commit}"
|
|
|
|
Message="{Binding FullMessage}"
|
2024-08-23 01:52:55 -07:00
|
|
|
SupportsContainsIn="True"
|
2024-08-13 02:15:17 -07:00
|
|
|
WebLinks="{Binding WebLinks}"
|
2024-08-05 03:18:57 -07:00
|
|
|
IssueTrackerRules="{Binding IssueTrackerRules}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-07-02 05:59:28 -07:00
|
|
|
<!-- Line -->
|
|
|
|
<Rectangle Height=".65" Margin="8" Fill="{DynamicResource Brush.Border2}"/>
|
2024-05-28 21:50:26 -07:00
|
|
|
|
2024-07-02 05:59:28 -07:00
|
|
|
<!-- Change List -->
|
|
|
|
<ListBox Background="Transparent"
|
|
|
|
Margin="64,0,8,4"
|
|
|
|
SelectionMode="Single"
|
|
|
|
ItemsSource="{Binding Changes, Converter={x:Static c:ListConverters.Top100Changes}}">
|
|
|
|
<ListBox.Styles>
|
|
|
|
<Style Selector="ListBoxItem">
|
|
|
|
<Setter Property="Padding" Value="0"/>
|
2024-08-02 00:16:19 -07:00
|
|
|
<Setter Property="MinHeight" Value="24"/>
|
2024-07-02 05:59:28 -07:00
|
|
|
<Setter Property="CornerRadius" Value="4"/>
|
|
|
|
</Style>
|
|
|
|
</ListBox.Styles>
|
|
|
|
|
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Vertical"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
|
|
|
|
<ListBox.ItemTemplate>
|
|
|
|
<DataTemplate DataType="m:Change">
|
2024-08-02 00:16:19 -07:00
|
|
|
<Grid Background="Transparent" Height="24" ColumnDefinitions="36,*" ContextRequested="OnChangeContextRequested" DoubleTapped="OnChangeDoubleTapped">
|
2024-07-02 05:59:28 -07:00
|
|
|
<v:ChangeStatusIcon Grid.Column="0"
|
|
|
|
Width="14" Height="14"
|
|
|
|
HorizontalAlignment="Left"
|
|
|
|
Margin="16,0,0,0"
|
|
|
|
Change="{Binding}"/>
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Grid.Column="1" Classes="primary" Text="{Binding Path}" Margin="8,0" TextTrimming="CharacterEllipsis"/>
|
2024-07-02 05:59:28 -07:00
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</ListBox.ItemTemplate>
|
|
|
|
</ListBox>
|
2024-06-02 19:06:23 -07:00
|
|
|
|
2024-07-02 05:59:28 -07:00
|
|
|
<!-- Only Top100 Tip -->
|
|
|
|
<TextBlock Margin="108,0,0,16"
|
|
|
|
Text="{DynamicResource Text.CommitDetail.Info.GotoChangesPage}"
|
|
|
|
Foreground="{DynamicResource Brush.FG2}"
|
|
|
|
IsVisible="{Binding Changes, Converter={x:Static c:ListConverters.IsOnlyTop100Shows}}"/>
|
|
|
|
</StackPanel>
|
|
|
|
</ScrollViewer>
|
2024-02-05 23:08:37 -08:00
|
|
|
</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>
|