work
This commit is contained in:
@@ -2,7 +2,7 @@ using System.ComponentModel;
|
||||
using ModpackUpdater.Apps.Manager.Utils;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models;
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
|
||||
public class MainWindowGridRow(InstallAction action, IActionSet baseActions) : INotifyPropertyChanged
|
||||
{
|
||||
@@ -1,6 +1,6 @@
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using ModpackUpdater.Apps.Manager.Api.Plugins.Features;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models;
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
|
||||
public record class MainWindowRecentFilesItem(WorkspaceConfig Config, WorkspaceFeature Feature);
|
||||
@@ -4,7 +4,7 @@ using System.Runtime.CompilerServices;
|
||||
using Avalonia.Media;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models;
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
|
||||
public abstract class MainWindowTreeNode : INotifyPropertyChanged
|
||||
{
|
||||
@@ -1,11 +1,9 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Avalonia.Controls;
|
||||
using ModpackUpdater.Apps.Manager.Api.Model;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models;
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.MainWindow;
|
||||
|
||||
public class MainWindowViewModel : INotifyPropertyChanged
|
||||
{
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||
|
||||
public record ModUpdateInfo(KeyValuePair<string, string>[] AvailableVersions, InstallAction Origin)
|
||||
{
|
||||
public int NewVersion { get; set; }
|
||||
public bool Visible { get; set; }
|
||||
public IEnumerable<string> DisplayVersions { get; } = AvailableVersions.Select(n =>
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(n.Value) || n.Value == n.Key)
|
||||
return n.Key;
|
||||
return $"{n.Value} ({n.Value})";
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||
|
||||
public record ModUpdates(IList<ModUpdateInfo> List);
|
||||
@@ -0,0 +1,18 @@
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using PropertyChanged;
|
||||
|
||||
namespace ModpackUpdater.Apps.Manager.Ui.Models.UpdatesCollectorViewMode;
|
||||
|
||||
public class UpdatesCollectorViewModel : INotifyPropertyChanged
|
||||
{
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public bool ProgressVisible { get; set; }
|
||||
public double ProgressMaxValue { get; set; }
|
||||
public double ProgressValue { get; set; }
|
||||
[DependsOn(nameof(ProgressValue), nameof(ProgressMaxValue))]
|
||||
public string? ProgressText => $"{Math.Round(ProgressValue / ProgressMaxValue * 100)}%";
|
||||
public string? SearchText { get; set; }
|
||||
public ObservableCollection<ModUpdateInfo> Updates { get; } = [];
|
||||
}
|
||||
Reference in New Issue
Block a user