mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Enable bottom bar for Gallery download progress.
This commit is contained in:
parent
3352657911
commit
052b173876
@ -2,17 +2,29 @@
|
||||
|
||||
<footer id="bottom-bar">
|
||||
<div class="image">
|
||||
<img src="https://raw.githubusercontent.com/wabbajack-tools/mod-lists/master/total-skyrim-overhaul/2020.01.21-01.26.png" alt="">
|
||||
<img src="@Image" alt="">
|
||||
</div>
|
||||
<div class="info">
|
||||
<div class="subtitle">[Subtitle]</div>
|
||||
<div class="title">[Title]</div>
|
||||
<div class="subtitle">@Subtitle</div>
|
||||
<div class="title">@Title</div>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<ProgressBar/>
|
||||
<div class="inside-content">
|
||||
@ChildContent
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string Title { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string Subtitle { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string Image { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; }
|
||||
|
||||
}
|
||||
|
@ -36,8 +36,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.progress {
|
||||
height: 20px;
|
||||
.inside-content {
|
||||
flex: 1;
|
||||
margin: 5rem;
|
||||
}
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<div id="progress-bar">
|
||||
<progress value="@Percentage.Value"></progress>
|
||||
<span class="text">[Centre Text]</span>
|
||||
<span class="text">@Text</span>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
@ -12,4 +12,7 @@
|
||||
[Parameter]
|
||||
public Percent Percentage { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string Text { get; set; }
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
@page "/Gallery"
|
||||
|
||||
@using Wabbajack.DTOs
|
||||
@using Wabbajack.RateLimiter
|
||||
|
||||
@namespace Wabbajack.App.Blazor.Pages
|
||||
|
||||
@ -12,4 +13,12 @@
|
||||
<InteractionIcon Icon="images/icons/info.svg" Label="Information" Size="75px" OnClick="@(() => OnClickInformation(modlist))"/>
|
||||
</ModlistItem>
|
||||
}
|
||||
@if (DownloadProgress != Percent.Zero)
|
||||
{
|
||||
<BottomBar Image="@DownloadingMetaData.Links.ImageUri" Title="Downloading..." Subtitle="@DownloadingMetaData.Title">
|
||||
<div style="height:1.5rem;">
|
||||
<ProgressBar Percentage="@DownloadProgress" Text="@DownloadProgress.Value.ToString()"/>
|
||||
</div>
|
||||
</BottomBar>
|
||||
}
|
||||
</div>
|
||||
|
@ -25,7 +25,8 @@ public partial class Gallery
|
||||
[Inject] private Client _client { get; set; }
|
||||
[Inject] private ModListDownloadMaintainer _maintainer { get; set; }
|
||||
|
||||
public Percent DownloadProgress { get; set; }
|
||||
public Percent DownloadProgress { get; set; } = Percent.Zero;
|
||||
public ModlistMetadata DownloadingMetaData { get; set; } = new ModlistMetadata();
|
||||
|
||||
private List<ModlistMetadata> _listItems { get; set; } = new();
|
||||
|
||||
@ -61,6 +62,7 @@ public partial class Gallery
|
||||
private async Task Download(ModlistMetadata metadata)
|
||||
{
|
||||
GlobalState.NavigationAllowed = false;
|
||||
DownloadingMetaData = metadata;
|
||||
await using Timer timer = new(_ => InvokeAsync(StateHasChanged));
|
||||
timer.Change(TimeSpan.FromMilliseconds(250), TimeSpan.FromMilliseconds(250));
|
||||
try
|
||||
@ -73,6 +75,7 @@ public partial class Gallery
|
||||
dispose.Dispose();
|
||||
|
||||
AbsolutePath path = KnownFolders.EntryPoint.Combine("downloaded_mod_lists", metadata.Links.MachineURL).WithExtension(Ext.Wabbajack);
|
||||
GlobalState.ModListPath = path;
|
||||
NavigationManager.NavigateTo("/Configure");
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -1,22 +1,12 @@
|
||||
@inherits LayoutComponentBase
|
||||
|
||||
@namespace Wabbajack.App.Blazor.Shared
|
||||
|
||||
<CascadingValue Value="@(this)">
|
||||
<div id="background"></div>
|
||||
<SideBar/>
|
||||
<div id="wrapper">
|
||||
<TopBar/>
|
||||
<div id="page">
|
||||
@Body
|
||||
</div>
|
||||
@if (ShowFooter)
|
||||
{
|
||||
<BottomBar/>
|
||||
}
|
||||
<div id="background"></div>
|
||||
<SideBar/>
|
||||
<div id="wrapper">
|
||||
<TopBar/>
|
||||
<div id="page">
|
||||
@Body
|
||||
</div>
|
||||
</CascadingValue>
|
||||
|
||||
@code
|
||||
{
|
||||
public bool ShowFooter { get; set; } = false;
|
||||
}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user