mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Review feedback.
This commit is contained in:
parent
47ffa30222
commit
2c99f1f4f8
@ -15,20 +15,18 @@
|
||||
|
||||
[Parameter] public IObservable<Percent> ProgressObserver { get; set; }
|
||||
|
||||
[Parameter] public string Text { get; set; }
|
||||
[Parameter] public string? Text { get; set; }
|
||||
|
||||
protected override Task OnInitializedAsync()
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
var textPercentage = string.IsNullOrEmpty(Text);
|
||||
ProgressObserver
|
||||
.Sample(TimeSpan.FromMilliseconds(250))
|
||||
.DistinctUntilChanged()
|
||||
.DistinctUntilChanged(p => p.Value)
|
||||
.Subscribe(p => {
|
||||
CurrentProgress = p.Value;
|
||||
if (textPercentage) Text = p.ToString();
|
||||
InvokeAsync(StateHasChanged);
|
||||
});
|
||||
|
||||
return base.OnInitializedAsync();
|
||||
}
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
@using Wabbajack.App.Blazor.Pages
|
||||
|
||||
@namespace Wabbajack.App.Blazor.Components
|
||||
|
||||
<div id="step-logger">
|
||||
@foreach (var step in value.StatusStep.Take(ShownSteps))
|
||||
{
|
||||
<div class="step">@step</div>
|
||||
}
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter]
|
||||
public int ShownSteps { get; set; }
|
||||
[Parameter]
|
||||
public bool Reverse { get; set; }
|
||||
|
||||
[CascadingParameter]
|
||||
public Installing value { get; set; }
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
#step-logger {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
|
||||
.step {
|
||||
&:nth-child(1) {
|
||||
margin-left: 0.5rem;
|
||||
font-size: 2rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-left: 0.75rem;
|
||||
font-size: 1.85rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
filter: blur(1px);
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
margin-left: 1rem;
|
||||
font-size: 1.7rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
filter: blur(1.5px);
|
||||
}
|
||||
}
|
||||
}
|
@ -23,7 +23,7 @@ public partial class Gallery
|
||||
[Inject] private NavigationManager NavigationManager { get; set; } = default!;
|
||||
[Inject] private ModListDownloadMaintainer Maintainer { get; set; } = default!;
|
||||
|
||||
[CascadingParameter] public IModalService Modal { get; set; }
|
||||
[Inject] private IModalService Modal { get; set; } = default!;
|
||||
private IObservable<Percent> DownloadProgress { get; set; }
|
||||
private ModlistMetadata? DownloadingMetaData { get; set; }
|
||||
|
||||
@ -79,6 +79,7 @@ public partial class Gallery
|
||||
|
||||
var dispose = progress
|
||||
.Sample(TimeSpan.FromMilliseconds(250))
|
||||
.DistinctUntilChanged(p => p.Value)
|
||||
.Subscribe(p => {
|
||||
StateContainer.TaskBarState = new TaskBarState
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ public partial class Configure
|
||||
}
|
||||
}
|
||||
|
||||
private async void SelectInstallFolder()
|
||||
private async Task SelectInstallFolder()
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -103,7 +103,7 @@ public partial class Configure
|
||||
}
|
||||
}
|
||||
|
||||
private async void SelectDownloadFolder()
|
||||
private async Task SelectDownloadFolder()
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -10,17 +10,16 @@
|
||||
@if (Modlist is not null)
|
||||
{
|
||||
<div class="left-side">
|
||||
<CascadingValue Value=this>
|
||||
<InfoBlock Supertitle="@StatusCategory" Title="@Modlist.Name"/>
|
||||
<StepLogger ShownSteps="3" Reverse="false" Steps="@StatusStep"/>
|
||||
</CascadingValue>
|
||||
<div class="step-logger">
|
||||
@foreach (var step in StatusStep.Take(3))
|
||||
{
|
||||
<div class="step">@step</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
<div class="right-side">
|
||||
<InfoImage Image="@ModlistImage" Title="Some Mod Title" Subtitle="Author and others" Description="This mod adds something cool but I'm not going to tell you anything."/>
|
||||
<div id="progressthing1"></div>
|
||||
<div id="progressthing2"></div>
|
||||
<div id="progressthing3"></div>
|
||||
<div id="progressthing4"></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@ public partial class Installing
|
||||
_shouldRender = true;
|
||||
}
|
||||
|
||||
private async void Install()
|
||||
private async Task Install()
|
||||
{
|
||||
if (Modlist is null) return;
|
||||
|
||||
|
@ -48,6 +48,40 @@ $checkbox-size: 0.75rem;
|
||||
.left-side, .right-side {
|
||||
flex: 1;
|
||||
margin: 1rem;
|
||||
|
||||
.step-logger {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-content: center;
|
||||
|
||||
.step {
|
||||
&:nth-child(1) {
|
||||
margin-left: 0.5rem;
|
||||
font-size: 2rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}
|
||||
|
||||
&:nth-child(2) {
|
||||
margin-left: 0.75rem;
|
||||
font-size: 1.85rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.6);
|
||||
filter: blur(1px);
|
||||
}
|
||||
|
||||
&:nth-child(3) {
|
||||
margin-left: 1rem;
|
||||
font-size: 1.7rem;
|
||||
font-weight: 100;
|
||||
color: rgba(255, 255, 255, 0.4);
|
||||
filter: blur(1.5px);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,12 +36,6 @@
|
||||
<script src="_framework/blazor.webview.js"></script>
|
||||
<script src="_content/Blazored.Modal/blazored.modal.js"></script>
|
||||
<script>
|
||||
async function setImageUsingStreaming(imageElementId, imageStream) {
|
||||
const arrayBuffer = await imageStream.arrayBuffer();
|
||||
const blob = new Blob([arrayBuffer]);
|
||||
document.getElementById(imageElementId).src = URL.createObjectURL(blob);
|
||||
}
|
||||
|
||||
async function getBlobUrlFromStream(imageStream) {
|
||||
const arrayBuffer = await imageStream.arrayBuffer();
|
||||
const blob = new Blob([arrayBuffer]);
|
||||
|
Loading…
Reference in New Issue
Block a user