2024-07-14 09:30:31 -07: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"
|
2024-07-24 01:35:35 -07:00
|
|
|
xmlns:m="using:SourceGit.Models"
|
2024-07-14 09:30:31 -07:00
|
|
|
xmlns:vm="using:SourceGit.ViewModels"
|
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
|
x:Class="SourceGit.Views.RepositoryToolbar"
|
|
|
|
x:DataType="vm:Repository">
|
|
|
|
<Grid ColumnDefinitions="*,Auto,*">
|
|
|
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Margin="4,0,0,0">
|
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenInFileManager}" ToolTip.Tip="{DynamicResource Text.Repository.Explore}">
|
2024-07-24 04:18:04 -07:00
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Explore}" Margin="0,2,0,0"/>
|
2024-07-14 09:30:31 -07:00
|
|
|
</Button>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Click="OpenWithExternalTools" ToolTip.Tip="{DynamicResource Text.Repository.OpenWithExternalTools}">
|
|
|
|
<Path Width="13" Height="13" Data="{StaticResource Icons.OpenWith}"/>
|
|
|
|
</Button>
|
2024-07-24 04:18:04 -07:00
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding OpenInTerminal}" ToolTip.Tip="{DynamicResource Text.Repository.Terminal}">
|
|
|
|
<Path Width="13" Height="13" Data="{StaticResource Icons.Terminal}"/>
|
2024-07-24 01:35:35 -07:00
|
|
|
</Button>
|
|
|
|
|
2024-07-24 04:18:04 -07:00
|
|
|
<Button Classes="icon_button" Width="32" Click="OpenStatistics" ToolTip.Tip="{DynamicResource Text.Repository.Statistics}">
|
|
|
|
<Path Width="13" Height="13" Data="{StaticResource Icons.Statistics}"/>
|
2024-07-24 01:35:35 -07:00
|
|
|
</Button>
|
2024-07-24 19:59:06 -07:00
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Click="OpenConfigure" ToolTip.Tip="{DynamicResource Text.Repository.Configure}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Settings}"/>
|
|
|
|
</Button>
|
2024-07-14 09:30:31 -07: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>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Margin="16,0,0,0" Command="{Binding StashAll}" ToolTip.Tip="{DynamicResource Text.Stash}">
|
2024-07-31 20:45:20 -07:00
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Stashes.Add}"/>
|
2024-07-14 09:30:31 -07:00
|
|
|
</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}"/>
|
|
|
|
|
|
|
|
<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}">
|
|
|
|
<Path Width="14" Height="14" Data="{StaticResource Icons.GitFlow}"/>
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<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-07-24 01:35:35 -07:00
|
|
|
|
2024-07-24 20:49:54 -07:00
|
|
|
<Button Classes="icon_button" Width="32" Margin="8,0,0,0" Command="{Binding Cleanup}" ToolTip.Tip="{DynamicResource Text.Repository.Clean}">
|
|
|
|
<Path Width="14" Height="14" Margin="0,1,0,0" Data="{StaticResource Icons.Clean}"/>
|
2024-07-24 01:35:35 -07:00
|
|
|
</Button>
|
2024-07-14 09:30:31 -07:00
|
|
|
</StackPanel>
|
|
|
|
|
|
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,4,0">
|
2024-07-24 04:18:04 -07:00
|
|
|
<Path Width="13" Height="13" Fill="{DynamicResource Brush.FG1}" Data="{StaticResource Icons.Branch}"/>
|
2024-07-14 09:30:31 -07:00
|
|
|
|
2024-07-24 02:09:30 -07:00
|
|
|
<ContentControl Margin="6,0,0,0">
|
2024-07-24 01:35:35 -07:00
|
|
|
<ContentControl.Content>
|
|
|
|
<Binding Path="CurrentBranch">
|
|
|
|
<Binding.TargetNullValue>
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Classes="primary" Text="--"/>
|
2024-07-24 01:35:35 -07:00
|
|
|
</Binding.TargetNullValue>
|
|
|
|
</Binding>
|
|
|
|
</ContentControl.Content>
|
2024-07-14 09:30:31 -07:00
|
|
|
|
2024-07-24 01:35:35 -07:00
|
|
|
<ContentControl.DataTemplates>
|
|
|
|
<DataTemplate DataType="m:Branch">
|
|
|
|
<Border Background="Transparent" ToolTip.Tip="{Binding FriendlyName}">
|
2024-07-29 05:48:04 -07:00
|
|
|
<TextBlock Classes="primary" Text="{Binding FriendlyName}" MaxWidth="250" TextTrimming="CharacterEllipsis"/>
|
2024-07-24 01:35:35 -07:00
|
|
|
</Border>
|
|
|
|
</DataTemplate>
|
|
|
|
</ContentControl.DataTemplates>
|
|
|
|
</ContentControl>
|
|
|
|
|
|
|
|
<Button Classes="icon_button" Width="32" Command="{Binding NavigateToCurrentHead}" ToolTip.Tip="{DynamicResource Text.Repository.NavigateToCurrentHead}">
|
2024-07-24 02:09:30 -07:00
|
|
|
<Path Width="13" Height="13" Margin="0,2,0,0" Data="{StaticResource Icons.Target}" Fill="{DynamicResource Brush.FG1}"/>
|
2024-07-14 09:30:31 -07:00
|
|
|
</Button>
|
|
|
|
</StackPanel>
|
|
|
|
</Grid>
|
|
|
|
</UserControl>
|
|
|
|
|