2024-06-12 20:54:10 -07:00
|
|
|
<v:ChromelessWindow 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:SourceGit.ViewModels"
|
|
|
|
xmlns:v="using:SourceGit.Views"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.Blame"
|
|
|
|
x:DataType="vm:Blame"
|
2024-08-21 21:37:26 -07:00
|
|
|
x:Name="ThisControl"
|
2024-06-12 20:54:10 -07:00
|
|
|
Icon="/App.ico"
|
|
|
|
Title="{DynamicResource Text.Blame}"
|
|
|
|
MinWidth="1280" MinHeight="720">
|
|
|
|
<Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
<Grid.RowDefinitions>
|
2024-08-21 21:37:26 -07:00
|
|
|
<RowDefinition Height="Auto"/>
|
2024-03-14 19:41:36 -07:00
|
|
|
<RowDefinition Height="24"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- TitleBar -->
|
2024-08-21 21:37:26 -07:00
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,*,Auto" Height="30" IsVisible="{Binding !#ThisControl.UseSystemWindowFrame}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<!-- Bottom border -->
|
2024-03-14 19:41:36 -07:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="4"
|
2024-03-07 19:13:53 -08:00
|
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}"
|
2024-03-14 03:23:36 -07:00
|
|
|
DoubleTapped="MaximizeOrRestoreWindow"
|
2024-08-06 00:12:44 -07:00
|
|
|
PointerPressed="BeginMoveWindow"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Caption Buttons (macOS) -->
|
2024-03-07 19:13:53 -08:00
|
|
|
<Border Grid.Column="0" IsVisible="{OnPlatform False, macOS=True}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<v:CaptionButtonsMacOS/>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<!-- Icon -->
|
|
|
|
<Path Grid.Column="1" Margin="8,0,0,0" Width="12" Height="12" Data="{StaticResource Icons.Blame}"/>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Title -->
|
|
|
|
<TextBlock Grid.Column="2" Margin="8,0,0,0" Text="{DynamicResource Text.Blame}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Caption Buttons (Windows/Linux) -->
|
2024-03-14 19:41:36 -07:00
|
|
|
<Border Grid.Column="3" IsVisible="{OnPlatform True, macOS=False}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<v:CaptionButtons/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
|
2024-03-14 19:41:36 -07:00
|
|
|
<!-- File -->
|
2024-06-12 20:54:10 -07:00
|
|
|
<Border Grid.Row="1" Padding="8,0">
|
2024-03-21 21:03:04 -07:00
|
|
|
<TextBlock Text="{Binding Title}" VerticalAlignment="Center"/>
|
2024-03-14 19:41:36 -07:00
|
|
|
</Border>
|
|
|
|
|
2024-03-14 03:23:36 -07:00
|
|
|
<!-- Body -->
|
2024-09-08 20:45:02 -07:00
|
|
|
<Grid Grid.Row="2" Background="{DynamicResource Brush.Contents}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<!-- Blame View -->
|
|
|
|
<v:BlameTextEditor HorizontalScrollBarVisibility="Auto"
|
2024-03-14 19:41:36 -07:00
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
Margin="4,0,4,4"
|
2024-02-05 23:08:37 -08:00
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
2024-03-14 19:41:36 -07:00
|
|
|
BorderThickness="1"
|
2024-09-08 20:45:02 -07:00
|
|
|
Background="Transparent"
|
2024-02-05 23:08:37 -08:00
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
2024-08-19 02:14:41 -07:00
|
|
|
FontFamily="{DynamicResource Fonts.Monospace}"
|
2024-02-05 23:08:37 -08:00
|
|
|
BlameData="{Binding Data}"/>
|
|
|
|
|
|
|
|
<!-- Not supported mask (for binary files) -->
|
|
|
|
<StackPanel Orientation="Vertical"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
|
|
IsVisible="{Binding IsBinary}">
|
|
|
|
<Path Width="64" Height="64" Fill="{DynamicResource Brush.FG2}" Data="{StaticResource Icons.Error}"/>
|
|
|
|
<TextBlock Margin="0,16,0,0" FontSize="18" FontWeight="Bold" HorizontalAlignment="Center" Foreground="{DynamicResource Brush.FG2}" Text="{DynamicResource Text.BlameTypeNotSupported}"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
2024-03-07 19:13:53 -08:00
|
|
|
<!-- Loading -->
|
2024-05-30 01:12:28 -07:00
|
|
|
<v:LoadingIcon Width="48" Height="48" IsVisible="{Binding Data, Converter={x:Static ObjectConverters.IsNull}}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
2024-06-12 20:54:10 -07:00
|
|
|
</v:ChromelessWindow>
|