mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
ux: new design for repository left side bar
This commit is contained in:
parent
414f7fad2c
commit
432f5a98da
8 changed files with 495 additions and 449 deletions
|
@ -1,4 +1,7 @@
|
||||||
using Avalonia.Data.Converters;
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
using Avalonia.Data.Converters;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
|
|
||||||
namespace SourceGit.Converters
|
namespace SourceGit.Converters
|
||||||
|
@ -13,5 +16,21 @@ namespace SourceGit.Converters
|
||||||
|
|
||||||
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
|
public static readonly FuncValueConverter<bool, FontWeight> BoldIfTrue =
|
||||||
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
|
new FuncValueConverter<bool, FontWeight>(x => x ? FontWeight.Bold : FontWeight.Regular);
|
||||||
|
|
||||||
|
public class InverseConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return !(bool)value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
return !(bool)value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static readonly InverseConverter Inverse = new InverseConverter();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,4 +103,5 @@
|
||||||
<StreamGeometry x:Key="Icons.Track">M897 673v13c0 51-42 93-93 93h-10c-1 0-2 0-2 0H220c-23 0-42 19-42 42v13c0 23 19 42 42 42h552c14 0 26 12 26 26 0 14-12 26-26 26H220c-51 0-93-42-93-93v-13c0-51 42-93 93-93h20c1-0 2-0 2-0h562c23 0 42-19 42-42v-13c0-11-5-22-13-29-8-7-17-11-28-10H660c-14 0-26-12-26-26 0-14 12-26 26-26h144c24-1 47 7 65 24 18 17 29 42 29 67zM479 98c-112 0-203 91-203 203 0 44 14 85 38 118l132 208c15 24 50 24 66 0l133-209c23-33 37-73 37-117 0-112-91-203-203-203zm0 327c-68 0-122-55-122-122s55-122 122-122 122 55 122 122-55 122-122 122z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Track">M897 673v13c0 51-42 93-93 93h-10c-1 0-2 0-2 0H220c-23 0-42 19-42 42v13c0 23 19 42 42 42h552c14 0 26 12 26 26 0 14-12 26-26 26H220c-51 0-93-42-93-93v-13c0-51 42-93 93-93h20c1-0 2-0 2-0h562c23 0 42-19 42-42v-13c0-11-5-22-13-29-8-7-17-11-28-10H660c-14 0-26-12-26-26 0-14 12-26 26-26h144c24-1 47 7 65 24 18 17 29 42 29 67zM479 98c-112 0-203 91-203 203 0 44 14 85 38 118l132 208c15 24 50 24 66 0l133-209c23-33 37-73 37-117 0-112-91-203-203-203zm0 327c-68 0-122-55-122-122s55-122 122-122 122 55 122 122-55 122-122 122z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.Whitespace">M416 64H768v64h-64v704h64v64H448v-64h64V512H416a224 224 0 1 1 0-448zM576 832h64V128H576v704zM416 128H512v320H416a160 160 0 0 1 0-320z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.Whitespace">M416 64H768v64h-64v704h64v64H448v-64h64V512H416a224 224 0 1 1 0-448zM576 832h64V128H576v704zM416 128H512v320H416a160 160 0 0 1 0-320z</StreamGeometry>
|
||||||
<StreamGeometry x:Key="Icons.InteractiveRebase">M512 64A447 447 0 0064 512c0 248 200 448 448 448s448-200 448-448S760 64 512 64zM218 295h31c54 0 105 19 145 55 13 12 13 31 3 43a35 35 0 01-22 10 36 36 0 01-21-7 155 155 0 00-103-39h-31a32 32 0 01-31-31c0-18 13-31 30-31zm31 433h-31a32 32 0 01-31-31c0-16 13-31 31-31h31A154 154 0 00403 512 217 217 0 01620 295h75l-93-67a33 33 0 01-7-43 33 33 0 0143-7l205 148-205 148a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67H620a154 154 0 00-154 154c0 122-97 220-217 220zm390 118a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67h-75c-52 0-103-19-143-54-12-12-13-31-1-43a30 30 0 0142-3 151 151 0 00102 39h75L602 599a33 33 0 01-7-43 33 33 0 0143-7l205 148-203 151z</StreamGeometry>
|
<StreamGeometry x:Key="Icons.InteractiveRebase">M512 64A447 447 0 0064 512c0 248 200 448 448 448s448-200 448-448S760 64 512 64zM218 295h31c54 0 105 19 145 55 13 12 13 31 3 43a35 35 0 01-22 10 36 36 0 01-21-7 155 155 0 00-103-39h-31a32 32 0 01-31-31c0-18 13-31 30-31zm31 433h-31a32 32 0 01-31-31c0-16 13-31 31-31h31A154 154 0 00403 512 217 217 0 01620 295h75l-93-67a33 33 0 01-7-43 33 33 0 0143-7l205 148-205 148a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67H620a154 154 0 00-154 154c0 122-97 220-217 220zm390 118a29 29 0 01-18 6 32 32 0 01-31-31c0-10 4-19 13-25l93-67h-75c-52 0-103-19-143-54-12-12-13-31-1-43a30 30 0 0142-3 151 151 0 00102 39h75L602 599a33 33 0 01-7-43 33 33 0 0143-7l205 148-203 151z</StreamGeometry>
|
||||||
|
<StreamGeometry x:Key="Icons.Home">M832 64h128v278l-128-146V64zm64 448L512 73 128 512H0L448 0h128l448 512h-128zm0 83V1024H640V704c0-35-29-64-64-64h-128a64 64 0 00-64 64v320H128V595l384-424 384 424z</StreamGeometry>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|
|
@ -435,7 +435,6 @@
|
||||||
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">TAGS</x:String>
|
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">TAGS</x:String>
|
||||||
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">NEW TAG</x:String>
|
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">NEW TAG</x:String>
|
||||||
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">Open In Terminal</x:String>
|
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">Open In Terminal</x:String>
|
||||||
<x:String x:Key="Text.Repository.Workspace" xml:space="preserve">WORKSPACE</x:String>
|
|
||||||
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">Git Repository URL</x:String>
|
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">Git Repository URL</x:String>
|
||||||
<x:String x:Key="Text.Reset" xml:space="preserve">Reset Current Branch To Revision</x:String>
|
<x:String x:Key="Text.Reset" xml:space="preserve">Reset Current Branch To Revision</x:String>
|
||||||
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">Reset Mode:</x:String>
|
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">Reset Mode:</x:String>
|
||||||
|
|
|
@ -437,7 +437,6 @@
|
||||||
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">标签列表</x:String>
|
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">标签列表</x:String>
|
||||||
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">新建标签</x:String>
|
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">新建标签</x:String>
|
||||||
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">在终端中打开</x:String>
|
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">在终端中打开</x:String>
|
||||||
<x:String x:Key="Text.Repository.Workspace" xml:space="preserve">工作区</x:String>
|
|
||||||
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">远程仓库地址</x:String>
|
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">远程仓库地址</x:String>
|
||||||
<x:String x:Key="Text.Reset" xml:space="preserve">重置(reset)当前分支到指定版本</x:String>
|
<x:String x:Key="Text.Reset" xml:space="preserve">重置(reset)当前分支到指定版本</x:String>
|
||||||
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">重置模式 :</x:String>
|
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">重置模式 :</x:String>
|
||||||
|
|
|
@ -437,7 +437,6 @@
|
||||||
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">標籤列表</x:String>
|
<x:String x:Key="Text.Repository.Tags" xml:space="preserve">標籤列表</x:String>
|
||||||
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">新建標籤</x:String>
|
<x:String x:Key="Text.Repository.Tags.Add" xml:space="preserve">新建標籤</x:String>
|
||||||
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">在終端中開啟</x:String>
|
<x:String x:Key="Text.Repository.Terminal" xml:space="preserve">在終端中開啟</x:String>
|
||||||
<x:String x:Key="Text.Repository.Workspace" xml:space="preserve">工作區</x:String>
|
|
||||||
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">遠端倉庫地址</x:String>
|
<x:String x:Key="Text.RepositoryURL" xml:space="preserve">遠端倉庫地址</x:String>
|
||||||
<x:String x:Key="Text.Reset" xml:space="preserve">重置(reset)當前分支到指定版本</x:String>
|
<x:String x:Key="Text.Reset" xml:space="preserve">重置(reset)當前分支到指定版本</x:String>
|
||||||
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">重置模式 :</x:String>
|
<x:String x:Key="Text.Reset.Mode" xml:space="preserve">重置模式 :</x:String>
|
||||||
|
|
|
@ -972,6 +972,30 @@
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style Selector="RadioButton.icon_button">
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<ControlTemplate>
|
||||||
|
<Border Background="Transparent">
|
||||||
|
<ContentPresenter x:Name="PART_ContentPresenter"
|
||||||
|
Margin="0"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Content="{TemplateBinding Content}"
|
||||||
|
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||||
|
Foreground="{TemplateBinding Foreground}"
|
||||||
|
RecognizesAccessKey="True" />
|
||||||
|
</Border>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter>
|
||||||
|
|
||||||
|
<Style Selector="^:checked Path">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}"/>
|
||||||
|
<Setter Property="Opacity" Value="0.65"/>
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style Selector="ToggleButton.group_expander">
|
<Style Selector="ToggleButton.group_expander">
|
||||||
<Setter Property="Margin" Value="0"/>
|
<Setter Property="Margin" Value="0"/>
|
||||||
<Setter Property="Padding" Value="0"/>
|
<Setter Property="Padding" Value="0"/>
|
||||||
|
|
|
@ -129,12 +129,6 @@ namespace SourceGit.Views
|
||||||
else if (e.Key == Key.Escape)
|
else if (e.Key == Key.Escape)
|
||||||
{
|
{
|
||||||
vm.ActivePage.CancelPopup();
|
vm.ActivePage.CancelPopup();
|
||||||
|
|
||||||
if (vm.ActivePage.Data is ViewModels.Repository repo)
|
|
||||||
{
|
|
||||||
repo.IsSearching = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,18 +25,6 @@
|
||||||
<Button Classes="icon_button" Width="32" Click="OpenWithExternalTools" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
<Button Classes="icon_button" Width="32" Click="OpenWithExternalTools" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
||||||
<Path Width="13" Height="13" Data="{StaticResource Icons.OpenWith}"/>
|
<Path Width="13" Height="13" Data="{StaticResource Icons.OpenWith}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<ToggleButton Width="32"
|
|
||||||
Background="Transparent"
|
|
||||||
IsChecked="{Binding IsSearching, Mode=TwoWay}">
|
|
||||||
<ToolTip.Tip>
|
|
||||||
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
|
|
||||||
<TextBlock Text="{DynamicResource Text.Repository.Search}" VerticalAlignment="Center"/>
|
|
||||||
<TextBlock Margin="16,0,0,0" Text="{OnPlatform Ctrl+F, macOS=⌘+F}" Opacity=".6" FontSize="11" VerticalAlignment="Center"/>
|
|
||||||
</StackPanel>
|
|
||||||
</ToolTip.Tip>
|
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Search}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
|
@ -79,16 +67,6 @@
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,4,0">
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,4,0">
|
||||||
<ToggleButton Classes="layout_direction"
|
|
||||||
Width="32" Height="26"
|
|
||||||
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseTwoColumnsLayoutInHistories, Mode=TwoWay}"
|
|
||||||
IsVisible="{Binding SelectedViewIndex, Converter={x:Static c:IntConverters.IsZero}}"
|
|
||||||
ToolTip.Tip="{DynamicResource Text.Histories.DisplayMode}"/>
|
|
||||||
|
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding NavigateToCurrentHead}" ToolTip.Tip="{DynamicResource Text.Repository.NavigateToCurrentHead}">
|
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Target}"/>
|
|
||||||
</Button>
|
|
||||||
|
|
||||||
<Button Classes="icon_button" Width="32" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
<Button Classes="icon_button" Width="32" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Clean}"/>
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Clean}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
@ -112,11 +90,10 @@
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- Left Normal Mode -->
|
<!-- Left Panel -->
|
||||||
<Grid Grid.Column="0" Classes="repository_leftpanel" RowDefinitions="28,Auto,28,28,Auto,28,*,28,Auto,28,Auto" Margin="0,0,0,4" IsVisible="{Binding !IsSearching}">
|
<Grid Grid.Column="0" Classes="repository_leftpanel" RowDefinitions="Auto,Auto,*">
|
||||||
<!-- WorkingCopy -->
|
<!-- Page Switcher for Right Panel -->
|
||||||
<TextBlock Grid.Row="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Workspace}"/>
|
<ListBox Grid.Row="0" Margin="8,4,4,0" Classes="page_switcher" Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
||||||
<ListBox Grid.Row="1" Margin="8,4,4,0" Classes="page_switcher" Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
|
||||||
<ListBox.ItemsPanel>
|
<ListBox.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<StackPanel Orientation="Vertical"/>
|
<StackPanel Orientation="Vertical"/>
|
||||||
|
@ -124,9 +101,17 @@
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
<ListBoxItem Height="28" BorderThickness="1,1,1,1" CornerRadius="6,6,0,0">
|
<ListBoxItem Height="28" BorderThickness="1,1,1,1" CornerRadius="6,6,0,0">
|
||||||
<Grid Height="28" ColumnDefinitions="32,*">
|
<Grid Height="28" ColumnDefinitions="32,*,Auto,Auto">
|
||||||
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Histories}"/>
|
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Histories}"/>
|
||||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{DynamicResource Text.Histories}"/>
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{DynamicResource Text.Histories}"/>
|
||||||
|
<ToggleButton Grid.Column="2"
|
||||||
|
Classes="layout_direction"
|
||||||
|
Width="32" Height="26"
|
||||||
|
IsChecked="{Binding Source={x:Static vm:Preference.Instance}, Path=UseTwoColumnsLayoutInHistories, Mode=TwoWay}"
|
||||||
|
ToolTip.Tip="{DynamicResource Text.Histories.DisplayMode}"/>
|
||||||
|
<Button Grid.Column="3" Classes="icon_button" Width="32" Command="{Binding NavigateToCurrentHead}" ToolTip.Tip="{DynamicResource Text.Repository.NavigateToCurrentHead}">
|
||||||
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Target}" Fill="{DynamicResource Brush.FG1}"/>
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
|
|
||||||
|
@ -163,446 +148,472 @@
|
||||||
</ListBoxItem>
|
</ListBoxItem>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<!-- Filter Branches -->
|
<!-- Page Switcher for Left Contents (Dashboard or CommitSearch) -->
|
||||||
<TextBox Grid.Row="2"
|
<Grid Grid.Row="1" Height="24" Margin="0,6" HorizontalAlignment="Center" ColumnDefinitions="48,1,48">
|
||||||
Margin="8,6,4,0"
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
||||||
Height="24"
|
Height="24"
|
||||||
BorderThickness="1"
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
CornerRadius="4"
|
CornerRadius="12"/>
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
|
||||||
Background="Transparent"
|
|
||||||
Watermark="{DynamicResource Text.Repository.FilterBranchTip}"
|
|
||||||
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
|
|
||||||
VerticalContentAlignment="Center">
|
|
||||||
<TextBox.InnerLeftContent>
|
|
||||||
<Path Width="14" Height="14"
|
|
||||||
Margin="6,0,0,0"
|
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
|
||||||
Data="{StaticResource Icons.Search}"/>
|
|
||||||
</TextBox.InnerLeftContent>
|
|
||||||
|
|
||||||
<TextBox.InnerRightContent>
|
<RadioButton Grid.Column="0"
|
||||||
<Button Classes="icon_button"
|
Classes="icon_button"
|
||||||
Width="16"
|
Width="48"
|
||||||
Margin="0,0,6,0"
|
GroupName="SearchGroup"
|
||||||
Command="{Binding ClearSearchBranchFilter}"
|
IsChecked="{Binding IsSearching, Mode=TwoWay, Converter={x:Static c:BoolConverters.Inverse}}">
|
||||||
IsVisible="{Binding SearchBranchFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
|
||||||
HorizontalAlignment="Right">
|
</RadioButton>
|
||||||
<Path Width="14" Height="14"
|
|
||||||
Margin="0,1,0,0"
|
|
||||||
Fill="{DynamicResource Brush.FG1}"
|
|
||||||
Data="{StaticResource Icons.Clear}"/>
|
|
||||||
</Button>
|
|
||||||
</TextBox.InnerRightContent>
|
|
||||||
</TextBox>
|
|
||||||
|
|
||||||
<!-- Local Branches -->
|
<Rectangle Grid.Column="1" Width="0.65" HorizontalAlignment="Center" VerticalAlignment="Stretch" Fill="{DynamicResource Brush.Border2}"/>
|
||||||
<TextBlock Grid.Row="3" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
|
||||||
<TreeView Grid.Row="4"
|
|
||||||
x:Name="localBranchTree"
|
|
||||||
MaxHeight="400"
|
|
||||||
Margin="4,0,2,0"
|
|
||||||
SelectionMode="Multiple"
|
|
||||||
ItemsSource="{Binding LocalBranchTrees}"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
||||||
ContextRequested="OnLocalBranchContextMenuRequested"
|
|
||||||
SelectionChanged="OnLocalBranchTreeSelectionChanged">
|
|
||||||
<TreeView.Styles>
|
|
||||||
<Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode">
|
|
||||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
|
||||||
<Setter Property="CornerRadius" Value="{Binding CornerRadius}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="Grid.repository_leftpanel TreeViewItem /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
<RadioButton Grid.Column="2"
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
Width="48"
|
||||||
<Setter Property="Opacity" Value=".65"/>
|
Classes="icon_button"
|
||||||
</Style>
|
GroupName="SearchGroup">
|
||||||
<Style Selector="Grid.repository_leftpanel TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
</RadioButton>
|
||||||
<Setter Property="Opacity" Value="1"/>
|
|
||||||
</Style>
|
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
|
||||||
<Setter Property="Opacity" Value=".65"/>
|
|
||||||
</Style>
|
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
|
||||||
<Setter Property="Opacity" Value=".8"/>
|
|
||||||
</Style>
|
|
||||||
</TreeView.Styles>
|
|
||||||
<TreeView.ItemTemplate>
|
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}">
|
|
||||||
<Grid Height="24" ColumnDefinitions="20,*,Auto,Auto" Background="Transparent" DoubleTapped="OnDoubleTappedBranchNode">
|
|
||||||
<Path Grid.Column="0" Classes="folder_icon" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,1,0,0" IsVisible="{Binding IsFolder}"/>
|
|
||||||
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Check}" IsVisible="{Binding IsCurrent}" VerticalAlignment="Center"/>
|
|
||||||
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="2,0,0,0" Data="{StaticResource Icons.Branch}" VerticalAlignment="Center">
|
|
||||||
<Path.IsVisible>
|
|
||||||
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
||||||
<Binding Path="!IsFolder"/>
|
|
||||||
<Binding Path="!IsCurrent"/>
|
|
||||||
</MultiBinding>
|
|
||||||
</Path.IsVisible>
|
|
||||||
</Path>
|
|
||||||
|
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace" FontWeight="{Binding IsCurrent, Converter={x:Static c:BoolConverters.BoldIfTrue}}"/>
|
|
||||||
|
|
||||||
<Border Grid.Column="2" Margin="8,0" Height="18" CornerRadius="9" VerticalAlignment="Center" Background="{DynamicResource Brush.Badge}" IsVisible="{Binding IsUpstreamTrackStatusVisible}">
|
|
||||||
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding UpstreamTrackStatus}"/>
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<ToggleButton Grid.Column="3"
|
|
||||||
Classes="filter"
|
|
||||||
Margin="0,0,8,0"
|
|
||||||
Background="Transparent"
|
|
||||||
IsVisible="{Binding IsBranch}"
|
|
||||||
Checked="OnToggleFilter"
|
|
||||||
Unchecked="OnToggleFilter"
|
|
||||||
IsChecked="{Binding IsFiltered}"/>
|
|
||||||
</Grid>
|
|
||||||
</TreeDataTemplate>
|
|
||||||
</TreeView.ItemTemplate>
|
|
||||||
</TreeView>
|
|
||||||
|
|
||||||
<!-- Remotes -->
|
|
||||||
<Grid Grid.Row="5" ColumnDefinitions="*,Auto">
|
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/>
|
|
||||||
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding AddRemote}" ToolTip.Tip="{DynamicResource Text.Repository.Remotes.Add}">
|
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Remote.Add}"/>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<TreeView Grid.Row="6"
|
|
||||||
x:Name="remoteBranchTree"
|
|
||||||
Margin="4,0,2,0"
|
|
||||||
SelectionMode="Multiple"
|
|
||||||
ItemsSource="{Binding RemoteBranchTrees}"
|
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
||||||
ContextRequested="OnRemoteBranchContextMenuRequested"
|
|
||||||
SelectionChanged="OnRemoteBranchTreeSelectionChanged">
|
|
||||||
<TreeView.Styles>
|
|
||||||
<Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode">
|
|
||||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
|
||||||
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
|
||||||
<Setter Property="CornerRadius" Value="{Binding CornerRadius}"/>
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="Grid.repository_leftpanel TreeViewItem /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
<!-- Dashboard -->
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
<Grid Grid.Row="2" RowDefinitions="Auto,28,Auto,28,*,28,Auto,28,Auto" IsVisible="{Binding !IsSearching}">
|
||||||
<Setter Property="Opacity" Value=".65"/>
|
<!-- Filter Branches -->
|
||||||
</Style>
|
<TextBox Grid.Row="0"
|
||||||
<Style Selector="Grid.repository_leftpanel TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
Height="24"
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
Margin="8,0,4,4"
|
||||||
<Setter Property="Opacity" Value="1"/>
|
BorderThickness="1"
|
||||||
</Style>
|
CornerRadius="4"
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
Background="Transparent"
|
||||||
<Setter Property="Opacity" Value=".65"/>
|
Watermark="{DynamicResource Text.Repository.FilterBranchTip}"
|
||||||
</Style>
|
Text="{Binding SearchBranchFilter, Mode=TwoWay}"
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
VerticalContentAlignment="Center">
|
||||||
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
<TextBox.InnerLeftContent>
|
||||||
<Setter Property="Opacity" Value=".8"/>
|
<Path Width="14" Height="14"
|
||||||
</Style>
|
Margin="6,0,0,0"
|
||||||
</TreeView.Styles>
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
|
Data="{StaticResource Icons.Search}"/>
|
||||||
|
</TextBox.InnerLeftContent>
|
||||||
|
|
||||||
<TreeView.ItemTemplate>
|
<TextBox.InnerRightContent>
|
||||||
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}">
|
<Button Classes="icon_button"
|
||||||
<Grid Height="24" ColumnDefinitions="20,*,Auto" Background="Transparent" DoubleTapped="OnDoubleTappedBranchNode">
|
Width="16"
|
||||||
<Path Grid.Column="0" Classes="folder_icon" Width="10" Height="10" HorizontalAlignment="Left" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" VerticalAlignment="Center"/>
|
Margin="0,0,6,0"
|
||||||
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Remote}" IsVisible="{Binding IsRemote}" VerticalAlignment="Center"/>
|
Command="{Binding ClearSearchBranchFilter}"
|
||||||
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="2,0,0,0" Data="{StaticResource Icons.Branch}" IsVisible="{Binding IsBranch}" VerticalAlignment="Center"/>
|
IsVisible="{Binding SearchBranchFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||||
|
HorizontalAlignment="Right">
|
||||||
|
<Path Width="14" Height="14"
|
||||||
|
Margin="0,1,0,0"
|
||||||
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
|
Data="{StaticResource Icons.Clear}"/>
|
||||||
|
</Button>
|
||||||
|
</TextBox.InnerRightContent>
|
||||||
|
</TextBox>
|
||||||
|
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace"/>
|
<!-- Local Branches -->
|
||||||
|
<TextBlock Grid.Row="1" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
||||||
|
<TreeView Grid.Row="2"
|
||||||
|
x:Name="localBranchTree"
|
||||||
|
MaxHeight="400"
|
||||||
|
Margin="8,0,4,0"
|
||||||
|
SelectionMode="Multiple"
|
||||||
|
ItemsSource="{Binding LocalBranchTrees}"
|
||||||
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
|
ContextRequested="OnLocalBranchContextMenuRequested"
|
||||||
|
SelectionChanged="OnLocalBranchTreeSelectionChanged">
|
||||||
|
<TreeView.Styles>
|
||||||
|
<Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode">
|
||||||
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||||
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||||
|
<Setter Property="CornerRadius" Value="{Binding CornerRadius}"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<ToggleButton Grid.Column="2"
|
<Style Selector="Grid.repository_leftpanel TreeViewItem /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
||||||
Classes="filter"
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
Margin="0,0,8,0"
|
<Setter Property="Opacity" Value=".65"/>
|
||||||
Background="Transparent"
|
</Style>
|
||||||
Checked="OnToggleFilter"
|
<Style Selector="Grid.repository_leftpanel TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
||||||
Unchecked="OnToggleFilter"
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
IsVisible="{Binding IsBranch}"
|
<Setter Property="Opacity" Value="1"/>
|
||||||
IsChecked="{Binding IsFiltered}"/>
|
</Style>
|
||||||
</Grid>
|
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
||||||
</TreeDataTemplate>
|
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
||||||
</TreeView.ItemTemplate>
|
<Setter Property="Opacity" Value=".65"/>
|
||||||
</TreeView>
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
</Style>
|
||||||
|
</TreeView.Styles>
|
||||||
|
<TreeView.ItemTemplate>
|
||||||
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}">
|
||||||
|
<Grid Height="24" ColumnDefinitions="20,*,Auto,Auto" Background="Transparent" DoubleTapped="OnDoubleTappedBranchNode">
|
||||||
|
<Path Grid.Column="0" Classes="folder_icon" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,1,0,0" IsVisible="{Binding IsFolder}"/>
|
||||||
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Check}" IsVisible="{Binding IsCurrent}" VerticalAlignment="Center"/>
|
||||||
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="2,0,0,0" Data="{StaticResource Icons.Branch}" VerticalAlignment="Center">
|
||||||
|
<Path.IsVisible>
|
||||||
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
||||||
|
<Binding Path="!IsFolder"/>
|
||||||
|
<Binding Path="!IsCurrent"/>
|
||||||
|
</MultiBinding>
|
||||||
|
</Path.IsVisible>
|
||||||
|
</Path>
|
||||||
|
|
||||||
<!-- Tags -->
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace" FontWeight="{Binding IsCurrent, Converter={x:Static c:BoolConverters.BoldIfTrue}}"/>
|
||||||
<ToggleButton Grid.Row="7" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Border Grid.Column="2" Margin="8,0" Height="18" CornerRadius="9" VerticalAlignment="Center" Background="{DynamicResource Brush.Badge}" IsVisible="{Binding IsUpstreamTrackStatusVisible}">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Tags}"/>
|
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding UpstreamTrackStatus}"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
</Border>
|
||||||
<Button Grid.Column="2" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding CreateNewTag}" ToolTip.Tip="{DynamicResource Text.Repository.Tags.Add}">
|
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Tag.Add}"/>
|
<ToggleButton Grid.Column="3"
|
||||||
|
Classes="filter"
|
||||||
|
Margin="0,0,8,0"
|
||||||
|
Background="Transparent"
|
||||||
|
IsVisible="{Binding IsBranch}"
|
||||||
|
Checked="OnToggleFilter"
|
||||||
|
Unchecked="OnToggleFilter"
|
||||||
|
IsChecked="{Binding IsFiltered}"/>
|
||||||
|
</Grid>
|
||||||
|
</TreeDataTemplate>
|
||||||
|
</TreeView.ItemTemplate>
|
||||||
|
</TreeView>
|
||||||
|
|
||||||
|
<!-- Remotes -->
|
||||||
|
<Grid Grid.Row="3" ColumnDefinitions="*,Auto">
|
||||||
|
<TextBlock Grid.Column="0" Classes="group_header_label" Text="{DynamicResource Text.Repository.Remotes}"/>
|
||||||
|
<Button Grid.Column="1" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding AddRemote}" ToolTip.Tip="{DynamicResource Text.Repository.Remotes.Add}">
|
||||||
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Remote.Add}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ToggleButton>
|
<TreeView Grid.Row="4"
|
||||||
<DataGrid Grid.Row="8"
|
x:Name="remoteBranchTree"
|
||||||
x:Name="tagsList"
|
Margin="8,0,4,0"
|
||||||
MaxHeight="200"
|
SelectionMode="Multiple"
|
||||||
Margin="4,0,2,0"
|
ItemsSource="{Binding RemoteBranchTrees}"
|
||||||
Background="Transparent"
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
ItemsSource="{Binding Tags}"
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
SelectionMode="Single"
|
ContextRequested="OnRemoteBranchContextMenuRequested"
|
||||||
CanUserReorderColumns="False"
|
SelectionChanged="OnRemoteBranchTreeSelectionChanged">
|
||||||
CanUserResizeColumns="False"
|
<TreeView.Styles>
|
||||||
CanUserSortColumns="False"
|
<Style Selector="TreeViewItem" x:DataType="vm:BranchTreeNode">
|
||||||
IsReadOnly="True"
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
||||||
HeadersVisibility="None"
|
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
|
||||||
Focusable="False"
|
<Setter Property="CornerRadius" Value="{Binding CornerRadius}"/>
|
||||||
RowHeight="24"
|
</Style>
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
|
||||||
VerticalScrollBarVisibility="Auto"
|
|
||||||
IsVisible="{Binding IsTagGroupExpanded, Mode=OneWay}"
|
|
||||||
SelectionChanged="OnTagDataGridSelectionChanged"
|
|
||||||
ContextRequested="OnTagContextRequested">
|
|
||||||
<DataGrid.Styles>
|
|
||||||
<Style Selector="DataGridRow">
|
|
||||||
<Setter Property="CornerRadius" Value="4" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
<Style Selector="Grid.repository_leftpanel TreeViewItem /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
||||||
<Setter Property="ClipToBounds" Value="True" />
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
</Style>
|
<Setter Property="Opacity" Value=".65"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
|
<Setter Property="Opacity" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
||||||
|
<Setter Property="Opacity" Value=".65"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel:focus-within TreeViewItem:selected /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
||||||
|
<Setter Property="Background" Value="{DynamicResource Brush.Accent}" />
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
</Style>
|
||||||
|
</TreeView.Styles>
|
||||||
|
|
||||||
<Style Selector="Grid.repository_leftpanel DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
<TreeView.ItemTemplate>
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}">
|
||||||
<Setter Property="Opacity" Value=".5"/>
|
<Grid Height="24" ColumnDefinitions="20,*,Auto" Background="Transparent" DoubleTapped="OnDoubleTappedBranchNode">
|
||||||
</Style>
|
<Path Grid.Column="0" Classes="folder_icon" Width="10" Height="10" HorizontalAlignment="Left" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" VerticalAlignment="Center"/>
|
||||||
<Style Selector="Grid.repository_leftpanel DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Remote}" IsVisible="{Binding IsRemote}" VerticalAlignment="Center"/>
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="2,0,0,0" Data="{StaticResource Icons.Branch}" IsVisible="{Binding IsBranch}" VerticalAlignment="Center"/>
|
||||||
<Setter Property="Opacity" Value="1"/>
|
|
||||||
</Style>
|
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
|
||||||
<Setter Property="Opacity" Value=".65"/>
|
|
||||||
</Style>
|
|
||||||
<Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
|
||||||
<Setter Property="Opacity" Value=".8"/>
|
|
||||||
</Style>
|
|
||||||
</DataGrid.Styles>
|
|
||||||
|
|
||||||
<DataGrid.Columns>
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace"/>
|
||||||
<DataGridTemplateColumn Header="ICON">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate x:DataType="{x:Type m:Tag}">
|
|
||||||
<Path Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icons.Tag}"/>
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
|
|
||||||
<DataGridTemplateColumn Width="*" Header="NAME">
|
<ToggleButton Grid.Column="2"
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
Classes="filter"
|
||||||
<DataTemplate x:DataType="{x:Type m:Tag}">
|
|
||||||
<TextBlock Text="{Binding Name}" Classes="monospace" TextTrimming="CharacterEllipsis" />
|
|
||||||
</DataTemplate>
|
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
|
||||||
</DataGridTemplateColumn>
|
|
||||||
|
|
||||||
<DataGridTemplateColumn Header="FILTER">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
|
||||||
<DataTemplate x:DataType="{x:Type m:Tag}">
|
|
||||||
<ToggleButton Classes="filter"
|
|
||||||
Margin="0,0,8,0"
|
Margin="0,0,8,0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Checked="OnToggleFilter"
|
Checked="OnToggleFilter"
|
||||||
Unchecked="OnToggleFilter"
|
Unchecked="OnToggleFilter"
|
||||||
|
IsVisible="{Binding IsBranch}"
|
||||||
IsChecked="{Binding IsFiltered}"/>
|
IsChecked="{Binding IsFiltered}"/>
|
||||||
</DataTemplate>
|
</Grid>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</TreeDataTemplate>
|
||||||
</DataGridTemplateColumn>
|
</TreeView.ItemTemplate>
|
||||||
</DataGrid.Columns>
|
</TreeView>
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
<!-- Submodules -->
|
<!-- Tags -->
|
||||||
<ToggleButton Grid.Row="9" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
<ToggleButton Grid.Row="5" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Submodules}"/>
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Tags}"/>
|
||||||
<TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
<TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||||
<Button Grid.Column="2"
|
<Button Grid.Column="2" Classes="icon_button" Width="14" Margin="8,0" Command="{Binding CreateNewTag}" ToolTip.Tip="{DynamicResource Text.Repository.Tags.Add}">
|
||||||
Classes="icon_button"
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Tag.Add}"/>
|
||||||
Width="14"
|
</Button>
|
||||||
Margin="8,0"
|
</Grid>
|
||||||
Command="{Binding UpdateSubmodules}"
|
</ToggleButton>
|
||||||
IsVisible="{Binding Submodules, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}"
|
<DataGrid Grid.Row="6"
|
||||||
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Update}">
|
x:Name="tagsList"
|
||||||
<Path x:Name="iconSubmoduleUpdate" Width="12" Height="12" Data="{StaticResource Icons.Loading}"/>
|
MaxHeight="200"
|
||||||
</Button>
|
Margin="8,0,4,0"
|
||||||
<Button Grid.Column="3"
|
Background="Transparent"
|
||||||
Classes="icon_button"
|
ItemsSource="{Binding Tags}"
|
||||||
Width="14"
|
SelectionMode="Single"
|
||||||
Margin="0,0,8,0"
|
CanUserReorderColumns="False"
|
||||||
Command="{Binding AddSubmodule}"
|
CanUserResizeColumns="False"
|
||||||
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Add}">
|
CanUserSortColumns="False"
|
||||||
<Path Width="12" Height="12" Data="{StaticResource Icons.Submodule.Add}"/>
|
IsReadOnly="True"
|
||||||
</Button>
|
HeadersVisibility="None"
|
||||||
</Grid>
|
Focusable="False"
|
||||||
</ToggleButton>
|
RowHeight="24"
|
||||||
<DataGrid Grid.Row="10"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
MaxHeight="200"
|
VerticalScrollBarVisibility="Auto"
|
||||||
Margin="4,0,6,0"
|
IsVisible="{Binding IsTagGroupExpanded, Mode=OneWay}"
|
||||||
Background="Transparent"
|
SelectionChanged="OnTagDataGridSelectionChanged"
|
||||||
ItemsSource="{Binding Submodules}"
|
ContextRequested="OnTagContextRequested">
|
||||||
SelectionMode="Single"
|
<DataGrid.Styles>
|
||||||
CanUserReorderColumns="False"
|
<Style Selector="DataGridRow">
|
||||||
CanUserResizeColumns="False"
|
<Setter Property="CornerRadius" Value="4" />
|
||||||
CanUserSortColumns="False"
|
</Style>
|
||||||
IsReadOnly="True"
|
|
||||||
HeadersVisibility="None"
|
|
||||||
Focusable="False"
|
|
||||||
RowHeight="26"
|
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
|
||||||
VerticalScrollBarVisibility="Auto"
|
|
||||||
ContextRequested="OnSubmoduleContextRequested"
|
|
||||||
DoubleTapped="OnDoubleTappedSubmodule"
|
|
||||||
IsVisible="{Binding IsSubmoduleGroupExpanded, Mode=OneWay}">
|
|
||||||
<DataGrid.Styles>
|
|
||||||
<Style Selector="DataGridRow">
|
|
||||||
<Setter Property="CornerRadius" Value="4" />
|
|
||||||
</Style>
|
|
||||||
|
|
||||||
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
||||||
<Setter Property="ClipToBounds" Value="True" />
|
<Setter Property="ClipToBounds" Value="True" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
<Style Selector="Grid.repository_leftpanel DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
</Style>
|
<Setter Property="Opacity" Value=".5"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
|
<Setter Property="Opacity" Value="1"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
||||||
|
<Setter Property="Opacity" Value=".65"/>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="Grid.repository_leftpanel:focus-within DataGridRow:selected:pointerover /template/ Rectangle#BackgroundRectangle">
|
||||||
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
</Style>
|
||||||
|
</DataGrid.Styles>
|
||||||
|
|
||||||
<Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
<DataGrid.Columns>
|
||||||
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
<DataGridTemplateColumn Header="ICON">
|
||||||
</Style>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGrid.Styles>
|
<DataTemplate x:DataType="{x:Type m:Tag}">
|
||||||
|
<Path Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icons.Tag}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
<DataGrid.Columns>
|
<DataGridTemplateColumn Width="*" Header="NAME">
|
||||||
<DataGridTemplateColumn Header="ICON">
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataTemplate x:DataType="{x:Type m:Tag}">
|
||||||
<DataTemplate>
|
<TextBlock Text="{Binding Name}" Classes="monospace" TextTrimming="CharacterEllipsis" />
|
||||||
<Path Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icons.Submodule}"/>
|
</DataTemplate>
|
||||||
</DataTemplate>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
</DataGridTemplateColumn>
|
||||||
</DataGridTemplateColumn>
|
|
||||||
|
|
||||||
<DataGridTemplateColumn Width="*" Header="NAME">
|
<DataGridTemplateColumn Header="FILTER">
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate x:DataType="{x:Type m:Tag}">
|
||||||
<TextBlock Text="{Binding}" ClipToBounds="True" Classes="monospace"/>
|
<ToggleButton Classes="filter"
|
||||||
</DataTemplate>
|
Margin="0,0,8,0"
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
Background="Transparent"
|
||||||
</DataGridTemplateColumn>
|
Checked="OnToggleFilter"
|
||||||
</DataGrid.Columns>
|
Unchecked="OnToggleFilter"
|
||||||
</DataGrid>
|
IsChecked="{Binding IsFiltered}"/>
|
||||||
</Grid>
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
<!-- Left Search Mode -->
|
<!-- Submodules -->
|
||||||
<Grid Grid.Column="0" RowDefinitions="32,32,*" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
<ToggleButton Grid.Row="7" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
||||||
<!-- Search -->
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
||||||
<TextBox Grid.Row="0"
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="4,0,0,0" Text="{DynamicResource Text.Repository.Submodules}"/>
|
||||||
x:Name="txtSearchCommitsBox"
|
<TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
||||||
Margin="4,2,4,0"
|
<Button Grid.Column="2"
|
||||||
Height="24"
|
Classes="icon_button"
|
||||||
BorderThickness="1"
|
Width="14"
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
Margin="8,0"
|
||||||
Background="{DynamicResource Brush.Contents}"
|
Command="{Binding UpdateSubmodules}"
|
||||||
CornerRadius="4"
|
IsVisible="{Binding Submodules, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}"
|
||||||
Watermark="{DynamicResource Text.Repository.Search}"
|
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Update}">
|
||||||
Text="{Binding SearchCommitFilter, Mode=TwoWay}"
|
<Path x:Name="iconSubmoduleUpdate" Width="12" Height="12" Data="{StaticResource Icons.Loading}"/>
|
||||||
VerticalContentAlignment="Center"
|
</Button>
|
||||||
KeyDown="OnSearchKeyDown">
|
<Button Grid.Column="3"
|
||||||
<TextBox.InnerLeftContent>
|
Classes="icon_button"
|
||||||
<Path Width="14" Height="14"
|
Width="14"
|
||||||
Margin="6,0,0,0"
|
Margin="0,0,8,0"
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
Command="{Binding AddSubmodule}"
|
||||||
Data="{StaticResource Icons.Search}"/>
|
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Add}">
|
||||||
</TextBox.InnerLeftContent>
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Submodule.Add}"/>
|
||||||
|
</Button>
|
||||||
|
</Grid>
|
||||||
|
</ToggleButton>
|
||||||
|
<DataGrid Grid.Row="8"
|
||||||
|
MaxHeight="200"
|
||||||
|
Margin="8,0,4,0"
|
||||||
|
Background="Transparent"
|
||||||
|
ItemsSource="{Binding Submodules}"
|
||||||
|
SelectionMode="Single"
|
||||||
|
CanUserReorderColumns="False"
|
||||||
|
CanUserResizeColumns="False"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
IsReadOnly="True"
|
||||||
|
HeadersVisibility="None"
|
||||||
|
Focusable="False"
|
||||||
|
RowHeight="26"
|
||||||
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
ContextRequested="OnSubmoduleContextRequested"
|
||||||
|
DoubleTapped="OnDoubleTappedSubmodule"
|
||||||
|
IsVisible="{Binding IsSubmoduleGroupExpanded, Mode=OneWay}">
|
||||||
|
<DataGrid.Styles>
|
||||||
|
<Style Selector="DataGridRow">
|
||||||
|
<Setter Property="CornerRadius" Value="4" />
|
||||||
|
</Style>
|
||||||
|
|
||||||
<TextBox.InnerRightContent>
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
||||||
<Button Classes="icon_button"
|
<Setter Property="ClipToBounds" Value="True" />
|
||||||
Width="16"
|
</Style>
|
||||||
Margin="0,0,6,0"
|
|
||||||
Command="{Binding ClearSearchCommitFilter}"
|
|
||||||
IsVisible="{Binding SearchCommitFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
|
||||||
HorizontalAlignment="Right">
|
|
||||||
<Path Width="14" Height="14"
|
|
||||||
Margin="0,1,0,0"
|
|
||||||
Fill="{DynamicResource Brush.FG1}"
|
|
||||||
Data="{StaticResource Icons.Clear}"/>
|
|
||||||
</Button>
|
|
||||||
</TextBox.InnerRightContent>
|
|
||||||
</TextBox>
|
|
||||||
|
|
||||||
<Grid Grid.Row="1" ColumnDefinitions="Auto,*" Margin="4,0">
|
<Style Selector="DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
||||||
<TextBlock Grid.Column="0"
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
||||||
Text="{DynamicResource Text.Repository.Search.By}"
|
</Style>
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
|
||||||
Margin="2,0,0,0"/>
|
|
||||||
|
|
||||||
<ComboBox Grid.Column="1"
|
<Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
||||||
MinHeight="24" Height="24"
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
||||||
Padding="8,0"
|
</Style>
|
||||||
Background="{DynamicResource Brush.Contents}"
|
</DataGrid.Styles>
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
|
||||||
HorizontalAlignment="Right"
|
<DataGrid.Columns>
|
||||||
SelectedIndex="{Binding SearchCommitFilterType, Mode=TwoWay}">
|
<DataGridTemplateColumn Header="ICON">
|
||||||
<ComboBox.Items>
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByBaseInfo}" FontSize="12"/>
|
<DataTemplate>
|
||||||
<TextBlock Text="{DynamicResource Text.Repository.Search.ByFile}" FontSize="12"/>
|
<Path Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icons.Submodule}"/>
|
||||||
</ComboBox.Items>
|
</DataTemplate>
|
||||||
</ComboBox>
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
|
||||||
|
<DataGridTemplateColumn Width="*" Header="NAME">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" ClipToBounds="True" Classes="monospace"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<DataGrid Grid.Row="2"
|
<!-- Commit Search Panel -->
|
||||||
ItemsSource="{Binding SearchedCommits}"
|
<Grid Grid.Row="2" RowDefinitions="Auto,32,*" Margin="8,0,4,8" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
||||||
SelectionMode="Single"
|
<!-- Search Input Box -->
|
||||||
SelectedItem="{Binding SearchResultSelectedCommit, Mode=OneWay}"
|
<TextBox Grid.Row="0"
|
||||||
CanUserReorderColumns="False"
|
x:Name="txtSearchCommitsBox"
|
||||||
CanUserResizeColumns="False"
|
Height="24"
|
||||||
CanUserSortColumns="False"
|
BorderThickness="1"
|
||||||
IsReadOnly="True"
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
HeadersVisibility="None"
|
Background="{DynamicResource Brush.Contents}"
|
||||||
Focusable="False"
|
CornerRadius="4"
|
||||||
RowHeight="50"
|
Watermark="{DynamicResource Text.Repository.Search}"
|
||||||
BorderThickness="1"
|
Text="{Binding SearchCommitFilter, Mode=TwoWay}"
|
||||||
BorderBrush="{DynamicResource Brush.Border2}"
|
VerticalContentAlignment="Center"
|
||||||
Background="{DynamicResource Brush.Contents}"
|
KeyDown="OnSearchKeyDown">
|
||||||
Margin="4,0,4,4"
|
<TextBox.InnerLeftContent>
|
||||||
CornerRadius="4"
|
<Path Width="14" Height="14"
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
Margin="6,0,0,0"
|
||||||
VerticalScrollBarVisibility="Auto"
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
SelectionChanged="OnSearchResultDataGridSelectionChanged">
|
Data="{StaticResource Icons.Search}"/>
|
||||||
<DataGrid.Columns>
|
</TextBox.InnerLeftContent>
|
||||||
<DataGridTemplateColumn Width="*">
|
|
||||||
<DataGridTemplateColumn.CellTemplate>
|
<TextBox.InnerRightContent>
|
||||||
<DataTemplate DataType="m:Commit">
|
<Button Classes="icon_button"
|
||||||
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
Width="16"
|
||||||
<Grid RowDefinitions="Auto,*">
|
Margin="0,0,6,0"
|
||||||
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto">
|
Command="{Binding ClearSearchCommitFilter}"
|
||||||
<v:Avatar Width="16" Height="16"
|
IsVisible="{Binding SearchCommitFilter, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
|
||||||
VerticalAlignment="Center"
|
HorizontalAlignment="Right">
|
||||||
IsHitTestVisible="False"
|
<Path Width="14" Height="14"
|
||||||
User="{Binding Author}"/>
|
Margin="0,1,0,0"
|
||||||
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
<TextBlock Grid.Column="2" Classes="monospace" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
Data="{StaticResource Icons.Clear}"/>
|
||||||
<TextBlock Grid.Column="3" Classes="monospace" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
</Button>
|
||||||
|
</TextBox.InnerRightContent>
|
||||||
|
</TextBox>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||||
|
<TextBlock Grid.Column="0"
|
||||||
|
Text="{DynamicResource Text.Repository.Search.By}"
|
||||||
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
|
Margin="2,0,0,0"/>
|
||||||
|
|
||||||
|
<ComboBox Grid.Column="1"
|
||||||
|
MinHeight="24" Height="24"
|
||||||
|
Padding="8,0"
|
||||||
|
Background="{DynamicResource Brush.Contents}"
|
||||||
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
SelectedIndex="{Binding SearchCommitFilterType, Mode=TwoWay}">
|
||||||
|
<ComboBox.Items>
|
||||||
|
<TextBlock Text="{DynamicResource Text.Repository.Search.ByBaseInfo}" FontSize="12"/>
|
||||||
|
<TextBlock Text="{DynamicResource Text.Repository.Search.ByFile}" FontSize="12"/>
|
||||||
|
</ComboBox.Items>
|
||||||
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<DataGrid Grid.Row="2"
|
||||||
|
ItemsSource="{Binding SearchedCommits}"
|
||||||
|
SelectionMode="Single"
|
||||||
|
SelectedItem="{Binding SearchResultSelectedCommit, Mode=OneWay}"
|
||||||
|
CanUserReorderColumns="False"
|
||||||
|
CanUserResizeColumns="False"
|
||||||
|
CanUserSortColumns="False"
|
||||||
|
IsReadOnly="True"
|
||||||
|
HeadersVisibility="None"
|
||||||
|
Focusable="False"
|
||||||
|
RowHeight="50"
|
||||||
|
BorderThickness="1"
|
||||||
|
BorderBrush="{DynamicResource Brush.Border2}"
|
||||||
|
Background="{DynamicResource Brush.Contents}"
|
||||||
|
CornerRadius="4"
|
||||||
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
|
VerticalScrollBarVisibility="Auto"
|
||||||
|
SelectionChanged="OnSearchResultDataGridSelectionChanged">
|
||||||
|
<DataGrid.Columns>
|
||||||
|
<DataGridTemplateColumn Width="*">
|
||||||
|
<DataGridTemplateColumn.CellTemplate>
|
||||||
|
<DataTemplate DataType="m:Commit">
|
||||||
|
<Border BorderBrush="{DynamicResource Brush.Border2}" BorderThickness="0,0,0,1" Padding="4">
|
||||||
|
<Grid RowDefinitions="Auto,*">
|
||||||
|
<Grid Grid.Row="0" ColumnDefinitions="Auto,*,Auto,Auto">
|
||||||
|
<v:Avatar Width="16" Height="16"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
IsHitTestVisible="False"
|
||||||
|
User="{Binding Author}"/>
|
||||||
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{Binding Author.Name}" Margin="8,0,0,0"/>
|
||||||
|
<TextBlock Grid.Column="2" Classes="monospace" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/>
|
||||||
|
<TextBlock Grid.Column="3" Classes="monospace" Text="{Binding AuthorTimeShortStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<TextBlock Grid.Row="1" Text="{Binding Subject}" VerticalAlignment="Bottom"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</DataGridTemplateColumn.CellTemplate>
|
||||||
|
</DataGridTemplateColumn>
|
||||||
|
</DataGrid.Columns>
|
||||||
|
</DataGrid>
|
||||||
|
|
||||||
<TextBlock Grid.Row="1" Text="{Binding Subject}" VerticalAlignment="Bottom"/>
|
<Path Grid.Row="2"
|
||||||
</Grid>
|
HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||||
</Border>
|
Width="48" Height="48"
|
||||||
</DataTemplate>
|
Data="{StaticResource Icons.Empty}"
|
||||||
</DataGridTemplateColumn.CellTemplate>
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
</DataGridTemplateColumn>
|
IsVisible="{Binding SearchedCommits.Count, Converter={x:Static c:IntConverters.IsZero}}"/>
|
||||||
</DataGrid.Columns>
|
</Grid>
|
||||||
</DataGrid>
|
|
||||||
|
|
||||||
<Path Grid.Row="2"
|
|
||||||
HorizontalAlignment="Center" VerticalAlignment="Center"
|
|
||||||
Width="48" Height="48"
|
|
||||||
Data="{StaticResource Icons.Empty}"
|
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
|
||||||
IsVisible="{Binding SearchedCommits.Count, Converter={x:Static c:IntConverters.IsZero}}"/>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Splitter -->
|
<!-- Splitter -->
|
||||||
|
|
Loading…
Reference in a new issue