diff --git a/src/ViewModels/RepositoryConfigure.cs b/src/ViewModels/RepositoryConfigure.cs index bad30749..d8626842 100644 --- a/src/ViewModels/RepositoryConfigure.cs +++ b/src/ViewModels/RepositoryConfigure.cs @@ -37,8 +37,8 @@ namespace SourceGit.ViewModels public string HttpProxy { - get; - set; + get => _httpProxy; + set => SetProperty(ref _httpProxy, value); } public RepositoryConfigure(Repository repo) @@ -60,6 +60,11 @@ namespace SourceGit.ViewModels HttpProxy = proxy; } + public void ClearHttpProxy() + { + HttpProxy = string.Empty; + } + public void Save() { SetIfChanged("user.name", UserName); @@ -90,5 +95,6 @@ namespace SourceGit.ViewModels private readonly Repository _repo = null; private readonly Dictionary _cached = null; + private string _httpProxy; } } diff --git a/src/Views/RepositoryConfigure.axaml b/src/Views/RepositoryConfigure.axaml index 38f6dc87..e1872458 100644 --- a/src/Views/RepositoryConfigure.axaml +++ b/src/Views/RepositoryConfigure.axaml @@ -77,7 +77,13 @@ Height="28" CornerRadius="3" Watermark="{DynamicResource Text.Configure.Proxy.Placeholder}" - Text="{Binding HttpProxy, Mode=TwoWay}"/> + Text="{Binding HttpProxy, Mode=TwoWay}"> + + + +