mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
feature: show tracking status in Delete Branch
panel if possible (#785)
This commit is contained in:
parent
d616d0897b
commit
1ddd348a40
2 changed files with 19 additions and 0 deletions
|
@ -10,6 +10,12 @@ namespace SourceGit.ViewModels
|
||||||
private set;
|
private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public string TrackStatus
|
||||||
|
{
|
||||||
|
get;
|
||||||
|
private set;
|
||||||
|
}
|
||||||
|
|
||||||
public Models.Branch TrackingRemoteBranch
|
public Models.Branch TrackingRemoteBranch
|
||||||
{
|
{
|
||||||
get;
|
get;
|
||||||
|
@ -32,6 +38,7 @@ namespace SourceGit.ViewModels
|
||||||
{
|
{
|
||||||
_repo = repo;
|
_repo = repo;
|
||||||
Target = branch;
|
Target = branch;
|
||||||
|
TrackStatus = branch.TrackStatus.ToString();
|
||||||
|
|
||||||
if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream))
|
if (branch.IsLocal && !string.IsNullOrEmpty(branch.Upstream))
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,6 +16,18 @@
|
||||||
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Margin="8,0" Data="{StaticResource Icons.Branch}"/>
|
<Path Width="14" Height="14" Margin="8,0" Data="{StaticResource Icons.Branch}"/>
|
||||||
<TextBlock Text="{Binding Target.FriendlyName}"/>
|
<TextBlock Text="{Binding Target.FriendlyName}"/>
|
||||||
|
<Border Height="18"
|
||||||
|
Margin="8,0,0,0"
|
||||||
|
Padding="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
CornerRadius="9"
|
||||||
|
Background="{DynamicResource Brush.Badge}"
|
||||||
|
IsVisible="{Binding TrackStatus, Converter={x:Static StringConverters.IsNotNullOrEmpty}}">
|
||||||
|
<TextBlock Foreground="{DynamicResource Brush.BadgeFG}"
|
||||||
|
FontFamily="{DynamicResource Fonts.Monospace}"
|
||||||
|
FontSize="10"
|
||||||
|
Text="{Binding TrackStatus}"/>
|
||||||
|
</Border>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Border Grid.Row="1" Grid.Column="1" Height="32" IsVisible="{Binding !Target.IsLocal}">
|
<Border Grid.Row="1" Grid.Column="1" Height="32" IsVisible="{Binding !Target.IsLocal}">
|
||||||
|
|
Loading…
Reference in a new issue