Skip to content

Commit d83d780

Browse files
love-lingerheartacker
authored andcommitted
feature: add remote url protocol switcher to new submodule popup and changing submodule url popup
Signed-off-by: leo <longshuang@msn.cn>
1 parent d184806 commit d83d780

File tree

3 files changed

+48
-3
lines changed

3 files changed

+48
-3
lines changed

src/Views/AddSubmodule.axaml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:vm="using:SourceGit.ViewModels"
6+
xmlns:v="using:SourceGit.Views"
67
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="450"
78
x:Class="SourceGit.Views.AddSubmodule"
89
x:DataType="vm:AddSubmodule">
@@ -27,7 +28,18 @@
2728
VerticalAlignment="Center"
2829
CornerRadius="2"
2930
Watermark="{DynamicResource Text.RepositoryURL}"
30-
Text="{Binding Url, Mode=TwoWay}"/>
31+
Text="{Binding Url, Mode=TwoWay}">
32+
<TextBox.InnerLeftContent>
33+
<Path Width="12" Height="12"
34+
Margin="4,0,2,0"
35+
Data="{StaticResource Icons.Link}"
36+
Fill="{DynamicResource Brush.FG1}"/>
37+
</TextBox.InnerLeftContent>
38+
39+
<TextBox.InnerRightContent>
40+
<v:RemoteProtocolSwitcher Url="{Binding Url, Mode=TwoWay}"/>
41+
</TextBox.InnerRightContent>
42+
</TextBox>
3143

3244
<TextBlock Grid.Row="1" Grid.Column="0"
3345
HorizontalAlignment="Right" VerticalAlignment="Center"
@@ -38,7 +50,14 @@
3850
VerticalAlignment="Center"
3951
CornerRadius="2"
4052
Watermark="{DynamicResource Text.Submodule.RelativePath.Placeholder}"
41-
Text="{Binding RelativePath, Mode=TwoWay}"/>
53+
Text="{Binding RelativePath, Mode=TwoWay}">
54+
<TextBox.InnerLeftContent>
55+
<Path Width="12" Height="12"
56+
Margin="4,0,2,0"
57+
Data="{StaticResource Icons.Folder.Open}"
58+
Fill="{DynamicResource Brush.FG1}"/>
59+
</TextBox.InnerLeftContent>
60+
</TextBox>
4261

4362
<CheckBox Grid.Row="2" Grid.Column="1"
4463
Content="{DynamicResource Text.Submodule.FetchNested}"

src/Views/ChangeSubmoduleUrl.axaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:vm="using:SourceGit.ViewModels"
6+
xmlns:v="using:SourceGit.Views"
67
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
78
x:Class="SourceGit.Views.ChangeSubmoduleUrl"
89
x:DataType="vm:ChangeSubmoduleUrl">
@@ -36,7 +37,18 @@
3637
VerticalAlignment="Center"
3738
CornerRadius="2"
3839
Watermark="{DynamicResource Text.RepositoryURL}"
39-
Text="{Binding Url, Mode=TwoWay}"/>
40+
Text="{Binding Url, Mode=TwoWay}">
41+
<TextBox.InnerLeftContent>
42+
<Path Width="12" Height="12"
43+
Margin="4,0,2,0"
44+
Data="{StaticResource Icons.Link}"
45+
Fill="{DynamicResource Brush.FG1}"/>
46+
</TextBox.InnerLeftContent>
47+
48+
<TextBox.InnerRightContent>
49+
<v:RemoteProtocolSwitcher Url="{Binding Url, Mode=TwoWay}"/>
50+
</TextBox.InnerRightContent>
51+
</TextBox>
4052
</Grid>
4153
</StackPanel>
4254
</UserControl>

src/Views/Clone.axaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@
2828
Height="28"
2929
CornerRadius="3"
3030
Text="{Binding Remote, Mode=TwoWay}">
31+
<TextBox.InnerLeftContent>
32+
<Path Width="12" Height="12"
33+
Margin="4,0,2,0"
34+
Data="{StaticResource Icons.Link}"
35+
Fill="{DynamicResource Brush.FG1}"/>
36+
</TextBox.InnerLeftContent>
37+
3138
<TextBox.InnerRightContent>
3239
<v:RemoteProtocolSwitcher Url="{Binding Remote, Mode=TwoWay}"/>
3340
</TextBox.InnerRightContent>
@@ -45,6 +52,13 @@
4552
Watermark="{DynamicResource Text.SSHKey.Placeholder}"
4653
Text="{Binding SSHKey, Mode=TwoWay}"
4754
IsVisible="{Binding UseSSH}">
55+
<TextBox.InnerLeftContent>
56+
<Path Width="12" Height="12"
57+
Margin="4,0,2,0"
58+
Data="{StaticResource Icons.Password}"
59+
Fill="{DynamicResource Brush.FG1}"/>
60+
</TextBox.InnerLeftContent>
61+
4862
<TextBox.InnerRightContent>
4963
<Button Classes="icon_button" Width="28" Height="28" Click="SelectSSHKey">
5064
<Path Data="{StaticResource Icons.Folder.Open}" Fill="{DynamicResource Brush.FG1}"/>

0 commit comments

Comments
 (0)