1
0

34 lines
2.1 KiB
XML

<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:vm="using:Flawless.Client.ViewModels"
x:DataType="vm:RepositoryViewModel"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Flawless.Client.Views.RepositoryPage.RepoCommitPageView">
<Grid ColumnDefinitions="2*, *">
<TreeDataGrid Grid.Column="0" Source="{Binding Commits}">
<TreeDataGrid.ContextMenu>
<ContextMenu>
<MenuItem Header="View File Tree"/>
<MenuItem Header="Reset To">
<MenuItem Header="Keep" Command="{Binding RevertFileTreeToSelectedCommitKeepCommand}"/>
<MenuItem Header="Soft" Command="{Binding RevertFileTreeToSelectedCommitSoftCommand}"/>
<MenuItem Header="Hard" Command="{Binding RevertFileTreeToSelectedCommitHardCommand}"/>
</MenuItem>
</ContextMenu>
</TreeDataGrid.ContextMenu>
</TreeDataGrid>
<Border Grid.Column="1" Classes="Shadow" Theme="{StaticResource CardBorder}">
<ScrollViewer IsVisible="{Binding !!Commits.RowSelection.SelectedItem}">
<StackPanel Spacing="8">
<Label Content="{Binding Commits.RowSelection.SelectedItem.FullCommitId, FallbackValue='00000000-0000'}"/>
<Label Content="{Binding Commits.RowSelection.SelectedItem.Author, FallbackValue='By: ', StringFormat='By: {0}'}"/>
<Label Content="{Binding Commits.RowSelection.SelectedItem.CommitAt, FallbackValue='At: ', StringFormat='At: {0}'}"/>
<TextBox Classes="TextArea" IsReadOnly="True" Text="{Binding Commits.RowSelection.SelectedItem.FullMessage, FallbackValue='Commit messages.'}"/>
</StackPanel>
</ScrollViewer>
</Border>
</Grid>
</UserControl>