Add Git overlay, operation tools, and virtualized preview so large folders stay responsive.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 15:04:04 +02:00
parent 9bf451932f
commit a3c54bbb03
127 changed files with 14748 additions and 633 deletions

View File

@@ -21,6 +21,7 @@ public sealed partial class NavNodeViewModel : ObservableObject
public string Glyph { get; init; } = "\uE8B7";
public bool IsPlaceholder { get; init; }
public bool IsGroup { get; init; }
public bool AvailableToImport { get; init; }
public long? SourceId { get; init; }
public bool CanRemove { get; init; }
}
@@ -83,11 +84,22 @@ public sealed class NavigationTreeViewModel
thisPc.Children.Add(CreateSourceNode(source, _sources.CanForget(source)));
}
thisPc.Children.Add(new NavNodeViewModel
{
Label = LocationRoots.RecycleBin,
Path = LocationRoots.RecycleBin,
Glyph = "\uE74D",
ChildrenLoaded = true
});
var untracked = (await _sources.ListUntrackedOnlineVolumesAsync(cancellationToken).ConfigureAwait(true))
.Where(fp => fp.Kind.IsNetwork())
.ToList();
var network = sources.Where(s => s.Kind.IsNetwork())
.OrderBy(s => PathRules.DriveLetterSortKey(s.LastRootPath))
.ThenBy(s => s.DisplayName, StringComparer.CurrentCultureIgnoreCase)
.ToList();
if (prefs.GroupNetworkPlaces && network.Count > 0)
if (prefs.GroupNetworkPlaces && (network.Count > 0 || untracked.Count > 0))
{
var group = new NavNodeViewModel
{
@@ -103,6 +115,11 @@ public sealed class NavigationTreeViewModel
group.Children.Add(CreateSourceNode(source, _sources.CanForget(source)));
}
foreach (var fp in untracked)
{
group.Children.Add(CreateImportNode(fp));
}
Roots.Add(group);
}
else
@@ -111,6 +128,11 @@ public sealed class NavigationTreeViewModel
{
Roots.Add(CreateSourceNode(source, _sources.CanForget(source)));
}
foreach (var fp in untracked)
{
Roots.Add(CreateImportNode(fp));
}
}
var places = CloudPlaceStore.Merge(_providers.GetPlaces(), _cloudPlaces.Load())
@@ -404,6 +426,17 @@ public sealed class NavigationTreeViewModel
return node;
}
private static NavNodeViewModel CreateImportNode(VolumeFingerprint fingerprint)
=> new()
{
Label = (fingerprint.DisplayName ?? fingerprint.RootPath) + " (Windows)",
Path = fingerprint.RootPath,
Status = "Available in Windows",
Glyph = "\uE968",
ChildrenLoaded = true,
AvailableToImport = true
};
private static int ProviderOrder(string providerId) => providerId switch
{
"onedrive" => 0,