This repository was archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathRepositoryRecloneView.xaml
More file actions
160 lines (148 loc) · 7.63 KB
/
RepositoryRecloneView.xaml
File metadata and controls
160 lines (148 loc) · 7.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
<local:GenericRepositoryRecloneView x:Class="GitHub.VisualStudio.Views.Dialog.RepositoryRecloneView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ghfvs="https://github.com/github/VisualStudio"
xmlns:local="clr-namespace:GitHub.VisualStudio.Views.Dialog"
d:DesignHeight="440"
d:DesignWidth="414"
Background="Transparent"
mc:Ignorable="d">
<d:DesignProperties.DataContext>
<Binding>
<Binding.Source>
<ghfvs:RepositoryRecloneViewModelDesigner>
<ghfvs:RepositoryRecloneViewModelDesigner.SelectedRepository>
<ghfvs:RemoteRepositoryModelDesigner>
<ghfvs:RemoteRepositoryModelDesigner.CloneUrl>https://github.com/github/VisualStudio</ghfvs:RemoteRepositoryModelDesigner.CloneUrl>
</ghfvs:RemoteRepositoryModelDesigner>
</ghfvs:RepositoryRecloneViewModelDesigner.SelectedRepository>
</ghfvs:RepositoryRecloneViewModelDesigner>
</Binding.Source>
</Binding>
</d:DesignProperties.DataContext>
<Control.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI;component/SharedDictionary.xaml" />
<ghfvs:SharedDictionaryManager Source="pack://application:,,,/GitHub.UI.Reactive;component/SharedDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Control.Resources>
<DockPanel LastChildFill="True">
<DockPanel.Resources>
<Style x:Key="repositoryBorderStyle" TargetType="Border">
<Setter Property="BorderBrush" Value="#EAEAEA" />
<Setter Property="BorderThickness" Value="0,0,0,1" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Height" Value="30" />
<Setter Property="Margin" Value="0" />
</Style>
</DockPanel.Resources>
<ghfvs:OcticonCircleButton x:Name="cloneButton"
Margin="12"
HorizontalAlignment="Center"
DockPanel.Dock="Bottom"
Icon="check"
IsDefault="True"
Command="{Binding CloneCommand}"
>
<TextBlock Text="{x:Static ghfvs:Resources.CloneLink}" />
</ghfvs:OcticonCircleButton>
<Border x:Name="repositoriesListPane"
Margin="0"
BorderBrush="#EAEAEA"
BorderThickness="0,1"
FocusManager.IsFocusScope="True"
FocusVisualStyle="{x:Null}">
<Border.Resources>
<Style BasedOn="{StaticResource GitHubTextBlock}" TargetType="{x:Type ghfvs:TrimmedTextBlock}">
<Style.Triggers>
<Trigger Property="IsTextTrimmed" Value="True">
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Text}" />
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="cloneRepoHeaderStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{DynamicResource GHTextBrush}" />
<Setter Property="Margin" Value="0,6,12,6" />
</Style>
</Border.Resources>
<StackPanel>
<ghfvs:OcticonImage Icon="logo_github" Width="100" Height="100" VerticalAlignment="Top" Margin="0,20,0,10"/>
<ghfvs:HorizontalShadowDivider />
<Grid HorizontalAlignment="Center" Margin="0,20,0,0" MaxWidth="400">
<Grid.Resources>
<Style x:Key="Light" TargetType="Label">
<Setter Property="Opacity" Value="0.6"/>
</Style>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="5,0"/>
<Setter Property="VerticalAlignment" Value="Center"/>
</Style>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Style="{StaticResource Light}" Grid.Row="0" HorizontalAlignment="Left" Margin="6,0,0,0">Repo Name</Label>
<Label Style="{StaticResource Light}" Grid.Row="1" HorizontalAlignment="Right">Organization</Label>
<Label Style="{StaticResource Light}" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right">Source</Label>
<Label Grid.Row="3"
Grid.Column="0"
Style="{StaticResource Light}"
HorizontalAlignment="Right"
Margin="4,0"
Content="{x:Static ghfvs:Resources.pathText}"
Target="{Binding ElementName=clonePath}" />
<ghfvs:OcticonImage Grid.Row="0" Grid.Column="1" Icon="repo"/>
<ghfvs:OcticonImage Grid.Row="1" Grid.Column="1" Icon="organization"/>
<ghfvs:OcticonImage Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Icon="link"/>
<TextBlock Grid.Row="0" Grid.Column="2" Text="{Binding SelectedRepository.CloneUrl.RepositoryName}"/>
<TextBlock Grid.Row="1" Grid.Column="2" Text="{Binding SelectedRepository.CloneUrl.Owner}"/>
<TextBlock Grid.Row="2" Grid.Column="2"
Margin="3"
TextWrapping="Wrap"
VerticalAlignment="Center"
Text="{Binding SelectedRepository.CloneUrl, Mode=OneWay}"/>
<Grid Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<ghfvs:PromptTextBox x:Name="clonePath"
Grid.Column="0"
Margin="0,2"
Text="{Binding BaseRepositoryPath, UpdateSourceTrigger=PropertyChanged}" />
<Button x:Name="browsePathButton"
Grid.Column="1"
Margin="4,0,4,0"
VerticalContentAlignment="Center"
Content="{x:Static ghfvs:Resources.browsePathButtonContent}"
Padding="0"
Style="{StaticResource GitHubBlueLinkButton}"
Command="{Binding BrowseForDirectory}" />
<ghfvs:ValidationMessage x:Name="pathValidationMessage"
Grid.Row="1"
Grid.ColumnSpan="2"
Grid.Column="1"
ValidatesControl="{Binding ElementName=clonePath}"
ReactiveValidator="{Binding BaseRepositoryPathValidator, Mode=OneWay}" />
</Grid>
</Grid>
</StackPanel>
</Border>
</DockPanel>
</local:GenericRepositoryRecloneView>