|
1 |
| -<UserControl xmlns="https://github.com/avaloniaui" |
| 1 | +<UserControl xmlns="https://github.com/avaloniaui" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
3 | 3 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
4 | 4 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
| 5 | + xmlns:m="using:SourceGit.Models" |
5 | 6 | xmlns:c="using:SourceGit.Converters"
|
6 | 7 | xmlns:v="using:SourceGit.Views"
|
7 | 8 | xmlns:vm="using:SourceGit.ViewModels"
|
|
35 | 36 | <DataTemplate DataType="vm:BranchTreeNode">
|
36 | 37 | <Border Background="Transparent"
|
37 | 38 | PointerPressed="OnNodePointerPressed"
|
38 |
| - ToolTip.Tip="{Binding Tooltip}" |
| 39 | + ToolTip.Tip="{Binding Backend}" |
39 | 40 | ToolTip.Placement="Right">
|
| 41 | + <Border.DataTemplates> |
| 42 | + <DataTemplate DataType="m:Branch"> |
| 43 | + <StackPanel Orientation="Vertical"> |
| 44 | + <StackPanel Orientation="Horizontal"> |
| 45 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/> |
| 46 | + <TextBlock FontWeight="Bold" VerticalAlignment="Center" Margin="8,0,0,0" Text="{Binding FriendlyName}"/> |
| 47 | + <Border Background="Green" Margin="4,0,0,0" CornerRadius="4" VerticalAlignment="Center" IsVisible="{Binding IsLocal}"> |
| 48 | + <TextBlock Text="{DynamicResource Text.BranchTree.Local}" FontSize="12" Classes="primary" Margin="4,1" Foreground="White" VerticalAlignment="Center"/> |
| 49 | + </Border> |
| 50 | + <Border Background="Gray" Margin="4,0,0,0" CornerRadius="4" VerticalAlignment="Center" IsVisible="{Binding !IsLocal}"> |
| 51 | + <TextBlock Text="{DynamicResource Text.BranchTree.Remote}" FontSize="12" Classes="primary" Margin="4,1" Foreground="White" VerticalAlignment="Center"/> |
| 52 | + </Border> |
| 53 | + </StackPanel> |
| 54 | + |
| 55 | + <StackPanel Orientation="Horizontal" |
| 56 | + Margin="0,8,0,0" |
| 57 | + IsVisible="{Binding Upstream, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"> |
| 58 | + <TextBlock Classes="info_label" |
| 59 | + HorizontalAlignment="Left" VerticalAlignment="Center" |
| 60 | + Text="{DynamicResource Text.BranchTree.Tracking}"/> |
| 61 | + |
| 62 | + <TextBlock Margin="6,0,0,0" |
| 63 | + Text="{Binding Upstream, Mode=OneWay, Converter={x:Static c:StringConverters.ToFriendlyUpstream}}"/> |
| 64 | + </StackPanel> |
| 65 | + </StackPanel> |
| 66 | + </DataTemplate> |
| 67 | + |
| 68 | + <DataTemplate DataType="m:Remote"> |
| 69 | + <StackPanel Orientation="Vertical"> |
| 70 | + <StackPanel Orientation="Horizontal"> |
| 71 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Remote}"/> |
| 72 | + <TextBlock FontWeight="Bold" VerticalAlignment="Center" Text="{Binding Name}" Margin="8,0,0,0"/> |
| 73 | + </StackPanel> |
| 74 | + |
| 75 | + <StackPanel Orientation="Horizontal" Margin="0,8,0,0"> |
| 76 | + <TextBlock Classes="info_label" |
| 77 | + HorizontalAlignment="Left" VerticalAlignment="Center" |
| 78 | + Text="{DynamicResource Text.BranchTree.URL}"/> |
| 79 | + |
| 80 | + <TextBlock Margin="6,0,0,0" Foreground="{DynamicResource Brush.Link}" Text="{Binding URL, Mode=OneWay}"/> |
| 81 | + </StackPanel> |
| 82 | + </StackPanel> |
| 83 | + </DataTemplate> |
| 84 | + </Border.DataTemplates> |
| 85 | + |
40 | 86 | <Grid Height="24"
|
41 | 87 | Margin="{Binding Depth, Converter={x:Static c:IntConverters.ToTreeMargin}}"
|
42 | 88 | ColumnDefinitions="16,*">
|
|
0 commit comments