This commit is contained in:
Timothy Baldridge 2022-08-04 21:46:15 -06:00
parent 175677a033
commit d0709ffda0
5 changed files with 40 additions and 2 deletions

View File

@ -1,5 +1,9 @@
### Changelog
#### Version - 2.5.3.26 - 8/4/2022
* Use the new VectorPlexis domain
* Use the new LoversLab API domain
#### Version - 2.5.3.25 - 6/29/2022
* Correctly modify Witcher 3 settings to the game accepts the values

View File

@ -13,6 +13,7 @@ using System.Text.Json;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Windows.Threading;
using DynamicData;
using Microsoft.WindowsAPICodePack.Dialogs;
using ReactiveUI.Fody.Helpers;
@ -24,6 +25,7 @@ using Wabbajack.Models;
using Wabbajack.Networking.WabbajackClientApi;
using Wabbajack.Paths;
using Wabbajack.Paths.IO;
using Wabbajack.RateLimiter;
using Wabbajack.Services.OSIntegrated;
namespace Wabbajack
@ -48,6 +50,9 @@ namespace Wabbajack
private readonly CompilerSettingsInferencer _inferencer;
private readonly Client _wjClient;
[Reactive] public string StatusText { get; set; }
[Reactive] public Percent StatusProgress { get; set; }
[Reactive]
public CompilerState State { get; set; }
@ -109,6 +114,9 @@ namespace Wabbajack
_inferencer = inferencer;
_wjClient = wjClient;
StatusText = "Compiler Settings";
StatusProgress = Percent.Zero;
BackCommand =
ReactiveCommand.CreateFromTask(async () =>
{
@ -241,6 +249,16 @@ namespace Wabbajack
var compiler = MO2Compiler.Create(_serviceProvider, mo2Settings);
compiler.OnStatusUpdate += (sender, update) =>
{
RxApp.MainThreadScheduler.Schedule(update, (scheduler, update) =>
{
StatusText = update.StatusText;
StatusProgress = update.StepsProgress;
return Disposable.Empty;
});
};
await compiler.Begin(token);
if (PublishUpdate)
@ -256,6 +274,10 @@ namespace Wabbajack
}
catch (Exception ex)
{
StatusText = "Compilation Failed";
StatusProgress = Percent.Zero;
State = CompilerState.Errored;
_logger.LogInformation(ex, "Failed Compilation : {Message}", ex.Message);
}

View File

@ -154,6 +154,18 @@ namespace Wabbajack
this.Bind(ViewModel, vm => vm.MachineUrl, view => view.MachineUrl.Text)
.DisposeWith(disposables);
this.Bind(ViewModel, vm => vm.StatusText, view => view.TopProgressBar.Title)
.DisposeWith(disposables);
ViewModel.WhenAnyValue(vm => vm.StatusText)
.BindToStrict(this, view => view.TopProgressBar.Title)
.DisposeWith(disposables);
ViewModel.WhenAnyValue(vm => vm.StatusProgress)
.Select(d => d.Value)
.BindToStrict(this, view => view.TopProgressBar.ProgressPercent)
.DisposeWith(disposables);
ViewModel.WhenAnyValue(vm => vm.AlwaysEnabled)
.WhereNotNull()
.Select(itms => itms.Select(itm => new RemovableItemViewModel(itm.ToString(), () => ViewModel.RemoveAlwaysEnabled(itm))).ToArray())

View File

@ -13,7 +13,7 @@ public class LoversLabDownloader : AIPS4OAuth2Downloader<LoversLabDownloader, Lo
public LoversLabDownloader(ILogger<LoversLabDownloader> logger, ITokenProvider<LoversLabLoginState> loginInfo,
HttpClient client,
IHttpDownloader downloader, ApplicationInfo appInfo) : base(logger, loginInfo, client, downloader, appInfo,
new Uri("https://loverslab.com"), "Lovers Lab")
new Uri("https://api.loverslab.com"), "Lovers Lab")
{
}
}

View File

@ -14,7 +14,7 @@ public class
public VectorPlexusDownloader(ILogger<VectorPlexusDownloader> logger,
ITokenProvider<VectorPlexusLoginState> loginInfo, HttpClient client,
IHttpDownloader downloader, ApplicationInfo appInfo)
: base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexus.com"), "Vector Plexus")
: base(logger, loginInfo, client, downloader, appInfo, new Uri("https://vectorplexis.com"), "Vector Plexus")
{
}
}