|
7 | 7 | xmlns:markdig="clr-namespace:Markdig.Wpf;assembly=Markdig.Wpf" |
8 | 8 | xmlns:vsui="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.14.0" |
9 | 9 | xmlns:v="clr-namespace:GitHub.VisualStudio.Views" |
| 10 | + xmlns:ui="clr-namespace:GitHub.UI;assembly=GitHub.UI" |
10 | 11 | mc:Ignorable="d" d:DesignHeight="1200" d:DesignWidth="800" |
11 | 12 | MaxWidth="800"> |
12 | 13 | <d:DesignData.DataContext> |
|
39 | 40 | </Grid.RowDefinitions> |
40 | 41 |
|
41 | 42 | <TextBlock Margin="0 8" |
| 43 | + Foreground="{DynamicResource VsBrush.WindowText}" |
42 | 44 | Style="{DynamicResource {x:Static vsui:VsResourceKeys.TextBlockEnvironment200PercentFontSizeStyleKey}}"> |
43 | 45 | <Run Text="{Binding Title, Mode=OneWay}"/> |
44 | 46 | <Hyperlink Command="{Binding OpenOnGitHub}"> |
|
47 | 49 | </TextBlock> |
48 | 50 |
|
49 | 51 | <StackPanel Grid.Row="1" Orientation="Horizontal"> |
50 | | - <TextBlock > |
| 52 | + <TextBlock Foreground="{DynamicResource VsBrush.WindowText}"> |
51 | 53 | <InlineUIContainer BaselineAlignment="Bottom"> |
52 | 54 | <v:IssueishStateBadge DataContext="{Binding State}" Margin="0,0,0,-2"/> |
53 | 55 | </InlineUIContainer> |
|
74 | 76 | </Border> |
75 | 77 | </InlineUIContainer> |
76 | 78 | </TextBlock> |
77 | | - |
78 | 79 | </StackPanel> |
79 | 80 | </Grid> |
80 | 81 |
|
81 | | - <Rectangle DockPanel.Dock="Top" Style="{StaticResource Separator}" Height="2" Margin="0,16"/> |
| 82 | + <Rectangle DockPanel.Dock="Top" Style="{StaticResource Separator}" Height="2" Margin="0 16 0 8"/> |
82 | 83 |
|
83 | | - <markdig:MarkdownViewer Name="bodyMarkdown" Markdown="{Binding Body}"/> |
| 84 | + <Border BorderBrush="{DynamicResource GitHubHeaderSeparatorBrush}" BorderThickness="1" Margin="0 4"> |
| 85 | + <StackPanel Orientation="Vertical"> |
| 86 | + <Border Padding="8" Background="{DynamicResource GitHubBranchNameBackgroundBrush}" BorderBrush="{DynamicResource GitHubHeaderSeparatorBrush}" BorderThickness="0 0 0 1"> |
| 87 | + <StackPanel Orientation="Horizontal" DockPanel.Dock="Left" > |
| 88 | + <v:ActorAvatarView Width="16" |
| 89 | + Height="16" |
| 90 | + ViewModel="{Binding Author}"/> |
| 91 | + |
| 92 | + <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" Margin="4 0"> |
| 93 | + <Run FontWeight="Bold" Text="{Binding Author.Login}" /> |
| 94 | + <Run Text="commented" /> |
| 95 | + </TextBlock> |
| 96 | + <ui:GitHubActionLink Content="{Binding CreatedAt, Converter={ui:DurationToStringConverter}}" |
| 97 | + Command="{Binding OpenOnGitHub}" |
| 98 | + Foreground="{DynamicResource GitHubVsToolWindowText}" |
| 99 | + Opacity="0.75" /> |
| 100 | + <Border Background="{DynamicResource VsBrush.InfoBackground}" |
| 101 | + BorderBrush="{DynamicResource VsBrush.AccentPale}" |
| 102 | + BorderThickness="1" |
| 103 | + CornerRadius="3" |
| 104 | + Padding="2 1" |
| 105 | + Visibility="{Binding IsPending, Converter={ui:BooleanToVisibilityConverter}, FallbackValue=Collapsed}"> |
| 106 | + <TextBlock FontSize="10" Text="{x:Static ghfvs:Resources.Pending}" /> |
| 107 | + </Border> |
| 108 | + </StackPanel> |
| 109 | + </Border> |
| 110 | + |
| 111 | + <markdig:MarkdownViewer Name="bodyMarkdown" Margin="8" Foreground="{DynamicResource VsBrush.WindowText}" Markdown="{Binding Body}"/> |
| 112 | + </StackPanel> |
| 113 | + </Border> |
| 114 | + |
| 115 | + <StackPanel Orientation="Vertical" Margin="0 8"> |
| 116 | + <Grid> |
| 117 | + <Grid.ColumnDefinitions> |
| 118 | + <ColumnDefinition Width="24" /> |
| 119 | + <ColumnDefinition Width="Auto" /> |
| 120 | + <ColumnDefinition Width="Auto" /> |
| 121 | + </Grid.ColumnDefinitions> |
| 122 | + |
| 123 | + <ghfvs:OcticonImage DockPanel.Dock="Left" |
| 124 | + Margin="2 0 4 0" |
| 125 | + Width="16" |
| 126 | + Foreground="{DynamicResource VsBrush.WindowText}" |
| 127 | + Icon="repo_push" |
| 128 | + Grid.Column="0" |
| 129 | + HorizontalAlignment="Center" /> |
| 130 | + |
| 131 | + <v:ActorAvatarView Width="16" |
| 132 | + Height="16" |
| 133 | + Grid.Column="1" |
| 134 | + ViewModel="{Binding Author}"/> |
| 135 | + |
| 136 | + <TextBlock Foreground="{DynamicResource GitHubVsToolWindowText}" Margin="4 0" Grid.Column="2"> |
| 137 | + <Run FontWeight="Bold" Text="{Binding Author.Login}" /> |
| 138 | + <Run Text="added some commits" /> |
| 139 | + </TextBlock> |
| 140 | + </Grid> |
| 141 | + </StackPanel> |
84 | 142 |
|
85 | 143 | <ItemsControl Name="timeline" ItemsSource="{Binding Timeline}"> |
86 | 144 | <ItemsControl.Resources> |
87 | 145 | <DataTemplate DataType="{x:Type ghfvs:CommitSummariesViewModel}"> |
88 | | - <ItemsControl ItemsSource="{Binding Commits}"/> |
| 146 | + <Border> |
| 147 | + <StackPanel> |
| 148 | + <ItemsControl ItemsSource="{Binding Commits}"/> |
| 149 | + |
| 150 | + <Border BorderThickness="0,1,0,0" |
| 151 | + BorderBrush="{DynamicResource GitHubHeaderSeparatorBrush}" |
| 152 | + DockPanel.Dock="Bottom" |
| 153 | + Margin="0,8,0,0" |
| 154 | + Padding="0,4,0,0" /> |
| 155 | + </StackPanel> |
| 156 | + </Border> |
89 | 157 | </DataTemplate> |
90 | 158 |
|
91 | 159 | <DataTemplate DataType="{x:Type ghfvs:CommitSummaryViewModel}"> |
92 | | - <DockPanel> |
93 | | - <ghfvs:OcticonImage DockPanel.Dock="Left" |
94 | | - Margin="0,0,2,0" |
95 | | - Icon="git_commit"/> |
96 | | - <v:ActorAvatarView DockPanel.Dock="Left" |
97 | | - Width="16" |
98 | | - Height="16" |
99 | | - Margin="2" |
100 | | - ViewModel="{Binding Author}"/> |
101 | | - <TextBlock DockPanel.Dock="Right" |
102 | | - FontFamily="Consolas" |
103 | | - Margin="0,0,0,2" |
104 | | - VerticalAlignment="Center"> |
105 | | - <Hyperlink Command="{Binding DataContext.ShowCommit, ElementName=timeline}" |
106 | | - CommandParameter="{Binding Oid}"> |
107 | | - <Run Text="{Binding AbbreviatedOid, Mode=OneWay}"/> |
108 | | - </Hyperlink> |
109 | | - </TextBlock> |
110 | | - <TextBlock Margin="0,0,0,2" |
111 | | - Text="{Binding Header}" |
112 | | - VerticalAlignment="Center"/> |
113 | | - </DockPanel> |
| 160 | + <Border Padding="24 0 8 0"> |
| 161 | + <DockPanel> |
| 162 | + <ghfvs:OcticonImage DockPanel.Dock="Left" |
| 163 | + Foreground="{DynamicResource VsBrush.GrayText}" |
| 164 | + Margin="0,0,2,0" |
| 165 | + Icon="git_commit"/> |
| 166 | + <v:ActorAvatarView DockPanel.Dock="Left" |
| 167 | + Width="16" |
| 168 | + Height="16" |
| 169 | + Margin="2" |
| 170 | + ViewModel="{Binding Author}"/> |
| 171 | + <TextBlock DockPanel.Dock="Right" |
| 172 | + FontFamily="Consolas" |
| 173 | + Margin="0,0,0,2" |
| 174 | + VerticalAlignment="Center"> |
| 175 | + <Hyperlink Command="{Binding DataContext.ShowCommit, ElementName=timeline}" |
| 176 | + CommandParameter="{Binding Oid}"> |
| 177 | + <Run Text="{Binding AbbreviatedOid, Mode=OneWay}"/> |
| 178 | + </Hyperlink> |
| 179 | + </TextBlock> |
| 180 | + <TextBlock Margin="0,0,0,2" |
| 181 | + Foreground="{DynamicResource VsBrush.WindowText}" |
| 182 | + Text="{Binding Header}" |
| 183 | + VerticalAlignment="Center"/> |
| 184 | + </DockPanel> |
| 185 | + </Border> |
114 | 186 | </DataTemplate> |
115 | 187 |
|
116 | 188 | <DataTemplate DataType="{x:Type ghfvs:CommentViewModel}"> |
117 | 189 | <v:CommentView/> |
118 | 190 | </DataTemplate> |
119 | 191 |
|
120 | 192 | <DataTemplate DataType="{x:Type ghfvs:CommentViewModelDesigner}"> |
121 | | - <v:CommentView/> |
| 193 | + <v:CommentView /> |
122 | 194 | </DataTemplate> |
123 | 195 | </ItemsControl.Resources> |
124 | 196 | <ItemsControl.ItemTemplate> |
125 | 197 | <DataTemplate> |
126 | | - <Border BorderThickness="0,1,0,0" |
127 | | - BorderBrush="{DynamicResource GitHubHeaderSeparatorBrush}" |
128 | | - Margin="0,16,0,0" |
129 | | - Padding="0,16,0,0"> |
130 | | - <ContentControl Content="{Binding}"/> |
131 | | - </Border> |
| 198 | + <ContentControl Content="{Binding}"/> |
132 | 199 | </DataTemplate> |
133 | 200 | </ItemsControl.ItemTemplate> |
134 | 201 | </ItemsControl> |
|
0 commit comments