2021-04-29 05:05:55 -07:00
|
|
|
<UserControl x:Class="SourceGit.Views.Widgets.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:controls="clr-namespace:SourceGit.Views.Controls"
|
2021-10-08 02:06:04 -07:00
|
|
|
xmlns:models="clr-namespace:SourceGit.Models"
|
2021-04-29 05:05:55 -07:00
|
|
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
|
|
|
xmlns:converters="clr-namespace:SourceGit.Views.Converters"
|
|
|
|
mc:Ignorable="d"
|
|
|
|
d:DesignHeight="450" d:DesignWidth="800">
|
|
|
|
<Grid>
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="32"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
2021-10-08 02:06:04 -07:00
|
|
|
|
|
|
|
<Grid.Resources>
|
|
|
|
<converters:InverseBool x:Key="InverseBool"/>
|
2021-10-08 02:22:43 -07:00
|
|
|
<converters:BoolToCollapsed x:Key="BoolToCollapsed"/>
|
2021-10-08 02:06:04 -07:00
|
|
|
</Grid.Resources>
|
|
|
|
|
2021-04-29 05:05:55 -07:00
|
|
|
<!-- Toolbar -->
|
2021-07-20 01:26:10 -07:00
|
|
|
<Border Grid.Row="0" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,0,0,1">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-11 18:27:33 -07:00
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal">
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,9"
|
2021-10-26 20:24:59 -07:00
|
|
|
Icon="{DynamicResource Icon.Folder.Open}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Explore}"
|
|
|
|
Click="OpenInExplorer"/>
|
2021-09-12 23:22:25 -07:00
|
|
|
<controls:IconButton
|
2021-10-26 20:24:59 -07:00
|
|
|
x:Name="btnVSCode"
|
2021-09-12 23:22:25 -07:00
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,9"
|
2021-10-26 20:24:59 -07:00
|
|
|
Icon="{DynamicResource Icon.VSCode}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.VSCode}"
|
|
|
|
Visibility="Collapsed"
|
|
|
|
Click="OpenInVSCode"/>
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,9"
|
|
|
|
Icon="{DynamicResource Icon.Terminal}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Terminal}"
|
|
|
|
Click="OpenInTerminal"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
2021-08-11 18:27:33 -07:00
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Fetch}"
|
|
|
|
ToolTip="{DynamicResource Text.Fetch}"
|
|
|
|
Click="OpenFetch"/>
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Pull}"
|
|
|
|
ToolTip="{DynamicResource Text.Pull}"
|
|
|
|
Click="OpenPull"/>
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Push}"
|
|
|
|
ToolTip="{DynamicResource Text.Push}"
|
|
|
|
Click="OpenPush"/>
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.SaveStash}"
|
|
|
|
ToolTip="{DynamicResource Text.Stash}"
|
|
|
|
Click="OpenStash"/>
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Apply}"
|
|
|
|
ToolTip="{DynamicResource Text.Apply}"
|
|
|
|
Click="OpenApply"/>
|
|
|
|
|
|
|
|
<Rectangle
|
|
|
|
Width="1" Height="16"
|
|
|
|
Margin="8,0"
|
|
|
|
VerticalAlignment="Center"
|
|
|
|
Fill="{DynamicResource Brush.Border2}"/>
|
|
|
|
|
|
|
|
<controls:IconButton
|
|
|
|
Margin="16,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Search}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Search}"
|
|
|
|
Click="OpenSearch"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right">
|
2021-10-08 02:06:04 -07:00
|
|
|
<ToggleButton
|
|
|
|
Width="16" Height="16"
|
2021-10-26 20:24:59 -07:00
|
|
|
Margin="0,0,8,0"
|
2021-10-08 02:06:04 -07:00
|
|
|
Style="{StaticResource Style.ToggleButton.SplitDirection}"
|
|
|
|
ToolTip="{DynamicResource Text.Histories.DisplayMode}"
|
2021-10-08 02:22:43 -07:00
|
|
|
Visibility="{Binding ElementName=pageHistories,Path=IsSelected,Converter={StaticResource BoolToCollapsed}}"
|
2021-10-08 02:06:04 -07:00
|
|
|
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Window.MoveCommitInfoRight, Mode=TwoWay, Converter={StaticResource InverseBool}}"
|
|
|
|
Checked="ChangeOrientation" Unchecked="ChangeOrientation"/>
|
2021-10-26 20:24:59 -07:00
|
|
|
|
2022-01-11 04:18:35 -08:00
|
|
|
<controls:IconButton
|
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Statistics}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Statistics}"
|
|
|
|
Click="OpenStatistics"/>
|
|
|
|
|
2021-08-11 18:27:33 -07:00
|
|
|
<controls:IconButton
|
2021-10-26 20:24:59 -07:00
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,9,0,8"
|
|
|
|
Icon="{DynamicResource Icon.Loading}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Refresh}"
|
|
|
|
Click="TriggerRefresh"/>
|
|
|
|
|
2022-02-09 22:27:46 -08:00
|
|
|
<controls:IconButton
|
|
|
|
Margin="8,0"
|
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Clean}"
|
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Clean}"
|
|
|
|
Click="OpenCleanup"/>
|
|
|
|
|
2021-10-26 20:24:59 -07:00
|
|
|
<controls:IconButton
|
|
|
|
Margin="8,0"
|
2021-08-11 18:27:33 -07:00
|
|
|
Padding="0,8"
|
|
|
|
Icon="{DynamicResource Icon.Setting}"
|
2021-08-11 23:03:10 -07:00
|
|
|
ToolTip="{DynamicResource Text.Dashboard.Configure}"
|
2021-08-11 18:27:33 -07:00
|
|
|
Click="OpenConfigure"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</Border>
|
|
|
|
|
|
|
|
<!-- Main -->
|
|
|
|
<Grid Grid.Row="1">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="300"/>
|
|
|
|
<ColumnDefinition Width="1"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<!-- Left -->
|
|
|
|
<Grid x:Name="leftPanel" Grid.Column="0" FocusManager.IsFocusScope="True">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
2021-06-06 20:47:16 -07:00
|
|
|
<RowDefinition Height="24"/>
|
|
|
|
<RowDefinition Height="Auto"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
|
|
|
<Grid.Resources>
|
|
|
|
<converters:BoolToCollapsed x:Key="BoolToCollapsed"/>
|
|
|
|
</Grid.Resources>
|
|
|
|
|
|
|
|
<!-- Workspace -->
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Row="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Workspace}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<ListView Grid.Row="1" x:Name="workspace" SelectionMode="Single" SelectionChanged="OnPageSelectionChanged">
|
2021-10-08 02:22:43 -07:00
|
|
|
<ListViewItem x:Name="pageHistories" IsSelected="True" Style="{DynamicResource Style.ListViewItem.Switcher}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<StackPanel Margin="16,0,0,0" Height="28" Orientation="Horizontal">
|
|
|
|
<Path Width="16" Height="16" Data="{StaticResource Icon.Histories}"/>
|
2021-08-10 01:55:01 -07:00
|
|
|
<TextBlock Margin="8,0,0,0" Text="{DynamicResource Text.Histories}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</StackPanel>
|
|
|
|
</ListViewItem>
|
2021-08-12 20:15:30 -07:00
|
|
|
<ListViewItem Style="{DynamicResource Style.ListViewItem.Switcher}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Grid Margin="16,0,0,0" Height="28">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
2021-05-13 19:20:49 -07:00
|
|
|
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Send}"/>
|
2021-08-10 01:55:01 -07:00
|
|
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.WorkingCopy}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeLocalChanges"/>
|
|
|
|
</Grid>
|
|
|
|
</ListViewItem>
|
2021-08-12 20:15:30 -07:00
|
|
|
<ListViewItem Style="{DynamicResource Style.ListViewItem.Switcher}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Grid Margin="16,0,0,0" Height="28">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Width="16" Height="16" Data="{StaticResource Icon.Stashes}"/>
|
2021-08-10 01:55:01 -07:00
|
|
|
<TextBlock Grid.Column="1" Margin="8,0,0,0" Text="{DynamicResource Text.Stashes}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<controls:Badge Grid.Column="2" Margin="4,0" x:Name="badgeStashes"/>
|
|
|
|
</Grid>
|
|
|
|
</ListViewItem>
|
|
|
|
</ListView>
|
|
|
|
|
|
|
|
<!-- Local Branches -->
|
|
|
|
<Grid Grid.Row="2">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.LocalBranches}"/>
|
2021-07-20 01:26:10 -07:00
|
|
|
<controls:IconButton Grid.Column="1" Click="OpenGitFlowPanel" Width="14" Height="14" Margin="8,0" Icon="{StaticResource Icon.Flow}" ToolTip="{DynamicResource Text.GitFlow}"/>
|
|
|
|
<controls:IconButton Grid.Column="2" Click="OpenNewBranch" Width="14" Height="14" Margin="0,0,2,0" Icon="{StaticResource Icon.Branch.Add}" ToolTip="{DynamicResource Text.Dashboard.NewBranch}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
<controls:Tree
|
|
|
|
Grid.Row="3"
|
|
|
|
x:Name="localBranchTree"
|
2021-05-20 21:55:44 -07:00
|
|
|
MaxHeight="300"
|
2021-04-29 05:05:55 -07:00
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
LostFocus="OnTreeLostFocus"
|
|
|
|
SelectionChanged="OnTreeSelectionChanged">
|
|
|
|
<controls:Tree.ItemContainerStyle>
|
|
|
|
<Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}">
|
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
|
|
|
<EventSetter Event="MouseDoubleClick" Handler="OnTreeDoubleClick"/>
|
|
|
|
<EventSetter Event="ContextMenuOpening" Handler="OnTreeContextMenuOpening"/>
|
|
|
|
</Style>
|
|
|
|
</controls:Tree.ItemContainerStyle>
|
|
|
|
<controls:Tree.ItemTemplate>
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
|
|
<Grid Height="24">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Path Grid.Column="0" x:Name="Icon" Width="10" Height="10" Data="{StaticResource Icon.Branch}"/>
|
|
|
|
<TextBlock Grid.Column="1" x:Name="Name" Text="{Binding Name}" Margin="4,0"/>
|
|
|
|
<controls:Badge Grid.Column="2" Margin="4,0" Label="{Binding UpstreamTrackStatus}"/>
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Column="3"
|
|
|
|
x:Name="Filter"
|
|
|
|
Margin="4,0"
|
|
|
|
IsChecked="{Binding IsFiltered}"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
2021-07-20 01:26:10 -07:00
|
|
|
ToolTip="{DynamicResource Text.Filter}"
|
2021-04-29 05:05:55 -07:00
|
|
|
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding IsCurrent}" Value="True">
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Check}"/>
|
|
|
|
<Setter TargetName="Name" Property="FontWeight" Value="ExtraBold"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}">
|
|
|
|
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
|
2021-07-14 21:48:44 -07:00
|
|
|
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="True"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
|
2021-07-14 21:48:44 -07:00
|
|
|
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="False"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
</HierarchicalDataTemplate.Triggers>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</controls:Tree.ItemTemplate>
|
|
|
|
</controls:Tree>
|
|
|
|
|
|
|
|
<!-- REMOTES -->
|
|
|
|
<Grid Grid.Row="4">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Remotes}"/>
|
2021-07-20 01:26:10 -07:00
|
|
|
<controls:IconButton Grid.Column="1" Click="OpenAddRemote" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Remote.Add}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
<controls:Tree
|
|
|
|
Grid.Row="5"
|
|
|
|
x:Name="remoteBranchTree"
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
LostFocus="OnTreeLostFocus"
|
|
|
|
SelectionChanged="OnTreeSelectionChanged">
|
|
|
|
<controls:Tree.ItemContainerStyle>
|
|
|
|
<Style TargetType="{x:Type controls:TreeItem}" BasedOn="{StaticResource Style.TreeItem}">
|
2021-07-14 21:48:44 -07:00
|
|
|
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<EventSetter Event="ContextMenuOpening" Handler="OnTreeContextMenuOpening"/>
|
|
|
|
</Style>
|
|
|
|
</controls:Tree.ItemContainerStyle>
|
|
|
|
|
|
|
|
<controls:Tree.ItemTemplate>
|
|
|
|
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
|
|
|
<Grid Height="24">
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="16"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<Path Grid.Column="0" x:Name="Icon" Width="10" Height="10" Data="{StaticResource Icon.Branch}"/>
|
|
|
|
<TextBlock Grid.Column="1" x:Name="Name" Text="{Binding Name}" Margin="4,0"/>
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Column="2"
|
|
|
|
x:Name="Filter"
|
|
|
|
Margin="4,0"
|
|
|
|
IsChecked="{Binding IsFiltered}"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
2021-07-20 01:26:10 -07:00
|
|
|
ToolTip="{DynamicResource Text.Filter}"
|
2021-04-29 05:05:55 -07:00
|
|
|
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<HierarchicalDataTemplate.Triggers>
|
|
|
|
<DataTrigger Binding="{Binding IsCurrent}" Value="True">
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Check}"/>
|
|
|
|
<Setter TargetName="Name" Property="FontWeight" Value="ExtraBold"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}">
|
|
|
|
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<DataTrigger Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Remote}">
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Remote}"/>
|
|
|
|
<Setter TargetName="Filter" Property="Visibility" Value="Collapsed"/>
|
|
|
|
</DataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
|
2021-07-14 21:48:44 -07:00
|
|
|
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="True"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Open}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
<MultiDataTrigger>
|
|
|
|
<MultiDataTrigger.Conditions>
|
|
|
|
<Condition Binding="{Binding Type}" Value="{x:Static widgets:Dashboard+BranchNodeType.Folder}"/>
|
2021-07-14 21:48:44 -07:00
|
|
|
<Condition Binding="{Binding IsExpanded, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type controls:TreeItem}}}" Value="False"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</MultiDataTrigger.Conditions>
|
|
|
|
<Setter TargetName="Icon" Property="Data" Value="{StaticResource Icon.Folder.Fill}"/>
|
|
|
|
</MultiDataTrigger>
|
|
|
|
</HierarchicalDataTemplate.Triggers>
|
|
|
|
</HierarchicalDataTemplate>
|
|
|
|
</controls:Tree.ItemTemplate>
|
|
|
|
</controls:Tree>
|
|
|
|
|
|
|
|
<!-- TAGS -->
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Row="6"
|
|
|
|
x:Name="tglTags"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Expender}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Tags}"/>
|
2021-07-20 01:26:10 -07:00
|
|
|
<TextBlock Grid.Column="1" x:Name="txtTagCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
|
|
|
<controls:IconButton Grid.Column="2" Click="OpenNewTag" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.Tag.Add}" ToolTip="{DynamicResource Text.Dashboard.Tags.Add}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
|
|
|
<DataGrid
|
|
|
|
Grid.Row="7"
|
|
|
|
x:Name="tagList"
|
|
|
|
RowHeight="24"
|
2021-06-06 20:47:16 -07:00
|
|
|
MaxHeight="200"
|
2021-04-29 05:05:55 -07:00
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
Visibility="{Binding ElementName=tglTags, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
LostFocus="OnTagsLostFocus"
|
|
|
|
SelectionChanged="OnTagSelectionChanged"
|
|
|
|
ContextMenuOpening="OnTagContextMenuOpening">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="*">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.Tag}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Name}"/>
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Column="2"
|
|
|
|
IsChecked="{Binding IsFiltered, Mode=TwoWay}"
|
|
|
|
Margin="0,0,4,0"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Filter}"
|
2021-07-20 01:26:10 -07:00
|
|
|
ToolTip="{DynamicResource Text.Filter}"
|
2021-04-29 05:05:55 -07:00
|
|
|
Checked="OnFilterChanged" Unchecked="OnFilterChanged"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
|
|
|
|
|
|
|
<!-- SUBMODULES -->
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Row="8"
|
|
|
|
x:Name="tglSubmodules"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Expender}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.Submodules}"/>
|
2021-07-20 01:26:10 -07:00
|
|
|
<TextBlock Grid.Column="1" x:Name="txtSubmoduleCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
2021-08-05 23:21:48 -07:00
|
|
|
<Button Grid.Column="2" Click="UpdateSubmodules" Background="Transparent" Margin="0,0,4,0" BorderThickness="0" ToolTip="{DynamicResource Text.Dashboard.Submodules.Update}">
|
2021-04-29 05:05:55 -07:00
|
|
|
<controls:Loading x:Name="iconUpdateSubmodule" Width="14" Height="14" />
|
|
|
|
</Button>
|
2021-08-05 23:21:48 -07:00
|
|
|
<controls:IconButton Grid.Column="3" Click="OpenAddSubmodule" Width="14" Height="14" Margin="4,0" Icon="{StaticResource Icon.Submodule}" ToolTip="{DynamicResource Text.Dashboard.Remotes.Add}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
|
|
|
<DataGrid
|
|
|
|
Grid.Row="9"
|
|
|
|
x:Name="submoduleList"
|
|
|
|
RowHeight="24"
|
2021-06-06 20:47:16 -07:00
|
|
|
MaxHeight="100"
|
2021-04-29 05:05:55 -07:00
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
Visibility="{Binding ElementName=tglSubmodules, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
ContextMenuOpening="OnSubmoduleContextMenuOpening"
|
|
|
|
MouseDoubleClick="OnSubmoduleMouseDoubleClick">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="*">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.Submodule}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding}"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2021-06-06 20:47:16 -07:00
|
|
|
|
|
|
|
<!-- SUBTREES -->
|
|
|
|
<ToggleButton
|
|
|
|
Grid.Row="10"
|
|
|
|
x:Name="tglSubTrees"
|
|
|
|
Style="{StaticResource Style.ToggleButton.Expender}">
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
2021-08-04 22:44:25 -07:00
|
|
|
<TextBlock Grid.Column="0" Style="{DynamicResource Style.TextBlock.Group}" Text="{DynamicResource Text.Dashboard.SubTrees}"/>
|
2021-07-20 01:26:10 -07:00
|
|
|
<TextBlock Grid.Column="1" x:Name="txtSubTreeCount" FontWeight="DemiBold" Margin="4,0,0,0" Foreground="{DynamicResource Brush.FG2}"/>
|
|
|
|
<controls:IconButton Grid.Column="2" Click="OpenAddSubTree" Width="14" Height="14" Margin="0,0,4,0" Icon="{StaticResource Icon.TreeAddNode}" ToolTip="{DynamicResource Text.Dashboard.SubTrees.Add}"/>
|
2021-06-06 20:47:16 -07:00
|
|
|
</Grid>
|
|
|
|
</ToggleButton>
|
|
|
|
<DataGrid
|
|
|
|
Grid.Row="11"
|
|
|
|
x:Name="subTreeList"
|
|
|
|
RowHeight="24"
|
|
|
|
MaxHeight="100"
|
|
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
|
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
|
|
|
Visibility="{Binding ElementName=tglSubTrees, Path=IsChecked, Converter={StaticResource BoolToCollapsed}}"
|
|
|
|
SelectionMode="Single"
|
|
|
|
SelectionUnit="FullRow"
|
|
|
|
ContextMenuOpening="OnSubTreeContextMenuOpening">
|
|
|
|
<DataGrid.Columns>
|
|
|
|
<DataGridTemplateColumn Width="*">
|
|
|
|
<DataGridTemplateColumn.CellTemplate>
|
|
|
|
<DataTemplate>
|
|
|
|
<Grid>
|
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Path Grid.Column="0" Width="10" Height="10" Margin="16,0,8,0" Data="{StaticResource Icon.SubTree}"/>
|
|
|
|
<TextBlock Grid.Column="1" Text="{Binding Prefix}"/>
|
|
|
|
</Grid>
|
|
|
|
</DataTemplate>
|
|
|
|
</DataGridTemplateColumn.CellTemplate>
|
|
|
|
</DataGridTemplateColumn>
|
|
|
|
</DataGrid.Columns>
|
|
|
|
</DataGrid>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Splitter -->
|
|
|
|
<GridSplitter
|
|
|
|
Grid.Column="1"
|
|
|
|
Width="1"
|
|
|
|
HorizontalAlignment="Center" VerticalAlignment="Stretch"
|
2021-07-20 01:26:10 -07:00
|
|
|
Background="{DynamicResource Brush.Border0}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
|
|
|
|
<!-- Right -->
|
|
|
|
<Grid Grid.Column="2">
|
|
|
|
<Grid.RowDefinitions>
|
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
|
<RowDefinition Height="*"/>
|
|
|
|
</Grid.RowDefinitions>
|
|
|
|
|
2021-07-20 01:26:10 -07:00
|
|
|
<Grid Grid.Row="0" x:Name="mergeNavigator" Height="24" Background="{DynamicResource Brush.Conflict}" Visibility="Collapsed">
|
2021-04-29 05:05:55 -07:00
|
|
|
<Grid.ColumnDefinitions>
|
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
<TextBlock
|
|
|
|
Grid.Column="0"
|
|
|
|
x:Name="txtConflictTip"
|
|
|
|
Margin="4,0"
|
|
|
|
FontWeight="DemiBold"
|
2021-07-20 01:26:10 -07:00
|
|
|
Foreground="{DynamicResource Brush.FG3}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<Button
|
|
|
|
Grid.Column="1"
|
|
|
|
x:Name="btnResolve"
|
|
|
|
Click="GotoResolve"
|
|
|
|
Width="80"
|
|
|
|
Margin="2"
|
2021-07-20 01:26:10 -07:00
|
|
|
Content="{DynamicResource Text.Dashboard.Resolve}"
|
|
|
|
Background="{DynamicResource Brush.Window}"
|
|
|
|
BorderBrush="{DynamicResource Brush.FG1}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<Button
|
|
|
|
Grid.Column="2"
|
|
|
|
x:Name="btnContinue"
|
|
|
|
Click="ContinueMerge"
|
|
|
|
Width="80"
|
|
|
|
Margin="2"
|
2021-07-20 01:26:10 -07:00
|
|
|
Content="{DynamicResource Text.Dashboard.Continue}"
|
|
|
|
Background="{DynamicResource Brush.Accent1}"
|
|
|
|
BorderBrush="{DynamicResource Brush.FG1}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
<Button
|
|
|
|
Grid.Column="3"
|
|
|
|
Click="AbortMerge"
|
|
|
|
Width="80"
|
|
|
|
Margin="2,2,4,2"
|
2021-07-20 01:26:10 -07:00
|
|
|
Content="{DynamicResource Text.Dashboard.Abort}"
|
|
|
|
Background="{DynamicResource Brush.Window}"
|
|
|
|
BorderBrush="{DynamicResource Brush.FG1}"/>
|
2021-04-29 05:05:55 -07:00
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<controls:PageContainer Grid.Row="1" x:Name="pages"/>
|
|
|
|
</Grid>
|
|
|
|
</Grid>
|
|
|
|
|
|
|
|
<!-- Popup -->
|
|
|
|
<widgets:PopupPanel x:Name="popup" Grid.Row="1"/>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|