-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:
@@ -132,20 +132,28 @@ public class ServerDashboardViewModel : ViewModelBase
|
||||
get => _isLoading;
|
||||
set => this.RaiseAndSetIfChanged(ref _isLoading, value);
|
||||
}
|
||||
private readonly MainWindowViewModel _main;
|
||||
|
||||
public ServerDashboardViewModel()
|
||||
public ServerDashboardViewModel(MainWindowViewModel main)
|
||||
{
|
||||
|
||||
_main = main;
|
||||
|
||||
InstallBepInExCommand = ReactiveCommand.Create(InstallBepInEx);
|
||||
UpdateBepInExCommand = ReactiveCommand.Create(UpdateBepInEx);
|
||||
UploadModCommand = ReactiveCommand.CreateFromTask(UploadMod);
|
||||
InstallFromStoreCommand = ReactiveCommand.Create(InstallFromStore);
|
||||
//InstallFromStoreCommand = ReactiveCommand.Create(InstallFromStore);
|
||||
InstallFromStoreCommand = ReactiveCommand.Create(() =>
|
||||
{
|
||||
Debug.WriteLine("InstallFromStoreCommand");
|
||||
_main.SwitchToStore();
|
||||
});
|
||||
SaveConfigCommand = ReactiveCommand.Create(SaveConfig);
|
||||
RemoveModCommand = ReactiveCommand.Create<ModInfo,Task>(RemoveMod);
|
||||
UpdateModCommand = ReactiveCommand.Create<ModInfo>(UpdateMod);
|
||||
|
||||
|
||||
// DEBUG: harter Testtext – MUSS im Editor erscheinen
|
||||
ConfigDocument.Text = "Bitte Mod Auswählen";
|
||||
|
||||
|
||||
// SelectedModConfig Sync mit ConfigDocument text (:
|
||||
|
||||
@@ -167,11 +175,19 @@ public class ServerDashboardViewModel : ViewModelBase
|
||||
//Mods.Add(new ModInfo { Name = "BetterUI", Version = "2.3.4", ConfigPath = "config/better_ui.cfg" });
|
||||
|
||||
// Start async Initialisierung
|
||||
_ = InitializeAsync();
|
||||
// _ = InitializeAsync();
|
||||
|
||||
//CheckBepInExStatus();
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
// Start async Initialisierung
|
||||
_ = InitializeAsync();
|
||||
ConfigDocument.Text = "Bitte Mod Auswählen";
|
||||
}
|
||||
|
||||
|
||||
private async Task InitializeAsync()
|
||||
{
|
||||
IsLoading = true;
|
||||
@@ -714,7 +730,11 @@ public class ServerDashboardViewModel : ViewModelBase
|
||||
}
|
||||
|
||||
|
||||
private void InstallFromStore() { /* TODO */ }
|
||||
private void InstallFromStore() {
|
||||
|
||||
|
||||
|
||||
}
|
||||
private void SaveConfig() {
|
||||
Debug.WriteLine(SelectedMod.ConfigPath);
|
||||
FtpViewModel._ftpClient.UploadTextAsync(SelectedModConfig, SelectedMod.ConfigPath);
|
||||
|
||||
Reference in New Issue
Block a user