@using LANCommander.Launcher.Models @inject InstallService InstallService @inject NavigationManager NavigationManager @inject LocalizationService LocalizationService @inject IJSRuntime JS
@if (NavigationManager.Uri.Contains("/Depot")) { } else { if (true) { } }
@if (InstallService.Queue.Any(qi => qi.State)) {
}
@code { [CascadingParameter] public bool Connected { get; set; } bool DownloadQueueVisible = false; IInstallQueueItem _currentQueueItem { get; set; } DownloadQueue DownloadQueue; protected override async Task OnInitializedAsync() { InstallService.OnQueueChanged += async () => { await InvokeAsync(StateHasChanged); }; NavigationManager.LocationChanged += LocationChanged; } async void LocationChanged(object sender, LocationChangedEventArgs args) { await InvokeAsync(StateHasChanged); } async Task Cancel() { await InstallService.CancelInstallAsync(_currentQueueItem.Id); } async Task ShowDownloadQueue() { await DownloadQueue.Show(); } async Task OpenChatWindow() { await JS.InvokeVoidAsync("window.external.sendMessage", "openChat"); } }