2024-02-05 23:08:37 -08:00
|
|
|
<Window 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.Blame"
|
|
|
|
x:Name="me"
|
|
|
|
x:DataType="vm:Blame"
|
2024-02-21 22:51:31 -08:00
|
|
|
Icon="/App.ico"
|
2024-02-05 23:08:37 -08:00
|
|
|
Title="{DynamicResource Text.Blame}"
|
|
|
|
WindowStartupLocation="CenterOwner"
|
|
|
|
BorderThickness="1"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border0}"
|
2024-03-07 19:13:53 -08:00
|
|
|
Background="{DynamicResource Brush.Window}"
|
2024-02-05 23:08:37 -08:00
|
|
|
MinWidth="1280" MinHeight="720"
|
2024-03-07 19:13:53 -08:00
|
|
|
ExtendClientAreaToDecorationsHint="{OnPlatform True, Linux=False}"
|
|
|
|
ExtendClientAreaChromeHints="{OnPlatform NoChrome, Linux=Default}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Grid Margin="{Binding #me.WindowState, Converter={x:Static c:WindowStateConverters.ToContentMargin}}">
|
|
|
|
<Grid.RowDefinitions>
|
2024-03-07 19:13:53 -08:00
|
|
|
<RowDefinition Height="30"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto">
|
|
|
|
<!-- Bottom border -->
|
2024-03-07 19:13:53 -08:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="5"
|
|
|
|
Background="{DynamicResource Brush.TitleBar}"
|
|
|
|
BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
IsHitTestVisible="False"/>
|
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-07 19:13:53 -08:00
|
|
|
<!-- Title (Hide on Linux) -->
|
2024-03-07 23:57:36 -08:00
|
|
|
<TextBlock Grid.Column="2" Margin="8,0,0,0" Text="{DynamicResource Text.Blame}" FontWeight="Bold" IsHitTestVisible="False" VerticalAlignment="Center" IsVisible="{OnPlatform True, Linux=False}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Blame information -->
|
2024-03-07 23:57:36 -08:00
|
|
|
<TextBlock Grid.Column="3" Margin="8,0,0,0" Text="{Binding Title}" FontSize="11" FontStyle="Italic" IsHitTestVisible="False" VerticalAlignment="Center"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Caption Buttons (Windows) -->
|
2024-03-07 19:13:53 -08:00
|
|
|
<Border Grid.Column="4" IsVisible="{OnPlatform False, Windows=True}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<v:CaptionButtons/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
|
2024-03-07 19:13:53 -08:00
|
|
|
<Grid Grid.Row="1">
|
2024-02-05 23:08:37 -08:00
|
|
|
<!-- Blame View -->
|
|
|
|
<v:BlameTextEditor HorizontalScrollBarVisibility="Auto"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
BorderThickness="0"
|
2024-03-04 05:23:17 -08:00
|
|
|
Background="{DynamicResource Brush.Contents}"
|
2024-02-05 23:08:37 -08:00
|
|
|
Foreground="{DynamicResource Brush.FG1}"
|
2024-03-04 23:53:38 -08:00
|
|
|
FontFamily="fonts:SourceGit#JetBrains Mono"
|
2024-02-05 23:08:37 -08:00
|
|
|
FontSize="12"
|
|
|
|
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 -->
|
|
|
|
<Path Width="48" Height="48"
|
|
|
|
Classes="rotating"
|
|
|
|
Data="{StaticResource Icons.Loading}"
|
|
|
|
IsVisible="{Binding Data, Converter={x:Static ObjectConverters.IsNull}}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Window>
|