|
12 | 12 | <Border Background="{DynamicResource Brush.Window}" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}">
|
13 | 13 | <Grid VerticalAlignment="Center">
|
14 | 14 | <StackPanel Orientation="Vertical" IsVisible="{Binding !IsResolved}">
|
15 |
| - <StackPanel.DataTemplates> |
16 |
| - <DataTemplate DataType="vm:ConflictSourceBranch"> |
17 |
| - <StackPanel Orientation="Horizontal"> |
18 |
| - <Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/> |
19 |
| - <TextBlock Margin="4,0,0,0" Text="{Binding Name}"/> |
20 |
| - <TextBlock Margin="4,0,0,0" |
21 |
| - Text="{Binding Head, Converter={x:Static c:StringConverters.ToShortSHA}}" |
22 |
| - Foreground="DarkOrange" |
23 |
| - TextDecorations="Underline" |
24 |
| - Cursor="Hand" |
25 |
| - PointerPressed="OnPressedSHA" |
26 |
| - ToolTip.Tip="{Binding Revision}" |
27 |
| - ToolTip.ShowDelay="0"> |
28 |
| - <TextBlock.DataTemplates> |
29 |
| - <DataTemplate DataType="m:Commit"> |
30 |
| - <StackPanel MinWidth="400" Orientation="Vertical"> |
31 |
| - <Grid ColumnDefinitions="Auto,*,Auto"> |
32 |
| - <v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/> |
33 |
| - <TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/> |
34 |
| - <TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
35 |
| - </Grid> |
| 15 | + <Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
| 16 | + <TextBlock Margin="0,16" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
36 | 17 |
|
37 |
| - <TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/> |
38 |
| - </StackPanel> |
39 |
| - </DataTemplate> |
40 |
| - </TextBlock.DataTemplates> |
41 |
| - </TextBlock> |
42 |
| - </StackPanel> |
43 |
| - </DataTemplate> |
| 18 | + <Border Margin="16,0" Padding="8" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"> |
| 19 | + <Border.DataTemplates> |
| 20 | + <DataTemplate DataType="vm:ConflictSourceBranch"> |
| 21 | + <StackPanel Orientation="Horizontal"> |
| 22 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Branch}"/> |
| 23 | + <TextBlock Margin="4,0,0,0" Text="{Binding Name}"/> |
| 24 | + <TextBlock Margin="4,0,0,0" |
| 25 | + Text="{Binding Head, Converter={x:Static c:StringConverters.ToShortSHA}}" |
| 26 | + Foreground="DarkOrange" |
| 27 | + TextDecorations="Underline" |
| 28 | + Cursor="Hand" |
| 29 | + PointerPressed="OnPressedSHA" |
| 30 | + ToolTip.Tip="{Binding Revision}" |
| 31 | + ToolTip.ShowDelay="0"> |
| 32 | + <TextBlock.DataTemplates> |
| 33 | + <DataTemplate DataType="m:Commit"> |
| 34 | + <StackPanel MinWidth="400" Orientation="Vertical"> |
| 35 | + <Grid ColumnDefinitions="Auto,*,Auto"> |
| 36 | + <v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/> |
| 37 | + <TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/> |
| 38 | + <TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
| 39 | + </Grid> |
44 | 40 |
|
45 |
| - <DataTemplate DataType="m:Commit"> |
46 |
| - <StackPanel Orientation="Horizontal"> |
47 |
| - <Path Width="12" Height="12" Data="{StaticResource Icons.Commit}"/> |
48 |
| - <v:CommitRefsPresenter Margin="8,0,0,0" |
49 |
| - Foreground="{DynamicResource Brush.FG1}" |
50 |
| - FontFamily="{DynamicResource Fonts.Primary}" |
51 |
| - FontSize="11" |
52 |
| - VerticalAlignment="Center" |
53 |
| - UseGraphColor="False"/> |
54 |
| - <TextBlock Margin="4,0,0,0" |
55 |
| - Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" |
56 |
| - Foreground="DarkOrange" |
57 |
| - TextDecorations="Underline" |
58 |
| - Cursor="Hand" |
59 |
| - PointerPressed="OnPressedSHA" |
60 |
| - ToolTip.Tip="{Binding}" |
61 |
| - ToolTip.ShowDelay="0"> |
62 |
| - <TextBlock.DataTemplates> |
63 |
| - <DataTemplate DataType="m:Commit"> |
64 |
| - <StackPanel MinWidth="400" Orientation="Vertical"> |
65 |
| - <Grid ColumnDefinitions="Auto,*,Auto"> |
66 |
| - <v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/> |
67 |
| - <TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/> |
68 |
| - <TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
69 |
| - </Grid> |
| 41 | + <TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/> |
| 42 | + </StackPanel> |
| 43 | + </DataTemplate> |
| 44 | + </TextBlock.DataTemplates> |
| 45 | + </TextBlock> |
| 46 | + </StackPanel> |
| 47 | + </DataTemplate> |
70 | 48 |
|
71 |
| - <TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/> |
72 |
| - </StackPanel> |
73 |
| - </DataTemplate> |
74 |
| - </TextBlock.DataTemplates> |
75 |
| - </TextBlock> |
76 |
| - <TextBlock Margin="4,0,0,0" Text="{Binding Subject}"/> |
77 |
| - </StackPanel> |
78 |
| - </DataTemplate> |
| 49 | + <DataTemplate DataType="m:Commit"> |
| 50 | + <StackPanel Orientation="Horizontal"> |
| 51 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Commit}"/> |
| 52 | + <v:CommitRefsPresenter Margin="8,0,0,0" |
| 53 | + Foreground="{DynamicResource Brush.FG1}" |
| 54 | + FontFamily="{DynamicResource Fonts.Primary}" |
| 55 | + FontSize="11" |
| 56 | + VerticalAlignment="Center" |
| 57 | + UseGraphColor="False"/> |
| 58 | + <TextBlock Margin="4,0,0,0" |
| 59 | + Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" |
| 60 | + Foreground="DarkOrange" |
| 61 | + TextDecorations="Underline" |
| 62 | + Cursor="Hand" |
| 63 | + PointerPressed="OnPressedSHA" |
| 64 | + ToolTip.Tip="{Binding}" |
| 65 | + ToolTip.ShowDelay="0"> |
| 66 | + <TextBlock.DataTemplates> |
| 67 | + <DataTemplate DataType="m:Commit"> |
| 68 | + <StackPanel MinWidth="400" Orientation="Vertical"> |
| 69 | + <Grid ColumnDefinitions="Auto,*,Auto"> |
| 70 | + <v:Avatar Grid.Column="0" Width="16" Height="16" VerticalAlignment="Center" IsHitTestVisible="False" User="{Binding Author}"/> |
| 71 | + <TextBlock Grid.Column="1" Classes="primary" Text="{Binding Author.Name}" Margin="8,0,0,0"/> |
| 72 | + <TextBlock Grid.Column="2" Classes="primary" Text="{Binding CommitterTimeStr}" Foreground="{DynamicResource Brush.FG2}" Margin="8,0,0,0"/> |
| 73 | + </Grid> |
79 | 74 |
|
80 |
| - <DataTemplate DataType="x:String"> |
81 |
| - <StackPanel Orientation="Horizontal"> |
82 |
| - <Path Width="12" Height="12" Data="{StaticResource Icons.Changes}"/> |
83 |
| - <TextBlock Margin="4,0,0,0" Text="{Binding}"/> |
84 |
| - </StackPanel> |
85 |
| - </DataTemplate> |
86 |
| - </StackPanel.DataTemplates> |
| 75 | + <TextBlock Classes="primary" Margin="0,8,0,0" Text="{Binding Subject}" TextWrapping="Wrap"/> |
| 76 | + </StackPanel> |
| 77 | + </DataTemplate> |
| 78 | + </TextBlock.DataTemplates> |
| 79 | + </TextBlock> |
| 80 | + <TextBlock Margin="4,0,0,0" Text="{Binding Subject}"/> |
| 81 | + </StackPanel> |
| 82 | + </DataTemplate> |
87 | 83 |
|
88 |
| - <Path Width="64" Height="64" Data="{StaticResource Icons.Conflict}" Fill="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
89 |
| - <TextBlock Margin="0,16" FontSize="20" FontWeight="Bold" Text="{DynamicResource Text.WorkingCopy.Conflicts}" Foreground="{DynamicResource Brush.FG2}" HorizontalAlignment="Center"/> |
90 |
| - |
91 |
| - <Border Margin="16,0" Padding="8" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource Brush.Border2}"> |
| 84 | + <DataTemplate DataType="x:String"> |
| 85 | + <StackPanel Orientation="Horizontal"> |
| 86 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Changes}"/> |
| 87 | + <TextBlock Margin="4,0,0,0" Text="{Binding}"/> |
| 88 | + </StackPanel> |
| 89 | + </DataTemplate> |
| 90 | + </Border.DataTemplates> |
| 91 | + |
92 | 92 | <Border.IsVisible>
|
93 | 93 | <MultiBinding Converter="{x:Static BoolConverters.And}">
|
94 | 94 | <Binding Path="Theirs" Converter="{x:Static ObjectConverters.IsNotNull}"/>
|
|
105 | 105 | </Border>
|
106 | 106 |
|
107 | 107 | <StackPanel Margin="0,8,0,0" Orientation="Horizontal" HorizontalAlignment="Center">
|
108 |
| - <Button Classes="flat" Margin="0,0,0,0" Content="{DynamicResource Text.WorkingCopy.Conflicts.UseTheirs}" Command="{Binding UseTheirs}"/> |
109 |
| - <Button Classes="flat" Margin="8,0,0,0" Content="{DynamicResource Text.WorkingCopy.Conflicts.UseMine}" Command="{Binding UseMine}"/> |
110 |
| - <Button Classes="flat" Margin="8,0,0,0" Content="{DynamicResource Text.WorkingCopy.Conflicts.OpenExternalMergeTool}" Command="{Binding OpenExternalMergeTool}"/> |
| 108 | + <Button Classes="flat" Margin="0,0,0,0" Command="{Binding UseTheirs}" ToolTip.Tip="git checkout --theirs"> |
| 109 | + <StackPanel Orientation="Horizontal"> |
| 110 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Incoming}"/> |
| 111 | + <TextBlock Margin="6,0,0,0" Text="{DynamicResource Text.WorkingCopy.Conflicts.UseTheirs}" VerticalAlignment="Center"/> |
| 112 | + </StackPanel> |
| 113 | + </Button> |
| 114 | + <Button Classes="flat" Margin="8,0,0,0" Command="{Binding UseMine}" ToolTip.Tip="git checkout --theirs"> |
| 115 | + <StackPanel Orientation="Horizontal"> |
| 116 | + <Path Width="12" Height="12" Data="{StaticResource Icons.Local}"/> |
| 117 | + <TextBlock Margin="6,0,0,0" Text="{DynamicResource Text.WorkingCopy.Conflicts.UseMine}" VerticalAlignment="Center"/> |
| 118 | + </StackPanel> |
| 119 | + </Button> |
| 120 | + <Button Classes="flat" Margin="8,0,0,0" Command="{Binding OpenExternalMergeTool}"> |
| 121 | + <StackPanel Orientation="Horizontal"> |
| 122 | + <Path Width="12" Height="12" Data="{StaticResource Icons.OpenWith}"/> |
| 123 | + <TextBlock Margin="6,0,0,0" Text="{DynamicResource Text.WorkingCopy.Conflicts.OpenExternalMergeTool}" VerticalAlignment="Center"/> |
| 124 | + </StackPanel> |
| 125 | + </Button> |
111 | 126 | </StackPanel>
|
112 | 127 | </StackPanel>
|
113 | 128 |
|
|
0 commit comments