|
95 | 95 | <TextBlock Opacity="0.5" |
96 | 96 | Text="{Binding Model.UpdatedAt, StringFormat={x:Static ghfvs:Resources.UpdatedFormat}, Converter={ghfvs:DurationToStringConverter}, Mode=OneWay}"/> |
97 | 97 |
|
| 98 | + <!-- User actions --> |
| 99 | + <StackPanel Orientation="Horizontal" |
| 100 | + Margin="0 0 0 -4" |
| 101 | + ghfvs:ScrollingVerticalStackPanel.IsFixed="true"> |
| 102 | + <ghfvs:GitHubActionLink Margin="0 6" Command="{Binding OpenOnGitHub}"> |
| 103 | + View Conversation |
| 104 | + </ghfvs:GitHubActionLink> |
| 105 | + |
| 106 | + <Rectangle Margin="5 0" Width="1" Height="12" VerticalAlignment="Center" Style="{DynamicResource Separator}" /> |
| 107 | + |
| 108 | + <!-- Checkout pull request button --> |
| 109 | + <ghfvs:GitHubActionLink Command="{Binding Checkout}" |
| 110 | + Content="{Binding CheckoutState.Caption}" |
| 111 | + VerticalAlignment="Center" |
| 112 | + TextTrimming="CharacterEllipsis" |
| 113 | + Visibility="{Binding CheckoutState, Converter={ghfvs:NullToVisibilityConverter}}" |
| 114 | + ToolTip="{Binding CheckoutState.ToolTip}" |
| 115 | + ToolTipService.ShowOnDisabled="True"/> |
| 116 | + |
| 117 | + <!-- Pull/push buttons --> |
| 118 | + <StackPanel Orientation="Horizontal" VerticalAlignment="Center" |
| 119 | + Visibility="{Binding UpdateState.UpToDate, FallbackValue=Collapsed, Converter={ghfvs:BooleanToInverseVisibilityConverter}}"> |
| 120 | + <ghfvs:OcticonImage Icon="arrow_down"/> |
| 121 | + <TextBlock Text="{Binding UpdateState.CommitsBehind}" VerticalAlignment="Center"/> |
| 122 | + <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Pull}" |
| 123 | + Command="{Binding Pull}" |
| 124 | + Margin="4,0" |
| 125 | + ToolTip="{Binding UpdateState.PullToolTip}" |
| 126 | + ToolTipService.ShowOnDisabled="True" |
| 127 | + VerticalAlignment="Center"/> |
| 128 | + <ghfvs:OcticonImage Icon="arrow_up"/> |
| 129 | + <TextBlock Text="{Binding UpdateState.CommitsAhead}" VerticalAlignment="Center"/> |
| 130 | + <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Push}" |
| 131 | + Command="{Binding Push}" |
| 132 | + Margin="4,0" |
| 133 | + ToolTip="{Binding UpdateState.PushToolTip}" |
| 134 | + ToolTipService.ShowOnDisabled="True" |
| 135 | + VerticalAlignment="Center"/> |
| 136 | + <!-- Sync submodules --> |
| 137 | + <ghfvs:OcticonImage Icon="package" |
| 138 | + Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
| 139 | + <TextBlock Margin="4 0 0 0" Text="{Binding UpdateState.SubmodulesToSync}" VerticalAlignment="Center" |
| 140 | + Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
| 141 | + <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Sync}" |
| 142 | + Command="{Binding SyncSubmodules}" |
| 143 | + Margin="4 0" |
| 144 | + ToolTip="{Binding UpdateState.SyncSubmodulesToolTip}" |
| 145 | + Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
| 146 | + </StackPanel> |
| 147 | + |
| 148 | + <!-- Branch checked out and up-to-date --> |
| 149 | + <TextBlock VerticalAlignment="Center" TextWrapping="Wrap" |
| 150 | + Visibility="{Binding UpdateState.UpToDate, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}"> |
| 151 | + <TextBlock.Style> |
| 152 | + <Style TargetType="TextBlock" BasedOn="{StaticResource CheckoutMessage}"> |
| 153 | + <Setter Property="Visibility" Value="Collapsed"/> |
| 154 | + <Style.Triggers> |
| 155 | + <MultiDataTrigger> |
| 156 | + <MultiDataTrigger.Conditions> |
| 157 | + <Condition Binding="{Binding UpdateState.CommitsAhead}" Value="0"/> |
| 158 | + <Condition Binding="{Binding UpdateState.CommitsBehind}" Value="0"/> |
| 159 | + </MultiDataTrigger.Conditions> |
| 160 | + <MultiDataTrigger.Setters> |
| 161 | + <Setter Property="Visibility" Value="Visible"/> |
| 162 | + </MultiDataTrigger.Setters> |
| 163 | + </MultiDataTrigger> |
| 164 | + </Style.Triggers> |
| 165 | + </Style> |
| 166 | + </TextBlock.Style> |
| 167 | + |
| 168 | + <ghfvs:OcticonImage Icon="check" Foreground="#6CC644" Margin="0 0 0 -4"/> |
| 169 | + <Run Text="{x:Static ghfvs:Resources.LocalBranchUpToDate}"/> |
| 170 | + </TextBlock> |
| 171 | + </StackPanel> |
| 172 | + <!-- /User actions --> |
| 173 | + |
98 | 174 | <!-- Git operation error message --> |
99 | 175 | <TextBox Foreground="Red" |
100 | 176 | Margin="-2 4" |
|
111 | 187 | VerticalScrollBarVisibility="Auto"> |
112 | 188 | <ghfvs:ScrollingVerticalStackPanel> |
113 | 189 |
|
114 | | - <StackPanel Orientation="Horizontal" |
115 | | - Margin="0 -4 0 0" |
116 | | - ghfvs:ScrollingVerticalStackPanel.IsFixed="true"> |
117 | | - <ghfvs:GitHubActionLink Margin="0 6" Command="{Binding OpenOnGitHub}"> |
118 | | - View Conversation |
119 | | - </ghfvs:GitHubActionLink> |
120 | | - |
121 | | - <Rectangle Margin="5 0" Width="1" Height="12" VerticalAlignment="Center" Style="{DynamicResource Separator}" /> |
122 | | - |
123 | | - <!-- Checkout pull request button --> |
124 | | - <ghfvs:GitHubActionLink Command="{Binding Checkout}" |
125 | | - Content="{Binding CheckoutState.Caption}" |
126 | | - VerticalAlignment="Center" |
127 | | - TextTrimming="CharacterEllipsis" |
128 | | - Visibility="{Binding CheckoutState, Converter={ghfvs:NullToVisibilityConverter}}" |
129 | | - ToolTip="{Binding CheckoutState.ToolTip}" |
130 | | - ToolTipService.ShowOnDisabled="True"/> |
131 | | - |
132 | | - <!-- Pull/push buttons --> |
133 | | - <StackPanel Orientation="Horizontal" VerticalAlignment="Center" |
134 | | - Visibility="{Binding UpdateState.UpToDate, FallbackValue=Collapsed, Converter={ghfvs:BooleanToInverseVisibilityConverter}}"> |
135 | | - <ghfvs:OcticonImage Icon="arrow_down"/> |
136 | | - <TextBlock Text="{Binding UpdateState.CommitsBehind}" VerticalAlignment="Center"/> |
137 | | - <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Pull}" |
138 | | - Command="{Binding Pull}" |
139 | | - Margin="4,0" |
140 | | - ToolTip="{Binding UpdateState.PullToolTip}" |
141 | | - ToolTipService.ShowOnDisabled="True" |
142 | | - VerticalAlignment="Center"/> |
143 | | - <ghfvs:OcticonImage Icon="arrow_up"/> |
144 | | - <TextBlock Text="{Binding UpdateState.CommitsAhead}" VerticalAlignment="Center"/> |
145 | | - <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Push}" |
146 | | - Command="{Binding Push}" |
147 | | - Margin="4,0" |
148 | | - ToolTip="{Binding UpdateState.PushToolTip}" |
149 | | - ToolTipService.ShowOnDisabled="True" |
150 | | - VerticalAlignment="Center"/> |
151 | | - <!-- Sync submodules --> |
152 | | - <ghfvs:OcticonImage Icon="package" |
153 | | - Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
154 | | - <TextBlock Margin="4 0 0 0" Text="{Binding UpdateState.SubmodulesToSync}" VerticalAlignment="Center" |
155 | | - Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
156 | | - <ghfvs:GitHubActionLink Content="{x:Static ghfvs:Resources.Sync}" |
157 | | - Command="{Binding SyncSubmodules}" |
158 | | - Margin="4 0" |
159 | | - ToolTip="{Binding UpdateState.SyncSubmodulesToolTip}" |
160 | | - Visibility="{Binding UpdateState.SyncSubmodulesEnabled, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}" /> |
161 | | - </StackPanel> |
162 | | - |
163 | | - <!-- Branch checked out and up-to-date --> |
164 | | - <TextBlock VerticalAlignment="Center" TextWrapping="Wrap" |
165 | | - Visibility="{Binding UpdateState.UpToDate, FallbackValue=Collapsed, Converter={ghfvs:BooleanToVisibilityConverter}}"> |
166 | | - <TextBlock.Style> |
167 | | - <Style TargetType="TextBlock" BasedOn="{StaticResource CheckoutMessage}"> |
168 | | - <Setter Property="Visibility" Value="Collapsed"/> |
169 | | - <Style.Triggers> |
170 | | - <MultiDataTrigger> |
171 | | - <MultiDataTrigger.Conditions> |
172 | | - <Condition Binding="{Binding UpdateState.CommitsAhead}" Value="0"/> |
173 | | - <Condition Binding="{Binding UpdateState.CommitsBehind}" Value="0"/> |
174 | | - </MultiDataTrigger.Conditions> |
175 | | - <MultiDataTrigger.Setters> |
176 | | - <Setter Property="Visibility" Value="Visible"/> |
177 | | - </MultiDataTrigger.Setters> |
178 | | - </MultiDataTrigger> |
179 | | - </Style.Triggers> |
180 | | - </Style> |
181 | | - </TextBlock.Style> |
182 | | - |
183 | | - <ghfvs:OcticonImage Icon="check" Foreground="#6CC644" Margin="0 0 0 -4"/> |
184 | | - <Run Text="{x:Static ghfvs:Resources.LocalBranchUpToDate}"/> |
185 | | - </TextBlock> |
186 | | - </StackPanel> |
187 | | - |
188 | 190 | <ghfvs:SectionControl Name="reviewsSection" |
189 | 191 | HeaderText="{x:Static ghfvs:Resources.Reviewers}" |
190 | 192 | IsExpanded="True" |
|
0 commit comments