|
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"
|
| 7 | + xmlns:c="using:SourceGit.Converters" |
6 | 8 | mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
|
7 | 9 | x:Class="SourceGit.Views.ExecuteCustomAction"
|
8 | 10 | x:DataType="vm:ExecuteCustomAction">
|
|
11 | 13 | Classes="bold"
|
12 | 14 | Text="{Binding CustomAction.Name}"/>
|
13 | 15 |
|
14 |
| - <Grid Margin="0,16,0,0" IsVisible="{Binding IsSimpleMode}"> |
15 |
| - <TextBlock Text="{DynamicResource Text.ExecuteCustomAction.SimpleWait}" |
16 |
| - HorizontalAlignment="Center"/> |
| 16 | + <Grid Margin="0,16,0,0" Height="32" ColumnDefinitions="150,*"> |
| 17 | + <TextBlock Grid.Column="0" |
| 18 | + Text="{DynamicResource Text.ExecuteCustomAction.Target}" |
| 19 | + HorizontalAlignment="Right" VerticalAlignment="Center" |
| 20 | + Margin="0,0,8,0"/> |
| 21 | + |
| 22 | + <ContentControl Grid.Column="1" Content="{Binding Target}"> |
| 23 | + <ContentControl.DataTemplates> |
| 24 | + <DataTemplate DataType="m:Null"> |
| 25 | + <StackPanel Orientation="Horizontal"> |
| 26 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Repositories}"/> |
| 27 | + <SelectableTextBlock VerticalAlignment="Center" Text="{DynamicResource Text.ExecuteCustomAction.Repository}" Margin="8,0,0,0"/> |
| 28 | + </StackPanel> |
| 29 | + </DataTemplate> |
| 30 | + |
| 31 | + <DataTemplate DataType="m:Branch"> |
| 32 | + <StackPanel Orientation="Horizontal"> |
| 33 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Branch}"/> |
| 34 | + <SelectableTextBlock VerticalAlignment="Center" Text="{Binding FriendlyName}" Margin="8,0,0,0"/> |
| 35 | + </StackPanel> |
| 36 | + </DataTemplate> |
| 37 | + |
| 38 | + <DataTemplate DataType="m:Commit"> |
| 39 | + <Grid ColumnDefinitions="Auto,Auto,*"> |
| 40 | + <Path Grid.Column="0" Width="14" Height="14" Data="{StaticResource Icons.Commit}"/> |
| 41 | + <TextBlock Grid.Column="1" Classes="primary" VerticalAlignment="Center" Text="{Binding SHA, Converter={x:Static c:StringConverters.ToShortSHA}}" Foreground="DarkOrange" Margin="8,0,0,0"/> |
| 42 | + <TextBlock Grid.Column="2" VerticalAlignment="Center" Text="{Binding Subject}" Margin="4,0,0,0" TextTrimming="CharacterEllipsis"/> |
| 43 | + </Grid> |
| 44 | + </DataTemplate> |
| 45 | + |
| 46 | + <DataTemplate DataType="m:Tag"> |
| 47 | + <StackPanel Orientation="Horizontal"> |
| 48 | + <Path Width="14" Height="14" Data="{StaticResource Icons.Tag}"/> |
| 49 | + <TextBlock VerticalAlignment="Center" Text="{Binding Name}" Margin="8,0,0,0"/> |
| 50 | + </StackPanel> |
| 51 | + </DataTemplate> |
| 52 | + </ContentControl.DataTemplates> |
| 53 | + </ContentControl> |
17 | 54 | </Grid>
|
18 | 55 |
|
19 |
| - <ListBox Margin="0,16,0,0" |
20 |
| - IsVisible="{Binding !IsSimpleMode}" |
| 56 | + <ListBox IsVisible="{Binding ControlParameters, Converter={x:Static c:ListConverters.IsNotNullOrEmpty}}" |
21 | 57 | ItemsSource="{Binding ControlParameters, Mode=OneWay}">
|
22 | 58 | <ListBox.Styles>
|
23 | 59 | <Style Selector="ListBoxItem">
|
|
39 | 75 |
|
40 | 76 | <ListBox.DataTemplates>
|
41 | 77 | <DataTemplate DataType="vm:CustomActionControlTextBox">
|
42 |
| - <Grid ColumnDefinitions="120,*"> |
| 78 | + <Grid ColumnDefinitions="150,*"> |
43 | 79 | <TextBlock Grid.Column="0"
|
44 | 80 | Text="{Binding Label}"
|
45 | 81 | HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
55 | 91 | </DataTemplate>
|
56 | 92 |
|
57 | 93 | <DataTemplate DataType="vm:CustomActionControlCheckBox">
|
58 |
| - <Grid ColumnDefinitions="120,*"> |
| 94 | + <Grid ColumnDefinitions="150,*"> |
59 | 95 | <CheckBox Grid.Column="1"
|
60 | 96 | Content="{Binding Label}"
|
61 | 97 | ToolTip.Tip="{Binding ToolTip, Mode=OneWay}"
|
|
64 | 100 | </DataTemplate>
|
65 | 101 |
|
66 | 102 | <DataTemplate DataType="vm:CustomActionControlPathSelector">
|
67 |
| - <Grid ColumnDefinitions="120,*"> |
| 103 | + <Grid ColumnDefinitions="150,*"> |
68 | 104 | <TextBlock Grid.Column="0"
|
69 | 105 | Text="{Binding Label}"
|
70 | 106 | HorizontalAlignment="Right" VerticalAlignment="Center"
|
|
0 commit comments