-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
2 additions
and
303 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
147 changes: 0 additions & 147 deletions
147
...erplate/src/Client/Boilerplate.Client.Core/Components/Pages/HomePage.razor.GitHubStats.cs
This file was deleted.
Oops, something went wrong.
54 changes: 1 addition & 53 deletions
54
...ate/Bit.Boilerplate/src/Client/Boilerplate.Client.Core/Components/Pages/HomePage.razor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,9 @@ | ||
using Boilerplate.Shared.Controllers.Home; | ||
using Boilerplate.Shared.Dtos.Home; | ||
|
||
namespace Boilerplate.Client.Core.Components.Pages; | ||
namespace Boilerplate.Client.Core.Components.Pages; | ||
|
||
public partial class HomePage | ||
{ | ||
protected override string? Title => Localizer[nameof(AppStrings.Home)]; | ||
protected override string? Subtitle => string.Empty; | ||
|
||
|
||
[CascadingParameter] private BitDir? currentDir { get; set; } | ||
|
||
|
||
[AutoInject] private IHomeController homeController = default!; | ||
|
||
|
||
private bool isNugetLoading; | ||
private bool isGitHubLoading; | ||
private NugetStatsDto? nugetStats; | ||
private GitHubStats? gitHubStats; | ||
private string? nugetStatsString; | ||
private string? gitHubStatsString; | ||
|
||
protected override async Task OnInitAsync() | ||
{ | ||
await base.OnInitAsync(); | ||
|
||
await LoadGitHubStats(); | ||
await LoadNugetStats("Bit.BlazorUI"); | ||
} | ||
|
||
|
||
private async Task LoadGitHubStats() | ||
{ | ||
try | ||
{ | ||
isGitHubLoading = true; | ||
gitHubStats = await HttpClient.GetFromJsonAsync<GitHubStats>("https://api.github.com/repos/bitfoundation/bitplatform"); | ||
gitHubStatsString = JsonSerializer.Serialize(gitHubStats, new JsonSerializerOptions { WriteIndented = true }); | ||
} | ||
finally | ||
{ | ||
isGitHubLoading = false; | ||
} | ||
} | ||
|
||
private async Task LoadNugetStats(string packageId) | ||
{ | ||
try | ||
{ | ||
isNugetLoading = true; | ||
nugetStats = await homeController.GetNugetStats(packageId, CurrentCancellationToken); | ||
nugetStatsString = JsonSerializer.Serialize(nugetStats, new JsonSerializerOptions { WriteIndented = true }); | ||
} | ||
finally | ||
{ | ||
isNugetLoading = false; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
...late/Bit.Boilerplate/src/Server/Boilerplate.Server.Api/Controllers/Home/HomeController.cs
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Controllers/Home/IHomeController.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
src/Templates/Boilerplate/Bit.Boilerplate/src/Shared/Dtos/Home/NugetStatsDto.cs
This file was deleted.
Oops, something went wrong.