mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
refactor: repository configure
* move button to the left * change view type from Popup to ChromelessWindow
This commit is contained in:
parent
0fb121e6ed
commit
31f918071f
6 changed files with 115 additions and 45 deletions
|
@ -1,9 +1,9 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class RepositoryConfigure : Popup
|
||||
public class RepositoryConfigure : ObservableObject
|
||||
{
|
||||
public string UserName
|
||||
{
|
||||
|
@ -58,11 +58,9 @@ namespace SourceGit.ViewModels
|
|||
GPGUserSigningKey = signingKey;
|
||||
if (_cached.TryGetValue("http.proxy", out var proxy))
|
||||
HttpProxy = proxy;
|
||||
|
||||
View = new Views.RepositoryConfigure() { DataContext = this };
|
||||
}
|
||||
|
||||
public override Task<bool> Sure()
|
||||
public void Save()
|
||||
{
|
||||
SetIfChanged("user.name", UserName);
|
||||
SetIfChanged("user.email", UserEmail);
|
||||
|
@ -70,7 +68,6 @@ namespace SourceGit.ViewModels
|
|||
SetIfChanged("tag.gpgsign", GPGTagSigningEnabled ? "true" : "false");
|
||||
SetIfChanged("user.signingkey", GPGUserSigningKey);
|
||||
SetIfChanged("http.proxy", HttpProxy);
|
||||
return null;
|
||||
}
|
||||
|
||||
private void SetIfChanged(string key, string value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue