2024-02-05 23:08:37 -08:00
|
|
|
<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: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.Repository"
|
|
|
|
x:DataType="vm:Repository">
|
|
|
|
<Grid RowDefinitions="36,*" Background="{DynamicResource Brush.Window}">
|
|
|
|
<!-- Toolbar -->
|
|
|
|
<Border Grid.Row="0" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,0,0,1" Background="{DynamicResource Brush.ToolBar}">
|
|
|
|
<Grid ColumnDefinitions="*,Auto,*">
|
2024-03-03 18:25:19 -08:00
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="4,0,0,0">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenInFileManager}" ToolTip.Tip="{DynamicResource Text.Repository.Explore}">
|
2024-04-01 18:46:48 -07:00
|
|
|
<Path Width="15" Height="13" Data="{StaticResource Icons.Folder.Open}" Margin="0,1,0,0"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button>
|
2024-04-01 18:46:48 -07:00
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenInTerminal}" ToolTip.Tip="{DynamicResource Text.Repository.Terminal}">
|
2024-03-28 02:42:13 -07:00
|
|
|
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button>
|
2024-02-20 18:12:52 -08:00
|
|
|
|
2024-05-29 01:42:47 -07:00
|
|
|
<Button Classes="icon_button" Width="32" Click="OpenWithExternalTools" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
2024-03-28 02:42:13 -07:00
|
|
|
<Path Width="13" Height="13" Data="{StaticResource Icons.OpenWith}"/>
|
|
|
|
</Button>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding Fetch}" ToolTip.Tip="{DynamicResource Text.Fetch}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Fetch}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding Pull}" ToolTip.Tip="{DynamicResource Text.Pull}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Pull}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding Push}" ToolTip.Tip="{DynamicResource Text.Push}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Push}"/>
|
|
|
|
</Button>
|
|
|
|
|
2024-03-31 21:17:50 -07:00
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding StashAll}" ToolTip.Tip="{DynamicResource Text.Stash}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Stashes}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding ApplyPatch}" ToolTip.Tip="{DynamicResource Text.Apply}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Diff}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Rectangle Width="1" Height="16"
|
|
|
|
Margin="16,0,0,0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Fill="{DynamicResource Brush.Border2}"/>
|
|
|
|
|
2024-02-22 18:54:50 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding CreateNewBranch}" ToolTip.Tip="{DynamicResource Text.Repository.NewBranch}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Branch.Add}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="8,0,0,0" Click="OpenGitFlowMenu" ToolTip.Tip="{DynamicResource Text.GitFlow}">
|
2024-06-26 00:51:49 -07:00
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.GitFlow}"/>
|
2024-02-20 18:12:52 -08:00
|
|
|
</Button>
|
2024-06-17 03:25:57 -07:00
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="8,0,0,0" Click="OpenGitLFSMenu" ToolTip.Tip="{DynamicResource Text.GitLFS}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.LFS}"/>
|
|
|
|
</Button>
|
2024-02-05 23:08:37 -08:00
|
|
|
</StackPanel>
|
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,4,0">
|
2024-02-22 18:54:50 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Clean}"/>
|
|
|
|
</Button>
|
|
|
|
|
2024-02-23 03:16:28 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Click="OpenStatistics" ToolTip.Tip="{DynamicResource Text.Repository.Statistics}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Statistics}"/>
|
|
|
|
</Button>
|
|
|
|
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenConfigure}" ToolTip.Tip="{DynamicResource Text.Repository.Configure}">
|
2024-06-17 04:44:54 -07:00
|
|
|
<Path Width="15" Height="15" Data="{StaticResource Icons.Settings}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<!-- Body -->
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<Grid.ColumnDefinitions>
|
2024-06-11 01:36:52 -07:00
|
|
|
<ColumnDefinition Width="{Binding Source={x:Static vm:Preference.Instance}, Path=Layout.RepositorySidebarWidth, Mode=TwoWay}" MinWidth="200" MaxWidth="400"/>
|
2024-03-26 00:18:34 -07:00
|
|
|
<ColumnDefinition Width="3"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<!-- Left Panel -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<Grid Grid.Column="0" Classes="repository_leftpanel" RowDefinitions="Auto,*">
|
2024-06-25 00:03:21 -07:00
|
|
|
<!-- Page Switcher for Left Contents (Dashboard or CommitSearch) -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<Grid Grid.Row="0" Height="24" Margin="0,6" HorizontalAlignment="Center" ColumnDefinitions="48,1,48">
|
2024-06-25 00:03:21 -07:00
|
|
|
<Border Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
|
Height="24"
|
|
|
|
BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
CornerRadius="12"/>
|
|
|
|
|
2024-06-25 05:16:13 -07:00
|
|
|
<RadioButton Grid.Column="0"
|
2024-06-25 00:03:21 -07:00
|
|
|
Classes="icon_button"
|
|
|
|
Width="48"
|
2024-06-25 05:16:13 -07:00
|
|
|
GroupName="SearchGroup"
|
2024-06-25 02:57:21 -07:00
|
|
|
IsChecked="{Binding !IsSearching, Mode=OneWay}">
|
2024-06-25 00:03:21 -07:00
|
|
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Home}"/>
|
|
|
|
</RadioButton>
|
2024-06-25 05:16:13 -07:00
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<Rectangle Grid.Column="1" Width="0.65" HorizontalAlignment="Center" VerticalAlignment="Stretch" Fill="{DynamicResource Brush.Border2}"/>
|
|
|
|
|
|
|
|
<RadioButton Grid.Column="2"
|
|
|
|
Width="48"
|
|
|
|
Classes="icon_button"
|
2024-06-25 02:33:09 -07:00
|
|
|
GroupName="SearchGroup"
|
|
|
|
IsChecked="{Binding IsSearching, Mode=TwoWay}">
|
2024-06-25 00:03:21 -07:00
|
|
|
<Path Width="14" Height="14" Stretch="Fill" HorizontalAlignment="Center" Data="{StaticResource Icons.Search}"/>
|
|
|
|
</RadioButton>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Dashboard -->
|
2024-06-27 03:25:16 -07:00
|
|
|
<Grid Grid.Row="1" Margin="0,0,0,8" RowDefinitions="Auto,Auto,28,Auto,28,*,28,Auto,28,Auto,28,Auto" IsVisible="{Binding !IsSearching}">
|
2024-06-25 05:16:13 -07:00
|
|
|
<!-- Page Switcher for Right Panel -->
|
|
|
|
<Border Grid.Row="0" Margin="8,0,4,0" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" CornerRadius="6">
|
|
|
|
<Border CornerRadius="6" ClipToBounds="True">
|
|
|
|
<ListBox Background="Transparent" SelectedIndex="{Binding SelectedViewIndex, Mode=TwoWay}">
|
|
|
|
<ListBox.Styles>
|
|
|
|
<Style Selector="ListBoxItem">
|
|
|
|
<Setter Property="Height" Value="28"/>
|
|
|
|
<Setter Property="Margin" Value="0"/>
|
|
|
|
<Setter Property="Padding" Value="0"/>
|
|
|
|
<Setter Property="BorderThickness" Value="0,0,0,1"/>
|
|
|
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border2}"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="ListBoxItem:nth-last-child(1)">
|
|
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter, ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
|
|
|
|
<Setter Property="Background" Value="Transparent"/>
|
|
|
|
</Style>
|
|
|
|
<Style Selector="ListBoxItem:selected Grid.view_mode">
|
|
|
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}"/>
|
|
|
|
</Style>
|
|
|
|
</ListBox.Styles>
|
|
|
|
|
|
|
|
<ListBox.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<StackPanel Orientation="Vertical"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ListBox.ItemsPanel>
|
|
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto,Auto">
|
|
|
|
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.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>
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto">
|
|
|
|
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Send}"/>
|
|
|
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{DynamicResource Text.WorkingCopy}"/>
|
|
|
|
<Border Grid.Column="2"
|
|
|
|
Margin="6,0"
|
|
|
|
Height="18"
|
|
|
|
CornerRadius="9"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Background="{DynamicResource Brush.Badge}"
|
|
|
|
IsVisible="{Binding WorkingCopyChangesCount, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
|
2024-06-28 19:47:09 -07:00
|
|
|
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding WorkingCopyChangesCount}" Foreground="{DynamicResource Brush.BadgeFG}"/>
|
2024-06-25 05:16:13 -07:00
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ListBoxItem>
|
|
|
|
|
|
|
|
<ListBoxItem>
|
|
|
|
<Grid Classes="view_mode" ColumnDefinitions="32,*,Auto">
|
|
|
|
<Path Grid.Column="0" Width="12" Height="12" Data="{StaticResource Icons.Stashes}"/>
|
|
|
|
<TextBlock Grid.Column="1" Classes="monospace" Text="{DynamicResource Text.Stashes}"/>
|
|
|
|
<Border Grid.Column="2"
|
|
|
|
Margin="6,0"
|
|
|
|
Height="18"
|
|
|
|
CornerRadius="9"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Background="{DynamicResource Brush.Badge}"
|
|
|
|
IsVisible="{Binding StashesCount, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
|
2024-06-28 19:47:09 -07:00
|
|
|
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding StashesCount}" Foreground="{DynamicResource Brush.BadgeFG}"/>
|
2024-06-25 05:16:13 -07:00
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ListBoxItem>
|
|
|
|
</ListBox>
|
|
|
|
</Border>
|
|
|
|
</Border>
|
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<!-- Filter Branches -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<TextBox Grid.Row="1"
|
2024-06-25 00:03:21 -07:00
|
|
|
Height="24"
|
2024-06-25 05:16:13 -07:00
|
|
|
Margin="8,6,4,0"
|
2024-06-25 00:03:21 -07:00
|
|
|
BorderThickness="1"
|
|
|
|
CornerRadius="4"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
2024-06-27 06:43:15 -07:00
|
|
|
Watermark="{DynamicResource Text.Repository.SearchBranchTag}"
|
2024-06-25 00:03:21 -07:00
|
|
|
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>
|
|
|
|
<Button Classes="icon_button"
|
|
|
|
Width="16"
|
|
|
|
Margin="0,0,6,0"
|
|
|
|
Command="{Binding ClearSearchBranchFilter}"
|
|
|
|
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>
|
|
|
|
|
|
|
|
<!-- Local Branches -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<TextBlock Grid.Row="2" Classes="group_header_label" Text="{DynamicResource Text.Repository.LocalBranches}"/>
|
|
|
|
<TreeView Grid.Row="3"
|
2024-06-25 00:03:21 -07:00
|
|
|
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>
|
|
|
|
|
|
|
|
<Style Selector="Grid.repository_leftpanel TreeViewItem /template/ Border#PART_LayoutRoot:pointerover Border#PART_Background">
|
|
|
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
|
|
|
<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>
|
|
|
|
<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}">
|
2024-06-28 19:47:09 -07:00
|
|
|
<TextBlock Classes="monospace" FontSize="10" HorizontalAlignment="Center" Margin="9,0" Text="{Binding UpstreamTrackStatus}" Foreground="{DynamicResource Brush.BadgeFG}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
</Border>
|
|
|
|
|
|
|
|
<ToggleButton Grid.Column="3"
|
|
|
|
Classes="filter"
|
2024-03-28 02:42:13 -07:00
|
|
|
Margin="0,0,8,0"
|
|
|
|
Background="Transparent"
|
2024-06-25 00:03:21 -07:00
|
|
|
IsVisible="{Binding IsBranch}"
|
2024-03-28 02:42:13 -07:00
|
|
|
Checked="OnToggleFilter"
|
2024-02-06 01:52:16 -08:00
|
|
|
Unchecked="OnToggleFilter"
|
|
|
|
IsChecked="{Binding IsFiltered}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
</Grid>
|
|
|
|
</TreeDataTemplate>
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
<!-- Remotes -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<Grid Grid.Row="4" ColumnDefinitions="*,Auto">
|
2024-06-25 00:03:21 -07:00
|
|
|
<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}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button>
|
|
|
|
</Grid>
|
2024-06-25 05:16:13 -07:00
|
|
|
<TreeView Grid.Row="5"
|
2024-06-25 00:03:21 -07:00
|
|
|
x:Name="remoteBranchTree"
|
|
|
|
Margin="8,0,4,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">
|
|
|
|
<Setter Property="Background" Value="{DynamicResource Brush.AccentHovered}" />
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<TreeView.ItemTemplate>
|
|
|
|
<TreeDataTemplate ItemsSource="{Binding Children}" x:DataType="{x:Type vm:BranchTreeNode}">
|
|
|
|
<Grid Height="24" ColumnDefinitions="20,*,Auto" Background="Transparent" DoubleTapped="OnDoubleTappedBranchNode">
|
|
|
|
<Path Grid.Column="0" Classes="folder_icon" Width="10" Height="10" HorizontalAlignment="Left" Margin="0,2,0,0" IsVisible="{Binding IsFolder}" VerticalAlignment="Center"/>
|
|
|
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="0,2,0,0" Data="{StaticResource Icons.Remote}" IsVisible="{Binding IsRemote}" VerticalAlignment="Center"/>
|
|
|
|
<Path Grid.Column="0" Width="12" Height="12" HorizontalAlignment="Left" Margin="2,0,0,0" Data="{StaticResource Icons.Branch}" IsVisible="{Binding IsBranch}" VerticalAlignment="Center"/>
|
|
|
|
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}" Classes="monospace"/>
|
|
|
|
|
|
|
|
<ToggleButton Grid.Column="2"
|
|
|
|
Classes="filter"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Background="Transparent"
|
|
|
|
Checked="OnToggleFilter"
|
|
|
|
Unchecked="OnToggleFilter"
|
|
|
|
IsVisible="{Binding IsBranch}"
|
|
|
|
IsChecked="{Binding IsFiltered}"/>
|
|
|
|
</Grid>
|
|
|
|
</TreeDataTemplate>
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
<!-- Tags -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<ToggleButton Grid.Row="6" Classes="group_expander" IsChecked="{Binding IsTagGroupExpanded, Mode=TwoWay}">
|
2024-06-25 00:03:21 -07:00
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
2024-06-25 06:32:05 -07:00
|
|
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.Tags}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Tags, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
|
|
|
<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}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
2024-06-25 05:16:13 -07:00
|
|
|
<DataGrid Grid.Row="7"
|
2024-06-25 00:03:21 -07:00
|
|
|
x:Name="tagsList"
|
|
|
|
Margin="8,0,4,0"
|
|
|
|
Background="Transparent"
|
2024-06-27 06:43:15 -07:00
|
|
|
ItemsSource="{Binding VisibleTags}"
|
2024-06-25 00:03:21 -07:00
|
|
|
SelectionMode="Single"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
CanUserResizeColumns="False"
|
|
|
|
CanUserSortColumns="False"
|
|
|
|
IsReadOnly="True"
|
|
|
|
HeadersVisibility="None"
|
|
|
|
Focusable="False"
|
|
|
|
RowHeight="24"
|
|
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
IsVisible="{Binding IsTagGroupExpanded, Mode=OneWay}"
|
|
|
|
SelectionChanged="OnTagDataGridSelectionChanged"
|
2024-06-27 06:43:15 -07:00
|
|
|
ContextRequested="OnTagContextRequested"
|
|
|
|
PropertyChanged="OnTagPropertyChanged">
|
2024-06-25 00:03:21 -07:00
|
|
|
<DataGrid.Styles>
|
|
|
|
<Style Selector="DataGridRow">
|
|
|
|
<Setter Property="CornerRadius" Value="4" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
|
|
|
<Setter Property="ClipToBounds" Value="True" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="Grid.repository_leftpanel DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
|
|
|
<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>
|
|
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Header="ICON">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate x:DataType="{x:Type m:Tag}">
|
2024-06-25 02:40:02 -07:00
|
|
|
<Path Width="10" Height="10" Margin="8,0" Data="{StaticResource Icons.Tag}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="*" Header="NAME">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<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"
|
|
|
|
Background="Transparent"
|
|
|
|
Checked="OnToggleFilter"
|
|
|
|
Unchecked="OnToggleFilter"
|
|
|
|
IsChecked="{Binding IsFiltered}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
<!-- Submodules -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<ToggleButton Grid.Row="8" Classes="group_expander" IsChecked="{Binding IsSubmoduleGroupExpanded, Mode=TwoWay}">
|
2024-06-25 00:03:21 -07:00
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
2024-06-25 06:32:05 -07:00
|
|
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.Submodules}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Submodules, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
Classes="icon_button"
|
|
|
|
Width="14"
|
|
|
|
Margin="8,0"
|
|
|
|
Command="{Binding UpdateSubmodules}"
|
|
|
|
IsVisible="{Binding Submodules, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Update}">
|
2024-06-27 03:25:16 -07:00
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Loading}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
</Button>
|
|
|
|
<Button Grid.Column="3"
|
|
|
|
Classes="icon_button"
|
|
|
|
Width="14"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Command="{Binding AddSubmodule}"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Repository.Submodules.Add}">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Submodule.Add}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
2024-06-25 05:16:13 -07:00
|
|
|
<DataGrid Grid.Row="9"
|
2024-06-25 00:03:21 -07:00
|
|
|
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>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
|
|
|
<Setter Property="ClipToBounds" Value="True" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Styles>
|
|
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Header="ICON">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
2024-06-25 02:40:02 -07:00
|
|
|
<Path Width="10" Height="10" Margin="8,0" Data="{StaticResource Icons.Submodule}"/>
|
2024-06-25 00:03:21 -07:00
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="*" Header="NAME">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
2024-06-25 02:40:02 -07:00
|
|
|
<Border Padding="0,0,4,0">
|
|
|
|
<TextBlock Text="{Binding}" ClipToBounds="True" Classes="monospace" TextTrimming="CharacterEllipsis"/>
|
|
|
|
</Border>
|
2024-06-25 00:03:21 -07:00
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2024-06-27 03:25:16 -07:00
|
|
|
|
|
|
|
<!-- Worktrees -->
|
|
|
|
<ToggleButton Grid.Row="10" Classes="group_expander" IsChecked="{Binding IsWorktreeGroupExpanded, Mode=TwoWay}">
|
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
|
|
<TextBlock Grid.Column="0" Classes="group_header_label" Margin="0" Text="{DynamicResource Text.Repository.Worktrees}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Worktrees, Converter={x:Static c:ListConverters.ToCount}}" Foreground="{DynamicResource Brush.FG2}" FontWeight="Bold"/>
|
|
|
|
<Button Grid.Column="2"
|
|
|
|
Classes="icon_button"
|
|
|
|
Width="14"
|
|
|
|
Margin="8,0"
|
|
|
|
Command="{Binding PruneWorktrees}"
|
|
|
|
IsVisible="{Binding Worktrees, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Repository.Worktrees.Prune}">
|
|
|
|
<Path x:Name="icon" Width="12" Height="12" Data="{StaticResource Icons.Loading}"/>
|
|
|
|
</Button>
|
|
|
|
<Button Grid.Column="3"
|
|
|
|
Classes="icon_button"
|
|
|
|
Width="14"
|
|
|
|
Margin="0,0,8,0"
|
|
|
|
Command="{Binding AddWorktree}"
|
|
|
|
ToolTip.Tip="{DynamicResource Text.Repository.Worktrees.Add}">
|
|
|
|
<Path Width="12" Height="12" Data="{StaticResource Icons.Worktree.Add}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
|
|
|
<DataGrid Grid.Row="11"
|
|
|
|
MaxHeight="200"
|
|
|
|
Margin="8,0,4,0"
|
|
|
|
Background="Transparent"
|
|
|
|
ItemsSource="{Binding Worktrees}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
CanUserReorderColumns="False"
|
|
|
|
CanUserResizeColumns="False"
|
|
|
|
CanUserSortColumns="False"
|
|
|
|
IsReadOnly="True"
|
|
|
|
HeadersVisibility="None"
|
|
|
|
Focusable="False"
|
|
|
|
RowHeight="26"
|
|
|
|
HorizontalScrollBarVisibility="Disabled"
|
|
|
|
VerticalScrollBarVisibility="Auto"
|
|
|
|
ContextRequested="OnWorktreeContextRequested"
|
|
|
|
DoubleTapped="OnDoubleTappedWorktree"
|
|
|
|
IsVisible="{Binding IsWorktreeGroupExpanded, Mode=OneWay}">
|
|
|
|
<DataGrid.Styles>
|
|
|
|
<Style Selector="DataGridRow">
|
|
|
|
<Setter Property="CornerRadius" Value="4" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow /template/ Border#RowBorder">
|
|
|
|
<Setter Property="ClipToBounds" Value="True" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow:pointerover /template/ Rectangle#BackgroundRectangle">
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource Brush.AccentHovered}" />
|
|
|
|
</Style>
|
|
|
|
|
|
|
|
<Style Selector="DataGridRow:selected /template/ Rectangle#BackgroundRectangle">
|
|
|
|
<Setter Property="Fill" Value="{DynamicResource Brush.Accent}" />
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Styles>
|
|
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Header="ICON">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Path Width="10" Height="10" Margin="8,0,0,0" Data="{StaticResource Icons.Worktree}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="*" Header="FullPath">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<TextBlock Classes="monospace" Margin="8,0,0,0" TextTrimming="CharacterEllipsis">
|
|
|
|
<Run Text="{Binding FullPath}"/>
|
|
|
|
<Run Text="{Binding Name}" Foreground="{DynamicResource Brush.FG2}"/>
|
|
|
|
</TextBlock>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Header="FullPath">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Path Width="10" Height="10" Margin="4,0,8,0" Data="{StaticResource Icons.Lock}" Fill="{DynamicResource Brush.FG2}" IsVisible="{Binding IsLocked}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2024-06-25 00:03:21 -07:00
|
|
|
</Grid>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<!-- Commit Search Panel -->
|
2024-06-25 05:16:13 -07:00
|
|
|
<Grid Grid.Row="1" RowDefinitions="Auto,32,*" Margin="8,0,4,8" IsVisible="{Binding IsSearching}" PropertyChanged="OnSearchCommitPanelPropertyChanged">
|
2024-06-25 00:03:21 -07:00
|
|
|
<!-- Search Input Box -->
|
|
|
|
<TextBox Grid.Row="0"
|
|
|
|
x:Name="txtSearchCommitsBox"
|
|
|
|
Height="24"
|
|
|
|
BorderThickness="1"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border2}"
|
|
|
|
Background="{DynamicResource Brush.Contents}"
|
|
|
|
CornerRadius="4"
|
|
|
|
Watermark="{DynamicResource Text.Repository.Search}"
|
|
|
|
Text="{Binding SearchCommitFilter, Mode=TwoWay}"
|
|
|
|
VerticalContentAlignment="Center"
|
|
|
|
KeyDown="OnSearchKeyDown">
|
|
|
|
<TextBox.InnerLeftContent>
|
2024-03-11 03:54:12 -07:00
|
|
|
<Path Width="14" Height="14"
|
2024-06-25 00:03:21 -07:00
|
|
|
Margin="6,0,0,0"
|
|
|
|
Fill="{DynamicResource Brush.FG2}"
|
|
|
|
Data="{StaticResource Icons.Search}"/>
|
|
|
|
</TextBox.InnerLeftContent>
|
|
|
|
|
|
|
|
<TextBox.InnerRightContent>
|
|
|
|
<Button Classes="icon_button"
|
|
|
|
Width="16"
|
|
|
|
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,*">
|
|
|
|
<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>
|
2024-06-07 03:43:37 -07:00
|
|
|
|
2024-06-25 00:03:21 -07:00
|
|
|
<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"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
2024-06-25 00:03:21 -07:00
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</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>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
2024-03-26 00:18:34 -07:00
|
|
|
|
|
|
|
<!-- Splitter -->
|
2024-02-05 23:08:37 -08:00
|
|
|
<GridSplitter Grid.Column="1"
|
2024-03-26 00:18:34 -07:00
|
|
|
MinWidth="1"
|
|
|
|
HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
|
|
|
|
Background="Transparent"
|
|
|
|
BorderThickness="0,0,1,0"
|
|
|
|
BorderBrush="{DynamicResource Brush.Border0}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
|
|
|
|
<!-- Right -->
|
2024-06-18 03:27:57 -07:00
|
|
|
<Grid Grid.Column="2" RowDefinitions="Auto,Auto,*">
|
2024-06-22 04:35:15 -07:00
|
|
|
<Grid Grid.Row="0" Height="28" ColumnDefinitions="*,Auto,Auto,Auto" Background="{DynamicResource Brush.Conflict}" IsVisible="{Binding InProgressContext, Converter={x:Static ObjectConverters.IsNotNull}}">
|
2024-04-01 06:27:08 -07:00
|
|
|
<ContentControl Grid.Column="0" Margin="8,0" Content="{Binding InProgressContext}">
|
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="vm:CherryPickInProgress">
|
2024-06-13 02:08:38 -07:00
|
|
|
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.CherryPick}"/>
|
2024-04-01 06:27:08 -07:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:RebaseInProgress">
|
2024-06-13 02:08:38 -07:00
|
|
|
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Rebase}"/>
|
2024-04-01 06:27:08 -07:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:RevertInProgress">
|
2024-06-13 02:08:38 -07:00
|
|
|
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Revert}"/>
|
2024-04-01 06:27:08 -07:00
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:MergeInProgress">
|
2024-06-13 02:08:38 -07:00
|
|
|
<TextBlock FontWeight="Bold" Foreground="{DynamicResource Brush.ConflictForeground}" Text="{DynamicResource Text.InProgress.Merge}"/>
|
2024-04-01 06:27:08 -07:00
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
|
2024-06-22 04:35:15 -07:00
|
|
|
<Button Grid.Column="1"
|
|
|
|
Classes="flat"
|
|
|
|
FontWeight="Regular"
|
|
|
|
BorderThickness="0"
|
|
|
|
Content="{DynamicResource Text.Repository.Resolve}"
|
|
|
|
Padding="8,0" Margin="4,0"
|
|
|
|
Command="{Binding GotoResolve}">
|
2024-02-05 23:08:37 -08:00
|
|
|
<Button.IsVisible>
|
2024-04-01 04:59:15 -07:00
|
|
|
<Binding Path="SelectedViewIndex" Converter="{x:Static c:IntConverters.IsNotOne}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Button.IsVisible>
|
|
|
|
</Button>
|
2024-06-22 04:35:15 -07:00
|
|
|
<Button Grid.Column="2"
|
|
|
|
Classes="flat primary"
|
|
|
|
FontWeight="Regular"
|
|
|
|
BorderThickness="0"
|
|
|
|
Content="{DynamicResource Text.Repository.Continue}"
|
|
|
|
Padding="8,0" Margin="4,0"
|
|
|
|
Command="{Binding ContinueMerge}"
|
|
|
|
IsVisible="{Binding !HasUnsolvedConflicts}"/>
|
|
|
|
<Button Grid.Column="3"
|
|
|
|
Classes="flat"
|
|
|
|
FontWeight="Regular"
|
|
|
|
BorderThickness="0"
|
|
|
|
Content="{DynamicResource Text.Repository.Abort}"
|
|
|
|
Padding="8,0" Margin="4,0"
|
|
|
|
Command="{Binding AbortMerge}"/>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
|
2024-06-18 03:27:57 -07:00
|
|
|
<Border Grid.Row="1" Background="{DynamicResource Brush.Window}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource Brush.Border0}">
|
|
|
|
<Border.IsVisible>
|
|
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
|
|
<Binding Path="SelectedViewIndex" Converter="{x:Static c:IntConverters.IsZero}"/>
|
2024-06-30 20:57:13 -07:00
|
|
|
<Binding Path="Settings.Filters.Count" Converter="{x:Static c:IntConverters.IsGreaterThanZero}"/>
|
2024-06-18 03:27:57 -07:00
|
|
|
</MultiBinding>
|
|
|
|
</Border.IsVisible>
|
|
|
|
|
|
|
|
<Grid Height="28" ColumnDefinitions="Auto,*,Auto">
|
|
|
|
<TextBlock Grid.Column="0" Margin="8,0,0,0" Classes="info_label" Text="{DynamicResource Text.Repository.FilterCommitPrefix}"/>
|
|
|
|
|
2024-06-30 20:57:13 -07:00
|
|
|
<ItemsControl Grid.Column="1" Margin="8,0,0,0" ItemsSource="{Binding Settings.Filters}">
|
2024-06-18 03:27:57 -07:00
|
|
|
<ItemsControl.ItemsPanel>
|
|
|
|
<ItemsPanelTemplate>
|
|
|
|
<VirtualizingStackPanel Orientation="Horizontal" VerticalAlignment="Center"/>
|
|
|
|
</ItemsPanelTemplate>
|
|
|
|
</ItemsControl.ItemsPanel>
|
|
|
|
|
|
|
|
<ItemsControl.ItemTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Border Height="20" Margin="0,0,6,0" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}" CornerRadius="12">
|
|
|
|
<TextBlock Classes="monospace" Text="{Binding Converter={x:Static c:StringConverters.TrimRefsPrefix}}" Margin="8,0"/>
|
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ItemsControl.ItemTemplate>
|
|
|
|
</ItemsControl>
|
|
|
|
|
|
|
|
<Button Grid.Column="2" Classes="icon_button" Command="{Binding ClearHistoriesFilter}">
|
|
|
|
<TextBlock Margin="16,0,8,0" Text="{DynamicResource Text.Repository.ClearAllCommitsFilter}" Foreground="{DynamicResource Brush.Accent}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<ContentControl Grid.Row="2" Content="{Binding SelectedView}">
|
2024-05-30 00:13:59 -07:00
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="vm:Histories">
|
|
|
|
<v:Histories NavigationId="{Binding NavigationId}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:WorkingCopy">
|
|
|
|
<v:WorkingCopy/>
|
|
|
|
</DataTemplate>
|
|
|
|
|
|
|
|
<DataTemplate DataType="vm:StashesPage">
|
|
|
|
<v:StashesPage/>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
2024-02-05 23:08:37 -08:00
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|