Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 2 additions & 26 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,32 +53,6 @@ src/.vs
src/.vscode
new-names.docx

src/UniGetUI/choco-cli/logs/
src/UniGetUI/choco-cli/lib/
src/UniGetUI/choco-cli/lib-bad/
src/UniGetUI/choco-cli/.chocolatey/
src/UniGetUI/choco-cli/lib/chocolatey-compatibility.extension/*
src/UniGetUI/choco-cli/extensions/chocolatey-core/*
src/UniGetUI/choco-cli/extensions/chocolatey-compatibility/*
src/UniGetUI/choco-cli/lib-bkp/
src/UniGetUI/choco-cli/extensions/chocolatey-windowsupdate/*
src/UniGetUI/choco-cli/bin/chocolatey.exe
src/UniGetUI/choco-cli/redirects/chocolatey.exe
src/UniGetUI/choco-cli/redirects/chocolatey.exe.ignore
src/UniGetUI/choco-cli/redirects/cinst.exe
src/UniGetUI/choco-cli/redirects/cinst.exe.ignore
src/UniGetUI/choco-cli/redirects/clist.exe
src/UniGetUI/choco-cli/redirects/clist.exe.ignore
src/UniGetUI/choco-cli/redirects/cpush.exe
src/UniGetUI/choco-cli/redirects/cpush.exe.ignore
src/UniGetUI/choco-cli/redirects/cuninst.exe
src/UniGetUI/choco-cli/redirects/cuninst.exe.ignore
src/UniGetUI/choco-cli/redirects/cup.exe
src/UniGetUI/choco-cli/redirects/cup.exe.ignore
src/UniGetUI/choco-cli/bin/ssh-copy-id.exe
src/UniGetUI/choco-cli/extensions/chocolatey-visualstudio/
src/UniGetUI/choco-cli/extensions/chocolatey-dotnetfx/

*.user
/src/UniGetUI/Generated Files
/src/UniGetUI.Avalonia/Infrastructure/Generated Files
Expand All @@ -96,3 +70,5 @@ src/UniGetUI.v3.ncrunchsolution
# macOS Finder metadata
.DS_Store
/src/UniGetUI.Avalonia/Generated Files

winget-cli_x64/
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ public partial class UpdatesViewModel : ViewModelBase
[ObservableProperty] private bool _isAutoCheckEnabled;
[ObservableProperty] private bool _isCustomAgeSelected;

private static readonly HashSet<string> _managersWithoutUpdateDate =
new(StringComparer.OrdinalIgnoreCase)
{ "Homebrew", "Scoop", "vcpkg" };

/// <summary>Items for the minimum update age ComboboxCard, in display/value pairs.</summary>
public IReadOnlyList<(string Name, string Value)> MinimumAgeItems { get; } =
[
Expand Down Expand Up @@ -89,7 +85,7 @@ public Control BuildReleaseDateCompatTable()
var name = new TextBlock { Text = manager.DisplayName, VerticalAlignment = VerticalAlignment.Center };
Grid.SetRow(name, row); Grid.SetColumn(name, 0);

bool supported = !_managersWithoutUpdateDate.Contains(manager.Name);
bool supported = manager.Capabilities.SupportsMinimumAge;
var badge = _statusBadge(supported ? yesStr : noStr, supported ? Colors.Green : Colors.Red);
Grid.SetRow(badge, row); Grid.SetColumn(badge, 1);
Comment on lines 85 to 90

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ namespace UniGetUI.Avalonia.Views.Pages.SettingsPages;

public sealed partial class PackageManagerPage : UserControl, ISettingsPage
{
private static readonly HashSet<string> _managersWithoutUpdateDate =
new(StringComparer.OrdinalIgnoreCase)
{ "Homebrew", "Scoop", "vcpkg" };
private PackageManagerViewModel ViewModel => (PackageManagerViewModel)DataContext!;

public bool CanGoBack => true;
Expand Down Expand Up @@ -260,7 +257,7 @@ private void BuildPage()
};

bool initiallyCustom = savedAge == "custom";
bool ageSupported = !_managersWithoutUpdateDate.Contains(manager.Name);
bool ageSupported = manager.Capabilities.SupportsMinimumAge;
object ageDescription = !ageSupported
Comment on lines 257 to 261
? new TextBlock
{
Expand Down
1 change: 1 addition & 0 deletions src/UniGetUI.PackageEngine.Enums/ManagerCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public struct ManagerCapabilities
public bool SupportsCustomSources = false;
public bool SupportsCustomPackageIcons = false;
public bool SupportsCustomPackageScreenshots = false;
public bool SupportsMinimumAge = false;
public ProxySupport SupportsProxy = ProxySupport.No;
public bool SupportsProxyAuth = false;
public SourceCapabilities Sources { get; set; }
Comment on lines 35 to 41
Expand Down
1 change: 1 addition & 0 deletions src/UniGetUI.PackageEngine.Managers.Bun/Bun.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public Bun()
SupportsCustomScopes = false,
CanListDependencies = true,
SupportsPreRelease = true,
SupportsMinimumAge = true,
SupportsProxy = ProxySupport.No,
SupportsProxyAuth = false
};
Expand Down
1 change: 1 addition & 0 deletions src/UniGetUI.PackageEngine.Managers.Cargo/Cargo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public Cargo()
SupportsCustomVersions = true,
SupportsCustomLocations = true,
CanDownloadInstaller = true,
SupportsMinimumAge = true,
SupportsProxy = ProxySupport.Partially,
SupportsProxyAuth = true,
};
Expand Down
1 change: 1 addition & 0 deletions src/UniGetUI.PackageEngine.Managers.Npm/Npm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public Npm()
SupportsCustomScopes = true,
CanListDependencies = true,
SupportsPreRelease = true,
SupportsMinimumAge = true,
SupportsProxy = ProxySupport.No,
SupportsProxyAuth = false,
};
Expand Down
1 change: 1 addition & 0 deletions src/UniGetUI.PackageEngine.Managers.Pip/Pip.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public Pip()
CanDownloadInstaller = true,
SupportsPreRelease = true,
CanListDependencies = true,
SupportsMinimumAge = true,
SupportsProxy = ProxySupport.Yes,
SupportsProxyAuth = true,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ namespace UniGetUI.Pages.SettingsPages.GeneralPages
/// </summary>
public sealed partial class Updates : Page, ISettingsPage
{
private static readonly HashSet<string> _managersWithoutUpdateDate =
new(StringComparer.OrdinalIgnoreCase) { "Homebrew", "Scoop", "vcpkg", "WinGet" };

public Updates()
{
this.InitializeComponent();
Expand Down Expand Up @@ -130,7 +127,7 @@ private static UIElement BuildReleaseDateCompatTable()
int row = i + 1;
var name = new TextBlock { Text = manager.DisplayName, VerticalAlignment = VerticalAlignment.Center };
Grid.SetRow(name, row); Grid.SetColumn(name, 0);
bool supported = !_managersWithoutUpdateDate.Contains(manager.Name);
bool supported = manager.Capabilities.SupportsMinimumAge;
var badge = MakeStatusBadge(supported ? yesStr : noStr, supported);
Grid.SetRow(badge, row); Grid.SetColumn(badge, 1);
Comment on lines 127 to 132
table.Children.Add(name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ namespace UniGetUI.Pages.SettingsPages.GeneralPages
/// </summary>
public sealed partial class PackageManagerPage : Page, ISettingsPage
{
private static readonly HashSet<string> _managersWithoutUpdateDate =
new(StringComparer.OrdinalIgnoreCase) { "Homebrew", "Scoop", "vcpkg", "WinGet" };

IPackageManager? Manager;
public event EventHandler? RestartRequired;
public event EventHandler<Type>? NavigationRequested
Expand Down Expand Up @@ -493,7 +490,7 @@ protected override void OnNavigatedTo(NavigationEventArgs e)
};

bool initiallyCustomAge = savedAgeVal == "custom";
bool ageSupported = !_managersWithoutUpdateDate.Contains(Manager.Name);
bool ageSupported = Manager.Capabilities.SupportsMinimumAge;

object ageCardDescription = !ageSupported
Comment on lines 491 to 495
? new TextBlock
Expand Down
Loading