2024-08-04 17:53:19 -05:00
|
|
|
@using LANCommander.Launcher.Models
|
2024-05-30 00:31:38 -05:00
|
|
|
@using System.Diagnostics
|
2024-05-29 20:01:46 -05:00
|
|
|
@inject SDK.Client Client
|
2024-11-12 02:35:28 -06:00
|
|
|
@inject InstallService InstallService
|
2024-06-11 00:24:29 -05:00
|
|
|
@inject GameService GameService
|
2024-11-12 02:35:28 -06:00
|
|
|
@inject NavigationManager NavigationManager
|
|
|
|
|
|
2025-02-22 00:26:54 -06:00
|
|
|
<Flex Justify="FlexJustify.Center" Align="FlexAlign.Center" Gap="FlexGap.Small" Class="footer">
|
|
|
|
|
<div style="flex: 1;">
|
|
|
|
|
@if (NavigationManager.Uri.Contains("/Depot"))
|
|
|
|
|
{
|
|
|
|
|
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.Hdd" OnClick="@(() => NavigationManager.NavigateTo("/"))">Library</Button>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
if (Client.Settings.EnableUserLibraries)
|
|
|
|
|
{
|
|
|
|
|
<ConnectionStateView>
|
|
|
|
|
<Online>
|
|
|
|
|
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.AppstoreAdd" OnClick="@(() => NavigationManager.NavigateTo("/Depot"))">Depot</Button>
|
|
|
|
|
</Online>
|
|
|
|
|
<Offline>
|
|
|
|
|
<Tooltip Title="You are currently offline" Placement="Placement.TopLeft">
|
|
|
|
|
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.AppstoreAdd" Disabled>Depot</Button>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Offline>
|
|
|
|
|
</ConnectionStateView>
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</div>
|
2024-05-27 17:07:28 -05:00
|
|
|
|
2024-10-26 15:48:47 -05:00
|
|
|
@if (InstallService.Queue.Any(qi => qi.State))
|
2024-06-11 00:24:29 -05:00
|
|
|
{
|
2025-02-22 00:26:54 -06:00
|
|
|
<div class="downloader" @onclick="() => ShowDownloadQueue()" style="flex-shrink: 0;">
|
|
|
|
|
<CurrentDownloadItem ShowIcon="true"/>
|
2024-06-11 00:24:29 -05:00
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.Download" OnClick="() => ShowDownloadQueue()">Downloads</Button>
|
|
|
|
|
}
|
2024-11-12 02:35:28 -06:00
|
|
|
|
2025-02-22 00:26:54 -06:00
|
|
|
<div style="flex: 1; text-align: right;">
|
|
|
|
|
<Tooltip Title="Coming soon!" Placement="Placement.TopRight">
|
|
|
|
|
<Button Type="@ButtonType.Text" Icon="@IconType.Outline.Team" Disabled>Friends</Button>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</div>
|
2024-11-12 02:35:28 -06:00
|
|
|
</Flex>
|
2024-05-27 17:07:28 -05:00
|
|
|
|
2024-08-09 01:24:24 -05:00
|
|
|
<DownloadQueue @ref="DownloadQueue" />
|
2024-05-29 20:13:38 -05:00
|
|
|
|
2024-05-27 17:07:28 -05:00
|
|
|
@code {
|
2025-01-18 20:25:39 -06:00
|
|
|
[CascadingParameter] public bool Connected { get; set; }
|
|
|
|
|
|
2024-05-29 20:13:38 -05:00
|
|
|
bool DownloadQueueVisible = false;
|
|
|
|
|
|
2024-08-09 01:24:24 -05:00
|
|
|
DownloadQueue DownloadQueue;
|
|
|
|
|
|
2024-06-12 01:28:26 -05:00
|
|
|
protected override async Task OnInitializedAsync()
|
|
|
|
|
{
|
2024-10-26 15:48:47 -05:00
|
|
|
InstallService.OnQueueChanged += async () =>
|
2024-06-12 01:28:26 -05:00
|
|
|
{
|
|
|
|
|
await InvokeAsync(StateHasChanged);
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
2024-05-29 20:13:38 -05:00
|
|
|
async Task ShowDownloadQueue()
|
|
|
|
|
{
|
2024-08-09 01:24:24 -05:00
|
|
|
await DownloadQueue.Show();
|
2024-05-29 20:13:38 -05:00
|
|
|
}
|
2024-05-27 17:07:28 -05:00
|
|
|
}
|