mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
More changes from feedback.
This commit is contained in:
parent
2c99f1f4f8
commit
95f9263984
@ -4,7 +4,10 @@
|
||||
|
||||
<div id="content">
|
||||
<div class="install-background">
|
||||
<img id="background-image" src="@ModlistImage" alt=""/>
|
||||
@if (ModlistImage is not null)
|
||||
{
|
||||
<img id="background-image" src="@ModlistImage" alt=""/>
|
||||
}
|
||||
</div>
|
||||
<div class="list">
|
||||
@if (Modlist is not null)
|
||||
@ -13,7 +16,10 @@
|
||||
<InfoBlock Title="@Modlist.Name" Subtitle="@Modlist.Author" Comment="@Modlist.Version.ToString()" Description="@Modlist.Description"/>
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<InfoImage Image="@ModlistImage"/>
|
||||
@if (ModlistImage is not null)
|
||||
{
|
||||
<InfoImage Image="@ModlistImage"/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -27,7 +27,7 @@ public partial class Configure
|
||||
[Inject] private IToastService toastService { get; set; }
|
||||
|
||||
private ModList? Modlist => StateContainer.Modlist;
|
||||
private string ModlistImage => StateContainer.ModlistImage;
|
||||
private string? ModlistImage => StateContainer.ModlistImage;
|
||||
private AbsolutePath ModlistPath => StateContainer.ModlistPath;
|
||||
private AbsolutePath InstallPath => StateContainer.InstallPath;
|
||||
private AbsolutePath DownloadPath => StateContainer.DownloadPath;
|
||||
@ -81,7 +81,7 @@ public partial class Configure
|
||||
{
|
||||
var imageStream = await StandardInstaller.ModListImageStream(ModlistPath);
|
||||
var dotnetImageStream = new DotNetStreamReference(imageStream);
|
||||
StateContainer.ModlistImage = new string(await JSRuntime.InvokeAsync<string>("getBlobUrlFromStream", dotnetImageStream));
|
||||
StateContainer.ModlistImage = await JSRuntime.InvokeAsync<string>("getBlobUrlFromStream", dotnetImageStream);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -26,8 +26,8 @@ public interface IStateContainer
|
||||
IObservable<ModList?> ModlistObservable { get; }
|
||||
ModList? Modlist { get; set; }
|
||||
|
||||
IObservable<string> ModlistImageObservable { get; }
|
||||
string ModlistImage { get; set; }
|
||||
IObservable<string?> ModlistImageObservable { get; }
|
||||
string? ModlistImage { get; set; }
|
||||
|
||||
IObservable<InstallState> InstallStateObservable { get; }
|
||||
InstallState InstallState { get; set; }
|
||||
|
@ -79,9 +79,9 @@ public class StateContainer : IStateContainer
|
||||
set => _modlistObservable.Value = value;
|
||||
}
|
||||
|
||||
private readonly CustomObservable<string> _modlistImageObservable = new(string.Empty);
|
||||
public IObservable<string> ModlistImageObservable => _modlistImageObservable;
|
||||
public string ModlistImage
|
||||
private readonly CustomObservable<string?> _modlistImageObservable = new(string.Empty);
|
||||
public IObservable<string?> ModlistImageObservable => _modlistImageObservable;
|
||||
public string? ModlistImage
|
||||
{
|
||||
get => _modlistImageObservable.Value;
|
||||
set => _modlistImageObservable.Value = value;
|
||||
|
Loading…
Reference in New Issue
Block a user