|
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:vm="using:SourceGit.ViewModels" |
6 | 7 | xmlns:v="using:SourceGit.Views" |
7 | 8 | xmlns:c="using:SourceGit.Converters" |
|
169 | 170 |
|
170 | 171 | <ContentControl Content="{Binding DetailContext}"> |
171 | 172 | <ContentControl.DataTemplates> |
172 | | - <DataTemplate DataType="vm:ConflictContext"> |
| 173 | + <DataTemplate DataType="vm:Conflict"> |
173 | 174 | <Border Background="{DynamicResource Brush.Window}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"> |
174 | | - <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> |
| 175 | + <Grid VerticalAlignment="Center"> |
175 | 176 | <StackPanel Orientation="Vertical" IsVisible="{Binding !IsResolved}"> |
176 | | - <Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}"/> |
177 | | - <TextBlock Margin="0,16,0,8" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
178 | | - <TextBlock Text="{DynamicResource Text.WorkingCopy.ResolveTip}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
| 177 | + <StackPanel.DataTemplates> |
| 178 | + <DataTemplate DataType="m:Branch"> |
| 179 | + <StackPanel Orientation="Horizontal"> |
| 180 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/> |
| 181 | + <TextBlock Margin="4,0,0,0" Text="{Binding FriendlyName}"/> |
| 182 | + <TextBlock Margin="4,0,0,0" Text="{Binding Head, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/> |
| 183 | + </StackPanel> |
| 184 | + </DataTemplate> |
| 185 | + |
| 186 | + <DataTemplate DataType="m:Commit"> |
| 187 | + <StackPanel Orientation="Horizontal"> |
| 188 | + <Path Width="12" Height="12" Margin="0,6,0,0" Data="{StaticResource Icons.Commit}"/> |
| 189 | + <v:CommitRefsPresenter Margin="8,0,0,0" |
| 190 | + TagBackground="{DynamicResource Brush.DecoratorTag}" |
| 191 | + Foreground="{DynamicResource Brush.FG1}" |
| 192 | + FontFamily="{DynamicResource Fonts.Primary}" |
| 193 | + FontSize="11" |
| 194 | + VerticalAlignment="Center" |
| 195 | + UseGraphColor="False"/> |
| 196 | + <TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/> |
| 197 | + <TextBlock Margin="4,0,0,0" Text="{Binding Subject}"/> |
| 198 | + </StackPanel> |
| 199 | + </DataTemplate> |
| 200 | + |
| 201 | + <DataTemplate DataType="m:Tag"> |
| 202 | + <StackPanel Orientation="Horizontal"> |
| 203 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Tag}"/> |
| 204 | + <TextBlock Margin="4,0,0,0" Text="{Binding Name}"/> |
| 205 | + <TextBlock Margin="4,0,0,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange"/> |
| 206 | + </StackPanel> |
| 207 | + </DataTemplate> |
| 208 | + </StackPanel.DataTemplates> |
| 209 | + |
| 210 | + <Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
| 211 | + <TextBlock Margin="0,16" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
| 212 | + |
| 213 | + <Border Margin="16,0" Padding="8" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"> |
| 214 | + <Border.IsVisible> |
| 215 | + <MultiBinding Converter="{x:Static BoolConverters.And}"> |
| 216 | + <Binding Path="Theirs" Converter="{x:Static ObjectConverters.IsNotNull}"/> |
| 217 | + <Binding Path="Mine" Converter="{x:Static ObjectConverters.IsNotNull}"/> |
| 218 | + </MultiBinding> |
| 219 | + </Border.IsVisible> |
| 220 | + |
| 221 | + <Grid Margin="8,0,0,0" RowDefinitions="32,32" ColumnDefinitions="Auto,*"> |
| 222 | + <TextBlock Grid.Row="0" Grid.Column="0" Classes="info_label" Text="THEIRS"/> |
| 223 | + <ContentControl Grid.Row="0" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Theirs}"/> |
| 224 | + <TextBlock Grid.Row="1" Grid.Column="0" Classes="info_label" Text="MINE"/> |
| 225 | + <ContentControl Grid.Row="1" Grid.Column="1" Margin="16,0,0,0" Content="{Binding Mine}"/> |
| 226 | + </Grid> |
| 227 | + </Border> |
| 228 | + |
| 229 | + <StackPanel Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center"> |
| 230 | + <Button Classes="flat" Content="USE THEIRS" Command="{Binding UseTheirs}"/> |
| 231 | + <Button Classes="flat" Margin="8,0,0,0" Content="USE MINE" Command="{Binding UseMine}"/> |
| 232 | + <Button Classes="flat" Margin="8,0,0,0" Content="OPEN EXTERNAL MERGETOOL" Command="{Binding OpenExternalMergeTool}"/> |
| 233 | + </StackPanel> |
179 | 234 | </StackPanel> |
180 | 235 |
|
181 | 236 | <StackPanel Orientation="Vertical" IsVisible="{Binding IsResolved}"> |
|
0 commit comments