mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
129 lines
6.2 KiB
XML
129 lines
6.2 KiB
XML
<UserControl x:Class="SourceGit.Views.Widgets.Stashes"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
|
xmlns:models="clr-namespace:SourceGit.Models"
|
|
mc:Ignorable="d"
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="300" MinWidth="300"/>
|
|
<ColumnDefinition Width="1"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<!-- Left -->
|
|
<Grid Grid.Column="0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="26"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="26"/>
|
|
<RowDefinition Height="*"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<!-- Stashes List Group -->
|
|
<Border Grid.Row="0" BorderBrush="{StaticResource Brush.Border0}" BorderThickness="0,0,0,1">
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock
|
|
Margin="6,0,0,0"
|
|
Text="{StaticResource Text.Stashes.Stashes}"
|
|
Foreground="{StaticResource Brush.FG2}"
|
|
FontWeight="Bold"/>
|
|
|
|
<controls:Loading
|
|
x:Name="waiting"
|
|
Width="12" Height="12"
|
|
Margin="8,0,0,0"
|
|
Visibility="Collapsed"/>
|
|
</StackPanel>
|
|
</Border>
|
|
|
|
<!-- Stashes List -->
|
|
<ListView
|
|
Grid.Row="1"
|
|
x:Name="stashList"
|
|
Background="{StaticResource Brush.Contents}"
|
|
BorderThickness="0"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
SelectionChanged="OnStashSelectionChanged">
|
|
<ListView.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type models:Stash}">
|
|
<Border BorderBrush="{StaticResource Brush.Border3}" BorderThickness="0,0,0,1" Background="Transparent" Padding="6" ContextMenuOpening="OnStashContextMenuOpening">
|
|
<StackPanel Orientation="Vertical" TextElement.FontFamily="Consolas">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock Grid.Column="0" Text="{Binding SHA}" Foreground="{StaticResource Brush.FG2}" FontSize="11"/>
|
|
<TextBlock Grid.Column="1" Text="{Binding Author.Time}" Foreground="{StaticResource Brush.FG2}" FontSize="11"/>
|
|
</Grid>
|
|
<TextBlock Text="{Binding Message}" Margin="0,8,0,0"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ListView.ItemTemplate>
|
|
</ListView>
|
|
|
|
<!-- Change List Group -->
|
|
<Border Grid.Row="2" BorderBrush="{StaticResource Brush.Border0}" BorderThickness="0,1">
|
|
<Grid>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
</Grid.ColumnDefinitions>
|
|
<TextBlock
|
|
Grid.Column="0"
|
|
Margin="6,0,0,0"
|
|
Text="{StaticResource Text.Stashes.Changes}"
|
|
Foreground="{StaticResource Brush.FG2}"
|
|
FontWeight="Bold"/>
|
|
<TextBlock
|
|
Grid.Column="1"
|
|
Margin="0,0,4,0"
|
|
Text="{StaticResource Text.Stashes.Changes.Tip}"
|
|
Foreground="{StaticResource Brush.FG2}"
|
|
FontFamily="Consolas"
|
|
FontSize="10"/>
|
|
</Grid>
|
|
</Border>
|
|
|
|
<!-- Changed Files -->
|
|
<DataGrid
|
|
Grid.Row="3"
|
|
x:Name="changeList"
|
|
Background="{StaticResource Brush.Contents}"
|
|
RowHeight="24"
|
|
SelectionMode="Single"
|
|
SelectionUnit="FullRow"
|
|
SelectionChanged="OnChangeSelectionChanged">
|
|
<DataGrid.Columns>
|
|
<DataGridTemplateColumn Width="22" IsReadOnly="True">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<controls:ChangeStatusIcon Width="14" Height="14" IsLocalChange="False" Change="{Binding}"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
<DataGridTemplateColumn Width="*" IsReadOnly="True">
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
<DataTemplate>
|
|
<TextBlock FontFamily="Consolas" Margin="2,0,0,0" Text="{Binding Path}"/>
|
|
</DataTemplate>
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
</DataGridTemplateColumn>
|
|
</DataGrid.Columns>
|
|
</DataGrid>
|
|
</Grid>
|
|
|
|
<!-- Splitter -->
|
|
<GridSplitter Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="1" Background="{StaticResource Brush.Border0}"/>
|
|
|
|
<!-- Right -->
|
|
<widgets:DiffViewer Grid.Column="2" x:Name="diffViewer" Margin="4"/>
|
|
</Grid>
|
|
</UserControl>
|