-Komplette view überarbeitet für Thunderstore mit mods suche, vorschau, markdown (readme) etc

todo: wenn neuer mod aufgerufen wird, soll die zurückfunktion deaktviert sein oder so das sie den mod mit aktualisiert zu dem der davor ausgewählt war (:
This commit is contained in:
tbS
2025-09-10 23:47:40 +02:00
parent aaf6e02862
commit 74a79c28ab
23 changed files with 1751 additions and 47 deletions

View File

@@ -0,0 +1,35 @@
using Avalonia;
using ReactiveUI;
using System.ComponentModel;
using System.Reactive;
namespace Valheim_Dashboard.ViewModels;
public class StoreViewModel : ViewModelBase
{
public ViewModelBase CurrentStoreView { get; set; }
public ReactiveCommand<Unit, Unit> BackCommand { get; }
public ReactiveCommand<Unit, ViewModelBase> ShowThunderstoreCommand { get; }
public ReactiveCommand<Unit, ViewModelBase> ShowNexusCommand { get; }
private readonly MainWindowViewModel _main;
public StoreViewModel(MainWindowViewModel main)
{
_main = main;
BackCommand = ReactiveCommand.Create(() =>
{
_main.SwitchToServerDashboard();
});
ShowThunderstoreCommand = ReactiveCommand.Create(() => CurrentStoreView = new ThunderstoreViewModel());
ShowNexusCommand = ReactiveCommand.Create(() => CurrentStoreView = new NexusViewModel());
// Default → Thunderstore
CurrentStoreView = new ThunderstoreViewModel();
}
}