feat: add workspace-specific default clone directory functionality

- Implemented logic in Clone.cs to set ParentFolder based on the active workspace's DefaultCloneDir if available, falling back to the global GitDefaultCloneDir.
- Added DefaultCloneDir property to Workspace.cs to store the default clone directory for each workspace.
- Updated ConfigureWorkspace.axaml to include a TextBox and Button for setting the DefaultCloneDir in the UI.
- Implemented folder selection functionality in ConfigureWorkspace.axaml.cs to allow users to choose a directory for cloning.
- This closes issue #1145
This commit is contained in:
mpagani 2025-04-14 10:29:24 +02:00
parent abe4568df2
commit eeba761061
4 changed files with 55 additions and 4 deletions

View file

@ -46,6 +46,12 @@ namespace SourceGit.ViewModels
set => SetProperty(ref _restoreOnStartup, value);
}
public string DefaultCloneDir
{
get => _defaultCloneDir;
set => SetProperty(ref _defaultCloneDir, value);
}
public IBrush Brush
{
get => new SolidColorBrush(_color);
@ -55,5 +61,6 @@ namespace SourceGit.ViewModels
private uint _color = 4278221015;
private bool _isActive = false;
private bool _restoreOnStartup = true;
private string _defaultCloneDir = string.Empty;
}
}