Skip to content

Commit

Permalink
This should fix the relavite path for signalr
Browse files Browse the repository at this point in the history
  • Loading branch information
devedse committed Aug 1, 2023
1 parent e40ab33 commit ab77e7a
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion DeveLanCacheUI_Frontend/Pages/ChatTest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

var backendBaseUrl = await _backendConnectionService.GetBackendBaseUrlAsync();
hubConnection = new HubConnectionBuilder()
.WithUrl($"{backendBaseUrl}chathub")
.WithUrl(Navigation.ToAbsoluteUri($"{backendBaseUrl}chathub"))
.Build();

hubConnection.On<string, string>("ReceiveMessage", async (user, message) =>
Expand Down
3 changes: 2 additions & 1 deletion DeveLanCacheUI_Frontend/Pages/DownloadStatsPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@inject HttpClient Http
@inject BackendConnectionService _backendConnectionService
@inject Blazored.LocalStorage.ISyncLocalStorageService _localStorage
@inject NavigationManager Navigation

<PageTitle>Download Stats</PageTitle>

Expand Down Expand Up @@ -136,7 +137,7 @@

backendBaseUrl = await _backendConnectionService.GetBackendBaseUrlAsync();
hubConnection = new HubConnectionBuilder()
.WithUrl($"{backendBaseUrl}lancachehub")
.WithUrl(Navigation.ToAbsoluteUri($"{backendBaseUrl}lancachehub"))
.Build();

hubConnection.On("UpdateDownloadEvents", async () =>
Expand Down
3 changes: 2 additions & 1 deletion DeveLanCacheUI_Frontend/Pages/LatestDownload.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@inject HttpClient Http
@inject BackendConnectionService _backendConnectionService
@inject Blazored.LocalStorage.ISyncLocalStorageService _localStorage
@inject NavigationManager Navigation

<PageTitle>Latest Downloads</PageTitle>

Expand Down Expand Up @@ -141,7 +142,7 @@

backendBaseUrl = await _backendConnectionService.GetBackendBaseUrlAsync();
hubConnection = new HubConnectionBuilder()
.WithUrl($"{backendBaseUrl}lancachehub")
.WithUrl(Navigation.ToAbsoluteUri($"{backendBaseUrl}lancachehub"))
.Build();

hubConnection.On("UpdateDownloadEvents", async () =>
Expand Down
3 changes: 2 additions & 1 deletion DeveLanCacheUI_Frontend/Pages/SteamLatestDownloads.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
@inject HttpClient Http
@inject BackendConnectionService _backendConnectionService
@inject Blazored.LocalStorage.ISyncLocalStorageService _localStorage
@inject NavigationManager Navigation

<PageTitle>Steam Latest Downloads</PageTitle>

Expand Down Expand Up @@ -159,7 +160,7 @@

backendBaseUrl = await _backendConnectionService.GetBackendBaseUrlAsync();
hubConnection = new HubConnectionBuilder()
.WithUrl($"{backendBaseUrl}lancachehub")
.WithUrl(Navigation.ToAbsoluteUri($"{backendBaseUrl}lancachehub"))
.Build();

hubConnection.On("UpdateDownloadEvents", async () =>
Expand Down
18 changes: 15 additions & 3 deletions DeveLanCacheUI_Frontend/Shared/NavMenu.razor
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,21 @@

private async Task<StatusModel> GetBackendVersion()
{
var statusUrl = await _backendConnectionService.CreateBackendUrlAsync("Status");
var status = await Http.GetFromJsonAsync<StatusModel>(statusUrl);
return status;
try
{
var statusUrl = await _backendConnectionService.CreateBackendUrlAsync("Status");
var status = await Http.GetFromJsonAsync<StatusModel>(statusUrl);
return status;

Check warning on line 131 in DeveLanCacheUI_Frontend/Shared/NavMenu.razor

View workflow job for this annotation

GitHub Actions / build_windows

Possible null reference return.

Check warning on line 131 in DeveLanCacheUI_Frontend/Shared/NavMenu.razor

View workflow job for this annotation

GitHub Actions / build_linux

Possible null reference return.
}
catch (Exception ex)

Check warning on line 133 in DeveLanCacheUI_Frontend/Shared/NavMenu.razor

View workflow job for this annotation

GitHub Actions / build_windows

The variable 'ex' is declared but never used

Check warning on line 133 in DeveLanCacheUI_Frontend/Shared/NavMenu.razor

View workflow job for this annotation

GitHub Actions / build_linux

The variable 'ex' is declared but never used
{
return new StatusModel()
{
Version = "???",
DepotVersion = "???",
UpTime = "0"
};
}
}

public class StatusModel
Expand Down

0 comments on commit ab77e7a

Please sign in to comment.