Skip to content

Commit

Permalink
Removed some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Nov 14, 2024
1 parent cc5ea17 commit c0609c4
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 303 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,6 @@
</BitButton>
<BitImage Alt="bitplatform GitHub stars"
Src="https://img.shields.io/github/stars/bitfoundation/bitplatform?style=social&label=Github%20%E2%9C%A8" />
<BitAccordion Title="Statistics">
<BitPivot Styles="@(new() { Body = "max-height:300px;overflow:auto" })">
<BitPivotItem HeaderText="GitHub">
@if (isGitHubLoading)
{
<BitRippleLoading />
}
else
{
<pre>@gitHubStatsString</pre>
}
</BitPivotItem>
<BitPivotItem HeaderText="Nuget">
@if (isNugetLoading)
{
<BitRippleLoading />
}
else
{
<pre>@nugetStatsString</pre>
}
</BitPivotItem>
</BitPivot>
</BitAccordion>
<br />

<BitCard FullWidth Style="padding:4rem">
Expand Down

This file was deleted.

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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@ public partial class AuthDelegatingHandler(IJSRuntime jsRuntime,

protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
{
var serverAddress = configuration.GetServerAddress();
var isRefreshTokenRequest = request.RequestUri?.LocalPath?.Contains(IIdentityController.RefreshUri, StringComparison.InvariantCultureIgnoreCase) is true;

try
{
if (request.RequestUri?.AbsoluteUri.Contains(serverAddress) is true &&
request.Headers.Authorization is null &&
if (request.Headers.Authorization is null &&
isRefreshTokenRequest is false)
{
var access_token = await tokenProvider.GetAccessToken();
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
//#endif
//#if (notification == true)
using Boilerplate.Shared.Dtos.PushNotification;
using Boilerplate.Shared.Dtos.Home;
//#endif

namespace Boilerplate.Shared.Dtos;
Expand All @@ -20,7 +19,6 @@ namespace Boilerplate.Shared.Dtos;
[JsonSerializable(typeof(Dictionary<string, JsonElement>))]
[JsonSerializable(typeof(string[]))]
[JsonSerializable(typeof(RestErrorInfo))]
[JsonSerializable(typeof(NugetStatsDto))]
//#if (notification == true)
[JsonSerializable(typeof(DeviceInstallationDto))]
//#endif
Expand Down

This file was deleted.

0 comments on commit c0609c4

Please sign in to comment.