2020-07-03 00:24:31 -07:00
|
|
|
<UserControl x:Class="SourceGit.UI.Dashboard"
|
|
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
xmlns:source="clr-namespace:SourceGit"
|
|
|
|
xmlns:local="clr-namespace:SourceGit.UI"
|
|
|
|
xmlns:converters="clr-namespace:SourceGit.Converters"
|
|
|
|
mc:Ignorable="d"
|
2020-08-04 18:32:24 -07:00
|
|
|
d:DesignHeight="450" d:DesignWidth="800"
|
|
|
|
Unloaded="Cleanup">
|
2020-07-03 00:24:31 -07:00
|
|
|
<UserControl.Resources>
|
|
|
|
<RoutedUICommand x:Key="OpenSearchBarCommand" Text="OpenSearchBar"/>
|
|
|
|
<RoutedUICommand x:Key="HideSearchBarCommand" Text="HideSearchBar"/>
|
|
|
|
</UserControl.Resources>
|
|
|
|
|
|
|
|
<UserControl.InputBindings>
|
|
|
|
<KeyBinding Key="F" Modifiers="Ctrl" Command="{StaticResource OpenSearchBarCommand}"/>
|
|
|
|
<KeyBinding Key="ESC" Command="{StaticResource HideSearchBarCommand}"/>
|
|
|
|
</UserControl.InputBindings>
|
|
|
|
|
|
|
|
<UserControl.CommandBindings>
|
|
|
|
<CommandBinding Command="{StaticResource OpenSearchBarCommand}" Executed="OpenSearchBar"/>
|
|
|
|
<CommandBinding Command="{StaticResource HideSearchBarCommand}" Executed="HideSearchBar"/>
|
|
|
|
</UserControl.CommandBindings>
|
|
|
|
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="32"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- TitleBar -->
|
2020-08-05 19:21:30 -07:00
|
|
|
<Grid Grid.Row="0" Panel.ZIndex="100">
|
2020-08-07 08:40:23 -07:00
|
|
|
<Border Background="{StaticResource Brush.BG1}" Margin="0,16,0,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Border.Effect>
|
2020-08-03 01:23:00 -07:00
|
|
|
<DropShadowEffect ShadowDepth="2" Direction="270" Opacity=".5" Color="Black"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Border.Effect>
|
|
|
|
</Border>
|
|
|
|
|
2020-08-05 19:21:30 -07:00
|
|
|
<Grid Background="{StaticResource Brush.BG1}">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
2020-08-03 01:23:00 -07:00
|
|
|
<ColumnDefinition Width="Auto"/>
|
2020-08-03 04:49:23 -07:00
|
|
|
<ColumnDefinition Width="*"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2020-08-03 04:49:23 -07:00
|
|
|
<!-- Browser -->
|
2020-08-03 01:23:00 -07:00
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="6,0">
|
2020-08-03 04:49:23 -07:00
|
|
|
<Button Click="OpenExplorer" Margin="4,0,0,0" ToolTip="Open In File Browser">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Folder.Open}"/>
|
|
|
|
<Label Content="Explore"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
<Button Click="OpenConfigure" Margin="4,0,0,0" ToolTip="Configure This Repository">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Setting}"/>
|
|
|
|
<Label Content="Configure"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- Common Git Options -->
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal" Margin="6,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Button Click="OpenFetch" Margin="4,0">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Fetch}"/>
|
|
|
|
<Label Content="Fetch"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
<Button Click="OpenPull" Margin="4,0">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Pull}"/>
|
|
|
|
<Label Content="Pull"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
<Button Click="OpenPush" Margin="4,0">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Push}"/>
|
|
|
|
<Label Content="Push"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
2020-08-03 01:23:00 -07:00
|
|
|
<Button Click="OpenStash" Margin="4,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.SaveStash}"/>
|
|
|
|
<Label Content="Stash"/>
|
|
|
|
</StackPanel>
|
2020-08-03 04:49:23 -07:00
|
|
|
</Button>
|
|
|
|
<Button Click="OpenApply">
|
2020-07-03 00:24:31 -07:00
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Apply}"/>
|
|
|
|
<Label Content="Apply"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<!-- External Options -->
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
2020-08-03 04:49:23 -07:00
|
|
|
<Button Click="OpenSearch" Margin="4,0" ToolTip="Search Commit">
|
2020-07-03 00:24:31 -07:00
|
|
|
<StackPanel Orientation="Horizontal">
|
2020-07-20 22:35:59 -07:00
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Search}"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<Label Content="Search"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
<Button Click="OpenTerminal" Margin="4,0" ToolTip="Open Git Bash">
|
|
|
|
<StackPanel Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Terminal}"/>
|
|
|
|
<Label Content="Terminal"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Main body -->
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="300"/>
|
|
|
|
<ColumnDefinition Width="1"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!-- Left panel -->
|
|
|
|
<Grid Grid.Column="0" x:Name="main" Background="{StaticResource Brush.BG4}">
|
|
|
|
<Grid.RowDefinitions>
|
2020-07-22 05:14:39 -07:00
|
|
|
<RowDefinition Height="24"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<RowDefinition Height="Auto"/>
|
2020-07-22 05:14:39 -07:00
|
|
|
<RowDefinition Height="24"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<RowDefinition Height="Auto"/>
|
2020-07-22 05:14:39 -07:00
|
|
|
<RowDefinition Height="24"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<RowDefinition Height="*"/>
|
2020-07-22 05:14:39 -07:00
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="1"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<RowDefinition Height="Auto"/>
|
2020-07-22 05:14:39 -07:00
|
|
|
<RowDefinition Height="24"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Grid.Resources>
|
|
|
|
<converters:BoolToCollapsed x:Key="Bool2Collapsed"/>
|
|
|
|
</Grid.Resources>
|
|
|
|
|
|
|
|
<!-- WORKSPACE -->
|
2020-07-17 03:01:24 -07:00
|
|
|
<Label Grid.Row="0" Margin="4,0,0,0" Content="WORKSPACE" Style="{StaticResource Style.Label.GroupHeader}" />
|
2020-07-03 00:24:31 -07:00
|
|
|
<ListView
|
|
|
|
Grid.Row="1"
|
|
|
|
x:Name="workspace"
|
|
|
|
Background="{StaticResource Brush.BG3}"
|
2020-07-13 18:47:24 -07:00
|
|
|
Style="{StaticResource Style.ListView.Borderless}"
|
|
|
|
SelectionMode="Single">
|
2020-07-03 00:24:31 -07:00
|
|
|
<ListViewItem x:Name="historiesSwitch" Selected="SwitchHistories" IsSelected="True">
|
|
|
|
<StackPanel Margin="16,0,0,0" Orientation="Horizontal">
|
|
|
|
<Path Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Histories}"/>
|
|
|
|
<Label Margin="4,0,0,0" Content="Histories"/>
|
|
|
|
</StackPanel>
|
|
|
|
</ListViewItem>
|
|
|
|
|
|
|
|
<ListViewItem x:Name="workingCopySwitch" Selected="SwitchWorkingCopy">
|
|
|
|
<Grid Margin="16,0,0,0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.WorkingCopy}"/>
|
|
|
|
<Label Grid.Column="1" Margin="4,0,0,0" Content="Commit"/>
|
|
|
|
<Border Grid.Column="2" x:Name="localChangesBadge" Style="{StaticResource Style.Border.Badge}">
|
|
|
|
<Label x:Name="localChangesCount" Margin="4,-2,4,-2" Content="999" FontSize="10"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ListViewItem>
|
|
|
|
|
|
|
|
<ListViewItem x:Name="stashesSwitch" Selected="SwitchStashes">
|
|
|
|
<Grid Margin="16,0,0,0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Stashes}"/>
|
|
|
|
<Label Grid.Column="1" Margin="4,0,0,0" Content="Stashes"/>
|
|
|
|
<Border Grid.Column="2" x:Name="stashBadge" Style="{StaticResource Style.Border.Badge}">
|
|
|
|
<Label x:Name="stashCount" Margin="4,-2,4,-2" Content="999" FontSize="10"/>
|
|
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
</ListViewItem>
|
|
|
|
</ListView>
|
|
|
|
|
|
|
|
<!-- LOCAL BRANCHES -->
|
2020-07-22 05:14:39 -07:00
|
|
|
<Grid Grid.Row="2" Margin="4,0,2,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="8"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Column="0" Content="LOCAL BRANCHES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
|
|
|
<Button Grid.Column="1" Click="OpenGitFlow" Background="Transparent" ToolTip="GIT FLOW">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Flow}"/>
|
|
|
|
</Button>
|
|
|
|
<Button Grid.Column="3" Click="OpenNewBranch" Background="Transparent" ToolTip="NEW BRANCH">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Branch.Add}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
<TreeView
|
|
|
|
Grid.Row="3"
|
|
|
|
x:Name="localBranchTree"
|
2020-08-04 20:47:21 -07:00
|
|
|
Padding="0"
|
2020-07-03 00:24:31 -07:00
|
|
|
Background="{StaticResource Brush.BG3}"
|
|
|
|
FontFamily="Consolas"
|
2020-08-07 08:40:23 -07:00
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
2020-07-03 00:24:31 -07:00
|
|
|
LostFocus="TreeLostFocus"
|
|
|
|
SelectedItemChanged="LocalBranchSelected"
|
|
|
|
PreviewMouseWheel="TreeMouseWheel">
|
|
|
|
<TreeView.ItemContainerStyle>
|
|
|
|
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Style.TreeView.ItemContainerStyle}">
|
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
|
|
|
<EventSetter Event="ContextMenuOpening" Handler="LocalBranchContextMenuOpening"/>
|
|
|
|
<EventSetter Event="MouseDoubleClick" Handler="LocalBranchMouseDoubleClick"/>
|
|
|
|
</Style>
|
|
|
|
</TreeView.ItemContainerStyle>
|
|
|
|
<TreeView.ItemTemplate>
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
|
|
<Grid Height="24">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Path Grid.Column="0" Width="10" x:Name="icon" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
2020-08-07 08:40:23 -07:00
|
|
|
<TextBlock Grid.Column="1" x:Name="name" Text="{Binding Name}" Padding="4,0,0,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}" ClipToBounds="True"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
|
|
|
<Border Style="{StaticResource Style.Border.Badge}" Visibility="{Binding TrackVisibility}">
|
|
|
|
<Label Margin="4,-2,4,-2" Content="{Binding Branch.UpstreamTrack}" FontSize="10"/>
|
|
|
|
</Border>
|
|
|
|
<ToggleButton
|
|
|
|
Visibility="{Binding FilterVisibility}"
|
|
|
|
IsChecked="{Binding IsFiltered, Mode=OneWay}"
|
|
|
|
Checked="FilterChanged"
|
|
|
|
Unchecked="FilterChanged"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
|
|
|
ToolTip="FILTER"/>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding IsCurrent}" Value="True">
|
|
|
|
<Setter TargetName="name" Property="FontWeight" Value="ExtraBold"/>
|
|
|
|
<Setter TargetName="icon" Property="Data" Value="{StaticResource Icon.Check}"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Branch}" Value="{x:Null}"/>
|
|
|
|
<Condition Binding="{Binding IsExpanded}" Value="False"/>
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Branch}" Value="{x:Null}"/>
|
|
|
|
<Condition Binding="{Binding IsExpanded}" Value="True"/>
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
</HierarchicalDataTemplate.Triggers>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</TreeView.ItemTemplate>
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
<!-- REMOTES -->
|
2020-07-22 05:14:39 -07:00
|
|
|
<Grid Grid.Row="4" Margin="4,0,2,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Column="0" Content="REMOTES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
|
|
|
<Button Grid.Column="1" Click="OpenRemote" ToolTip="ADD REMOTE">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{DynamicResource Icon.Remote.Add}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
<TreeView
|
|
|
|
Grid.Row="5"
|
2020-08-04 20:47:21 -07:00
|
|
|
x:Name="remoteBranchTree"
|
|
|
|
Padding="0"
|
2020-07-03 00:24:31 -07:00
|
|
|
Background="{StaticResource Brush.BG3}"
|
|
|
|
FontFamily="Consolas"
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
SelectedItemChanged="RemoteBranchSelected"
|
|
|
|
LostFocus="TreeLostFocus"
|
|
|
|
PreviewMouseWheel="TreeMouseWheel">
|
|
|
|
<TreeView.ItemContainerStyle>
|
|
|
|
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Style.TreeView.ItemContainerStyle}">
|
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
|
|
|
<EventSetter Event="ContextMenuOpening" Handler="RemoteContextMenuOpening"/>
|
|
|
|
</Style>
|
|
|
|
</TreeView.ItemContainerStyle>
|
|
|
|
|
|
|
|
<TreeView.Resources>
|
|
|
|
<HierarchicalDataTemplate DataType="{x:Type local:RemoteNode}" ItemsSource="{Binding Children}">
|
|
|
|
<Grid Height="24">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Path Grid.Column="0" Width="10" x:Name="icon" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Remote}"/>
|
|
|
|
<TextBlock Grid.Column="1" x:Name="name" Text="{Binding Name}" Padding="4,0,0,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}" ClipToBounds="True"/>
|
|
|
|
</Grid>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate DataType="{x:Type local:BranchNode}" ItemsSource="{Binding Children}">
|
|
|
|
<Grid Height="24">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Path Grid.Column="0" Width="10" x:Name="icon" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Branch}"/>
|
|
|
|
<TextBlock Grid.Column="1" x:Name="name" Text="{Binding Name}" Padding="4,0,0,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}" ClipToBounds="True"/>
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Column="2"
|
|
|
|
Visibility="{Binding FilterVisibility}"
|
|
|
|
IsChecked="{Binding IsFiltered, Mode=OneWay}"
|
|
|
|
Checked="FilterChanged"
|
|
|
|
Unchecked="FilterChanged"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
|
|
|
ToolTip="FILTER"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate.Triggers>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Branch}" Value="{x:Null}"/>
|
|
|
|
<Condition Binding="{Binding IsExpanded}" Value="False"/>
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Branch}" Value="{x:Null}"/>
|
|
|
|
<Condition Binding="{Binding IsExpanded}" Value="True"/>
|
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
</HierarchicalDataTemplate.Triggers>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</TreeView.Resources>
|
|
|
|
</TreeView>
|
|
|
|
|
|
|
|
<!-- TAGS -->
|
|
|
|
<ToggleButton
|
|
|
|
x:Name="tagListToggle"
|
|
|
|
Grid.Row="6"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Expender}"
|
|
|
|
IsChecked="{Binding Source={x:Static source:App.Preference}, Path=UIShowTags, Mode=TwoWay}">
|
2020-07-22 05:14:39 -07:00
|
|
|
<Grid Margin="4,0,2,0">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Column="0" x:Name="tagCount" Content="TAGS" Style="{StaticResource Style.Label.GroupHeader}"/>
|
|
|
|
<Button Grid.Column="1" Click="OpenNewTag" ToolTip="NEW TAG">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag.Add}"/>
|
|
|
|
</Button>
|
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
2020-07-22 05:14:39 -07:00
|
|
|
<Rectangle Grid.Row="7" Height="1" Fill="{StaticResource Brush.BG3}"/>
|
2020-07-13 19:26:54 -07:00
|
|
|
<DataGrid
|
2020-07-22 05:14:39 -07:00
|
|
|
Grid.Row="8"
|
2020-07-03 00:24:31 -07:00
|
|
|
x:Name="tagList"
|
|
|
|
Visibility="{Binding ElementName=tagListToggle, Path=IsChecked, Converter={StaticResource Bool2Collapsed}}"
|
|
|
|
Background="{StaticResource Brush.BG3}"
|
2020-07-13 19:26:54 -07:00
|
|
|
RowHeight="24"
|
2020-07-03 00:24:31 -07:00
|
|
|
Height="200"
|
|
|
|
LostFocus="TagLostFocus"
|
|
|
|
SelectionChanged="TagSelectionChanged"
|
2020-07-22 05:14:39 -07:00
|
|
|
ContextMenuOpening="TagContextMenuOpening"
|
2020-07-13 19:26:54 -07:00
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
2020-07-03 00:24:31 -07:00
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
2020-07-13 19:26:54 -07:00
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow">
|
2020-07-22 05:14:39 -07:00
|
|
|
<DataGrid.Resources>
|
2020-07-13 19:26:54 -07:00
|
|
|
<Style x:Key="Style.DataGridText.TagName" TargetType="{x:Type TextBlock}">
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource Brush.FG}"/>
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Resources>
|
2020-07-03 00:24:31 -07:00
|
|
|
|
2020-07-13 19:26:54 -07:00
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="26">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Tag}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTextColumn Width="*" IsReadOnly="True" Binding="{Binding Name}" ElementStyle="{StaticResource Style.DataGridText.TagName}"/>
|
|
|
|
|
|
|
|
<DataGridTemplateColumn Width="16">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Column="2"
|
|
|
|
IsChecked="{Binding IsFiltered, Mode=TwoWay}"
|
|
|
|
Checked="FilterChanged"
|
|
|
|
Unchecked="FilterChanged"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
|
|
|
ToolTip="FILTER"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2020-07-22 05:14:39 -07:00
|
|
|
|
|
|
|
<!-- SUBMODULES -->
|
|
|
|
<ToggleButton
|
|
|
|
x:Name="submoduleListToggle"
|
|
|
|
Grid.Row="9"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Expender}"
|
|
|
|
IsChecked="False">
|
|
|
|
<Grid Margin="4,0,2,0">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
2020-07-24 02:17:53 -07:00
|
|
|
<ColumnDefinition Width="8"/>
|
|
|
|
<ColumnDefinition Width="16"/>
|
2020-07-22 05:14:39 -07:00
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Column="0" x:Name="submoduleCount" Content="SUBMODULES" Style="{StaticResource Style.Label.GroupHeader}"/>
|
|
|
|
<Button Grid.Column="1" Click="OpenAddSubmodule" ToolTip="ADD SUBMODULE">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Submodule}"/>
|
|
|
|
</Button>
|
2020-07-24 02:17:53 -07:00
|
|
|
<Button Grid.Column="3" Click="UpdateSubmodule" ToolTip="UPDATE SUBMODULE">
|
|
|
|
<Path Width="14" Height="14" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Loading}"/>
|
|
|
|
</Button>
|
2020-07-22 05:14:39 -07:00
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
|
|
|
<DataGrid
|
|
|
|
Grid.Row="11"
|
|
|
|
x:Name="submoduleList"
|
|
|
|
Visibility="{Binding ElementName=submoduleListToggle, Path=IsChecked, Converter={StaticResource Bool2Collapsed}}"
|
|
|
|
Background="{StaticResource Brush.BG3}"
|
|
|
|
RowHeight="24"
|
2020-07-22 23:07:02 -07:00
|
|
|
Height="100"
|
2020-07-22 05:14:39 -07:00
|
|
|
LostFocus="SubmoduleLostFocus"
|
|
|
|
ContextMenuOpening="SubmoduleContextMenuOpening"
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow">
|
|
|
|
<DataGrid.Resources>
|
|
|
|
<Style x:Key="Style.DataGridText.SubmodulePath" TargetType="{x:Type TextBlock}">
|
|
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
|
|
<Setter Property="Foreground" Value="{StaticResource Brush.FG}"/>
|
|
|
|
</Style>
|
|
|
|
</DataGrid.Resources>
|
|
|
|
|
|
|
|
<DataGrid.RowStyle>
|
|
|
|
<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource Style.DataGridRow}">
|
|
|
|
<EventSetter Event="MouseDoubleClick" Handler="SubmoduleMouseDoubleClick"/>
|
|
|
|
</Style>
|
|
|
|
</DataGrid.RowStyle>
|
|
|
|
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="26">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Submodule}"/>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
|
|
|
|
<DataGridTextColumn Width="*" IsReadOnly="True" Binding="{Binding}" ElementStyle="{StaticResource Style.DataGridText.SubmodulePath}"/>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Splitter -->
|
2020-08-03 04:25:36 -07:00
|
|
|
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource Brush.BG3}"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
|
|
|
|
<!-- Right -->
|
|
|
|
<Grid Grid.Column="2">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<!-- Abort panel -->
|
2020-08-05 20:08:58 -07:00
|
|
|
<Grid x:Name="abortPanel" Grid.Row="0" Background="{StaticResource Brush.BG7}" Visibility="Collapsed">
|
2020-07-03 00:24:31 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Label Grid.Column="0" x:Name="txtMergeProcessing" FontWeight="DemiBold" Foreground="{StaticResource Brush.BG4}"/>
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
|
|
|
<Button x:Name="btnResolve" Click="Resolve" Content="RESOLVE" Margin="4">
|
|
|
|
<Button.Style>
|
|
|
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.Bordered}">
|
|
|
|
<Setter Property="Background" Value="{StaticResource Brush.BG1}"/>
|
|
|
|
<Setter Property="Margin" Value="2"/>
|
|
|
|
</Style>
|
|
|
|
</Button.Style>
|
|
|
|
</Button>
|
|
|
|
<Button x:Name="btnContinue" Click="Continue" Content="CONTINUE" Style="{StaticResource Style.Button.AccentBordered}" Margin="4"/>
|
|
|
|
<Button Grid.Column="3" Click="Abort" Content="ABORT" Style="{StaticResource Style.Button.Bordered}" Foreground="{StaticResource Brush.BG1}" Margin="4"/>
|
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Others -->
|
|
|
|
<local:Histories Grid.Row="1" x:Name="histories" Visibility="Visible"/>
|
|
|
|
<local:WorkingCopy Grid.Row="1" x:Name="commits" Visibility="Collapsed"/>
|
|
|
|
<local:Stashes Grid.Row="1" x:Name="stashes" Visibility="Collapsed"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Popups -->
|
2020-08-03 01:23:00 -07:00
|
|
|
<local:PopupManager x:Name="popupManager" Grid.Row="1"/>
|
2020-07-03 00:24:31 -07:00
|
|
|
</Grid>
|
|
|
|
</UserControl>
|