|
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" |
8 | 9 | mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
9 | | - x:Class="SourceGit.Views.CheckoutCommit" |
10 | | - x:DataType="vm:CheckoutCommit"> |
| 10 | + x:Class="SourceGit.Views.CheckoutDetached" |
| 11 | + x:DataType="vm:CheckoutDetached"> |
11 | 12 | <StackPanel Orientation="Vertical" Margin="8,0"> |
12 | 13 | <StackPanel Orientation="Horizontal"> |
13 | 14 | <Path Width="16" Height="16" |
|
16 | 17 | <TextBlock FontSize="18" |
17 | 18 | Margin="8,0,0,0" |
18 | 19 | Classes="bold" |
19 | | - Text="{DynamicResource Text.Checkout.Commit}"/> |
| 20 | + Text="{DynamicResource Text.CheckoutDetached}"/> |
20 | 21 | </StackPanel> |
21 | 22 |
|
22 | 23 | <Grid Margin="0,16,0,0" RowDefinitions="32,Auto,Auto"> |
|
28 | 29 | <TextBlock Grid.Row="0" Grid.Column="0" |
29 | 30 | HorizontalAlignment="Right" VerticalAlignment="Center" |
30 | 31 | Margin="0,0,8,0" |
31 | | - Text="{DynamicResource Text.Checkout.Commit.Target}" /> |
32 | | - <Grid Grid.Row="0" Grid.Column="1" ColumnDefinitions="Auto,Auto,*"> |
33 | | - <Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}" /> |
34 | | - <TextBlock Grid.Column="1" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding Commit.SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" /> |
35 | | - <TextBlock Grid.Column="2" Text="{Binding Commit.Subject}" TextTrimming="CharacterEllipsis"/> |
36 | | - </Grid> |
| 32 | + Text="{DynamicResource Text.CheckoutDetached.Target}" /> |
| 33 | + <ContentControl Grid.Row="0" Grid.Column="1" Content="{Binding Target, Mode=OneWay}"> |
| 34 | + <ContentControl.DataTemplates> |
| 35 | + <DataTemplate DataType="m:Commit"> |
| 36 | + <Grid ColumnDefinitions="Auto,Auto,*"> |
| 37 | + <Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}" /> |
| 38 | + <TextBlock Grid.Column="1" Foreground="DarkOrange" VerticalAlignment="Center" Margin="8,0" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" /> |
| 39 | + <TextBlock Grid.Column="2" Text="{Binding Subject, Mode=OneWay}" TextTrimming="CharacterEllipsis"/> |
| 40 | + </Grid> |
| 41 | + </DataTemplate> |
| 42 | + |
| 43 | + <DataTemplate DataType="m:Tag"> |
| 44 | + <Grid ColumnDefinitions="Auto,*"> |
| 45 | + <Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Tag}" /> |
| 46 | + <TextBlock Grid.Column="1" Margin="8,0" Text="{Binding Name, Mode=OneWay}" TextTrimming="CharacterEllipsis"/> |
| 47 | + </Grid> |
| 48 | + </DataTemplate> |
| 49 | + </ContentControl.DataTemplates> |
| 50 | + </ContentControl> |
37 | 51 |
|
38 | 52 | <Border Grid.Row="1" Grid.Column="0" |
39 | 53 | Height="32" |
|
53 | 67 | Data="{StaticResource Icons.Error}" |
54 | 68 | Fill="DarkOrange"/> |
55 | 69 | <TextBlock Grid.Column="1" Margin="8,0,0,0" |
56 | | - Text="{DynamicResource Text.Checkout.Commit.Warning}" |
| 70 | + Text="{DynamicResource Text.CheckoutDetached.Warning}" |
57 | 71 | TextWrapping="Wrap" |
58 | 72 | Foreground="DarkOrange"/> |
59 | 73 | </Grid> |
|
0 commit comments