|
6 | 6 | xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf" |
7 | 7 | xmlns:sampleData="clr-namespace:GitHub.SampleData;assembly=GitHub.App" |
8 | 8 | xmlns:ui="https://github.com/github/VisualStudio" |
| 9 | + VerticalAlignment="Top" |
9 | 10 | Margin="8" |
| 11 | + xmlns:cache="clr-namespace:GitHub.UI.Helpers;assembly=GitHub.UI" |
10 | 12 | mc:Ignorable="d" d:DesignWidth="300" Height="315.179"> |
11 | 13 |
|
| 14 | + <Control.Resources> |
| 15 | + <ResourceDictionary> |
| 16 | + <ResourceDictionary.MergedDictionaries> |
| 17 | + <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" /> |
| 18 | + <cache:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" /> |
| 19 | + </ResourceDictionary.MergedDictionaries> |
| 20 | + </ResourceDictionary> |
| 21 | + </Control.Resources> |
| 22 | + |
12 | 23 | <d:DesignProperties.DataContext> |
13 | 24 | <sampleData:ForkRepositoryExecuteViewModelDesigner/> |
14 | 25 | </d:DesignProperties.DataContext> |
15 | 26 |
|
16 | | - <StackPanel> |
17 | | - <TextBlock TextWrapping="Wrap"> |
| 27 | + <StackPanel Margin="0 8 0 0"> |
| 28 | + <TextBlock FontSize="16" TextWrapping="Wrap"> |
18 | 29 | You're about to fork the |
19 | 30 | <Hyperlink> |
20 | 31 | <Run Text="{Binding SourceRepository.Owner, Mode=OneWay}"/>/<Run Text="{Binding SourceRepository.Name, Mode=OneWay}"/> |
21 | 32 | </Hyperlink> |
22 | 33 | repository to |
23 | 34 | <Hyperlink> |
24 | 35 | <Run Text="{Binding DestinationRepository.Owner, Mode=OneWay}"/>/<Run Text="{Binding DestinationRepository.Name, Mode=OneWay}"/> |
25 | | - </Hyperlink>. This operation will: |
| 36 | + </Hyperlink>. |
26 | 37 | </TextBlock> |
27 | 38 |
|
28 | | - <ItemsControl Margin="8,16,8,8"> |
29 | | - <ItemsControl.Resources> |
30 | | - <Style x:Key="ItemBorder" TargetType="Border"> |
31 | | - <Setter Property="Background" Value="#10000000"/> |
32 | | - <Setter Property="CornerRadius" Value="3"/> |
33 | | - <Setter Property="Margin" Value="4"/> |
34 | | - <Setter Property="Padding" Value="4,8"/> |
35 | | - </Style> |
36 | | - <Style TargetType="CheckBox"> |
37 | | - <Setter Property="Margin" Value="0,1,6,0"/> |
38 | | - <Setter Property="VerticalAlignment" Value="Center"/> |
39 | | - </Style> |
40 | | - </ItemsControl.Resources> |
41 | | - <Border Style="{StaticResource ItemBorder}"> |
42 | | - <DockPanel> |
43 | | - <CheckBox IsChecked="True" IsEnabled="False"/> |
44 | | - <TextBlock>Fork the repository</TextBlock> |
45 | | - </DockPanel> |
46 | | - </Border> |
47 | | - <Border Style="{StaticResource ItemBorder}"> |
48 | | - <DockPanel> |
49 | | - <CheckBox IsChecked="{Binding UpdateOrigin}" IsEnabled="False" /> |
50 | | - <TextBlock TextWrapping="Wrap"> |
51 | | - Update your local repository's <Run Style="{DynamicResource {x:Static markdig:Styles.CodeStyleKey}}">origin</Run> to point to |
52 | | - <Hyperlink><Run Text="{Binding DestinationRepository.CloneUrl, Mode=OneWay}"/></Hyperlink> |
53 | | - </TextBlock> |
54 | | - </DockPanel> |
55 | | - </Border> |
56 | | - <Border Style="{StaticResource ItemBorder}"> |
57 | | - <DockPanel> |
58 | | - <CheckBox IsChecked="{Binding AddUpstream}" IsEnabled="False" /> |
59 | | - <TextBlock TextWrapping="Wrap"> |
60 | | - Add an <Run Style="{DynamicResource {x:Static markdig:Styles.CodeStyleKey}}">upstream</Run> remote pointing to |
61 | | - <Hyperlink><Run Text="{Binding SourceRepository.CloneUrl, Mode=OneWay}"/></Hyperlink> |
62 | | - </TextBlock> |
63 | | - </DockPanel> |
64 | | - </Border> |
65 | | - <Border Style="{StaticResource ItemBorder}"> |
66 | | - <StackPanel > |
67 | | - <Button Click="repoForkButton_OnClick">Fork Repo</Button> |
68 | | - <TextBlock TextWrapping="Wrap" |
69 | | - Foreground="Red" |
70 | | - Text="{Binding Error, Mode=OneWay}" |
71 | | - HorizontalAlignment="Center" |
72 | | - Visibility="{Binding Error, Converter={ui:NullToVisibilityConverter}}"/> |
| 39 | + <TextBlock Margin="0 16 0 0" FontSize="14">This operation will:</TextBlock> |
| 40 | + |
| 41 | + <StackPanel Orientation="Vertical"> |
| 42 | + <Border Margin="0 8 0 4" CornerRadius="2" Background="#ffeff1f5" Padding="8 16"> |
| 43 | + <StackPanel> |
| 44 | + <Grid Margin="0 0 0 0"> |
| 45 | + <Grid.ColumnDefinitions> |
| 46 | + <ColumnDefinition Width="Auto" /> |
| 47 | + <ColumnDefinition Width="*" /> |
| 48 | + </Grid.ColumnDefinitions> |
| 49 | + |
| 50 | + <ui:OcticonImage Grid.Column="0" Icon="repo_forked" Background="Red" Height="16" Width="16" /> |
| 51 | + <TextBlock Margin="8 0 0 0" Grid.Column="1" TextWrapping="Wrap">Fork the repository</TextBlock> |
| 52 | + </Grid> |
| 53 | + |
| 54 | + <Grid Margin="0 16 0 0"> |
| 55 | + <Grid.ColumnDefinitions> |
| 56 | + <ColumnDefinition Width="Auto" /> |
| 57 | + <ColumnDefinition Width="*" /> |
| 58 | + </Grid.ColumnDefinitions> |
| 59 | + <ui:OcticonImage Grid.Column="0" Icon="home" Height="16" Width="16" /> |
| 60 | + |
| 61 | + <TextBlock Margin="8 0 0 0" Grid.Column="1" TextWrapping="Wrap"> |
| 62 | + Update your local repository's <Run Style="{DynamicResource {x:Static markdig:Styles.CodeStyleKey}}">origin</Run> to point to |
| 63 | + <Hyperlink><Run Text="{Binding DestinationRepository.CloneUrl, Mode=OneWay}"/></Hyperlink> |
| 64 | + </TextBlock> |
| 65 | + </Grid> |
| 66 | + |
| 67 | + <Grid Margin="0 16 0 0" > |
| 68 | + <Grid.ColumnDefinitions> |
| 69 | + <ColumnDefinition Width="Auto" /> |
| 70 | + <ColumnDefinition Width="*" /> |
| 71 | + </Grid.ColumnDefinitions> |
| 72 | + |
| 73 | + <ui:OcticonImage Grid.Column="0" Icon="globe" Height="16" Width="16" /> |
| 74 | + <TextBlock Margin="8 0 0 0" Grid.Column="1" TextWrapping="Wrap"> |
| 75 | + Add an <Run Style="{DynamicResource {x:Static markdig:Styles.CodeStyleKey}}">upstream</Run> remote pointing to |
| 76 | + <Hyperlink><Run Text="{Binding SourceRepository.CloneUrl, Mode=OneWay}"/></Hyperlink> |
| 77 | + </TextBlock> |
| 78 | + </Grid> |
| 79 | + </StackPanel> |
| 80 | + </Border> |
| 81 | + |
| 82 | + <TextBlock TextWrapping="Wrap" |
| 83 | + Margin="0 4" |
| 84 | + Foreground="Red" |
| 85 | + Text="{Binding Error, Mode=OneWay}" |
| 86 | + Visibility="{Binding Error, Converter={ui:NullToVisibilityConverter}}" |
| 87 | + HorizontalAlignment="Left" /> |
| 88 | + <StackPanel Margin="0 8" Orientation="Horizontal" HorizontalAlignment="Right"> |
| 89 | + <Button HorizontalAlignment="Right" Padding="16 4" BorderThickness="0" Margin="0 0 4 0" Click="backButton_OnClick">Back</Button> |
| 90 | + <Button HorizontalAlignment="Right" Padding="16 4" BorderThickness="0" Click="repoForkButton_OnClick">Fork Repository</Button> |
73 | 91 | </StackPanel> |
74 | | - </Border> |
75 | | - </ItemsControl> |
| 92 | + </StackPanel> |
76 | 93 | </StackPanel> |
77 | 94 | </UserControl> |
0 commit comments