mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-25 22:25:00 +00:00
feature: add checkbox to enable/disable global http.sslVerify
configuration (#877)
This commit is contained in:
parent
7a217336dc
commit
1596ca71a5
5 changed files with 21 additions and 1 deletions
|
@ -255,7 +255,7 @@
|
|||
<TextBlock Classes="tab_header" Text="{DynamicResource Text.Preference.Git}"/>
|
||||
</TabItem.Header>
|
||||
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<Grid Margin="8" RowDefinitions="32,32,32,32,32,32" ColumnDefinitions="Auto,*">
|
||||
<TextBlock Grid.Row="0" Grid.Column="0"
|
||||
Text="{DynamicResource Text.Preference.Git.Path}"
|
||||
HorizontalAlignment="Right"
|
||||
|
@ -326,6 +326,11 @@
|
|||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<CheckBox Grid.Row="5" Grid.Column="1"
|
||||
Height="32"
|
||||
Content="{DynamicResource Text.Preference.Git.SSLVerify}"
|
||||
IsChecked="{Binding #ThisControl.EnableHTTPSSLVerify, Mode=TwoWay}"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
|
||||
|
|
|
@ -73,6 +73,12 @@ namespace SourceGit.Views
|
|||
set;
|
||||
}
|
||||
|
||||
public bool EnableHTTPSSLVerify
|
||||
{
|
||||
get;
|
||||
set;
|
||||
} = false;
|
||||
|
||||
public static readonly StyledProperty<Models.OpenAIService> SelectedOpenAIServiceProperty =
|
||||
AvaloniaProperty.Register<Preference, Models.OpenAIService>(nameof(SelectedOpenAIService));
|
||||
|
||||
|
@ -112,6 +118,11 @@ namespace SourceGit.Views
|
|||
else if (config.TryGetValue($"gpg.{GPGFormat.Value}.program", out var gpgProgram))
|
||||
GPGExecutableFile = gpgProgram;
|
||||
|
||||
if (config.TryGetValue("http.sslverify", out var sslVerify))
|
||||
EnableHTTPSSLVerify = sslVerify == "true";
|
||||
else
|
||||
EnableHTTPSSLVerify = true;
|
||||
|
||||
ver = new Commands.Version().Query();
|
||||
}
|
||||
|
||||
|
@ -142,6 +153,7 @@ namespace SourceGit.Views
|
|||
SetIfChanged(config, "core.autocrlf", CRLFMode != null ? CRLFMode.Value : null, null);
|
||||
SetIfChanged(config, "commit.gpgsign", EnableGPGCommitSigning ? "true" : "false", "false");
|
||||
SetIfChanged(config, "tag.gpgsign", EnableGPGTagSigning ? "true" : "false", "false");
|
||||
SetIfChanged(config, "http.sslverify", EnableHTTPSSLVerify ? "" : "false", "");
|
||||
SetIfChanged(config, "gpg.format", GPGFormat.Value, "openpgp");
|
||||
|
||||
if (!GPGFormat.Value.Equals("ssh", StringComparison.Ordinal))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue