Skip to content

Commit

Permalink
added About section
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetMichal committed Dec 8, 2023
1 parent 133795c commit fd1dc9c
Show file tree
Hide file tree
Showing 28 changed files with 2,789 additions and 2,332 deletions.
5 changes: 3 additions & 2 deletions DeBankUI/Components/BaseChartComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
using Microsoft.AspNetCore.Components;
using LiveChartsCore.SkiaSharpView.Painting;
using DeBankUI.Utils;
using LiveChartsCore.Kernel.Sketches;

namespace DeBankUI.Components
{
public abstract class BaseChartComponent : ComponentBase
{
public ISeries[] Series { get; set; }

Check warning on line 12 in DeBankUI/Components/BaseChartComponent.cs

View workflow job for this annotation

GitHub Actions / deploy-to-github-pages

Non-nullable property 'Series' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public Axis[] YAxes { get; set; }
public Axis[] XAxes { get; set; }
public ICartesianAxis[] YAxes { get; set; }

Check warning on line 13 in DeBankUI/Components/BaseChartComponent.cs

View workflow job for this annotation

GitHub Actions / deploy-to-github-pages

Non-nullable property 'YAxes' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.
public ICartesianAxis[] XAxes { get; set; }

Check warning on line 14 in DeBankUI/Components/BaseChartComponent.cs

View workflow job for this annotation

GitHub Actions / deploy-to-github-pages

Non-nullable property 'XAxes' must contain a non-null value when exiting constructor. Consider declaring the property as nullable.

public DrawMarginFrame DrawMarginFrame => new()
{
Expand Down
2,165 changes: 2,165 additions & 0 deletions DeBankUI/Data/MichalData.cs

Large diffs are not rendered by default.

108 changes: 0 additions & 108 deletions DeBankUI/Data/RegistrationsData.cs

This file was deleted.

30 changes: 26 additions & 4 deletions DeBankUI/Pages/Michal/DeBankUsersPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,44 @@


<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="6">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
<CardHeaderContent>
<MudStack Justify="Justify.SpaceAround" Row=true>
<MudText Typo="Typo.h6">Web3 ID minters and L2 registrations</MudText>
<MudText Typo="Typo.h6">Web3 ID minters</MudText>
</MudStack>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent style="height:600px">
<Web3RegistrationsChart @ref="web3RegistrationsChart">
<Web3IdMintersChart @ref="web3RegistrationsChart">

</Web3RegistrationsChart>
</Web3IdMintersChart>
</MudCardContent>
<MudCardActions>
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Class="rounded-0" Variant="Variant.Outlined" OnClick="@(async () => await DownloadChartData(web3RegistrationsChart, "Web3RegistrationsChart.csv"))" Color="Color.Primary">Get data</MudButton>
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Class="rounded-0" Variant="Variant.Outlined" OnClick="@(async () => await DownloadChartData(web3RegistrationsChart, "Web3IdMIntersChart.csv"))" Color="Color.Primary">Get data</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
<MudItem xs="6">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
<CardHeaderContent>
<MudStack Justify="Justify.SpaceAround" Row=true>
<MudText Typo="Typo.h6">L2 registrations</MudText>
</MudStack>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent style="height:600px">
<L2RegistrationsChart @ref="l2RegistrationsChart">

</L2RegistrationsChart>
</MudCardContent>
<MudCardActions>
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Class="rounded-0" Variant="Variant.Outlined" OnClick="@(async () => await DownloadChartData(web3RegistrationsChart, "L2RegistrationsChart.csv"))" Color="Color.Primary">Get data</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
Expand Down
3 changes: 2 additions & 1 deletion DeBankUI/Pages/Michal/DeBankUsersPage.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public partial class DeBankUsersPage
[Inject]
public IBlazorDownloadFileService BlazorDownloadFileService { get; set; }

private Web3RegistrationsChart web3RegistrationsChart;
private Web3IdMintersChart web3RegistrationsChart;
private L2RegistrationsChart l2RegistrationsChart;
private OfficialProfileRegistrationsChart officialProfileRegistrationsChart;

public async Task DownloadChartData(BaseChartComponent baseComponent, string title)
Expand Down
4 changes: 4 additions & 0 deletions DeBankUI/Pages/Michal/LuckyDrawsPage.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@using DeBankUI.Components;
@using DeBankUI.Shared.Michal
@using LiveChartsCore.SkiaSharpView.Blazor
@page "/michal/lucky-draws"

<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="6">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
Expand Down
30 changes: 30 additions & 0 deletions DeBankUI/Pages/Michal/OtherDataPage.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
@using DeBankUI.Components;
@using DeBankUI.Shared.Michal
@using LiveChartsCore.SkiaSharpView.Blazor
@page "/michal/other-data"


<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="12">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
<CardHeaderContent>
<MudStack Justify="Justify.SpaceAround" Row=true>
<MudText Typo="Typo.h6">DeBank combined data</MudText>
</MudStack>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent style="height:600px">
<CombinedDataChart @ref="combinedDataChart">

</CombinedDataChart>
</MudCardContent>
<MudCardActions>
<MudButton StartIcon="@Icons.Material.Filled.FileDownload" Class="rounded-0" Variant="Variant.Outlined" OnClick="@(async () => await DownloadChartData(combinedDataChart, "CombinedChart.csv"))" Color="Color.Primary">Get data</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
</MudGrid>
29 changes: 29 additions & 0 deletions DeBankUI/Pages/Michal/OtherDataPage.razor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
using LiveChartsCore.Defaults;
using LiveChartsCore.SkiaSharpView;
using LiveChartsCore;
using LiveChartsCore.Kernel.Sketches;
using LiveChartsCore.SkiaSharpView.Painting;
using static MudBlazor.Colors;
using SkiaSharp;
using DeBankUI.Utils;
using DeBankUI.Components;
using Blazor.DownloadFileFast.Interfaces;
using Microsoft.AspNetCore.Components;
using DeBankUI.Shared.Michal;

namespace DeBankUI.Pages.Michal
{
public partial class OtherDataPage
{
[Inject]
public IBlazorDownloadFileService BlazorDownloadFileService { get; set; }

private CombinedDataChart combinedDataChart;

public async Task DownloadChartData(BaseChartComponent baseComponent, string title)
{
var data = baseComponent.DownloadChartData();
await BlazorDownloadFileService.DownloadFileAsync(title, data);
}
}
}
4 changes: 4 additions & 0 deletions DeBankUI/Pages/Michal/RewardPoolsPage.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@using DeBankUI.Components;
@using DeBankUI.Shared.Michal
@using LiveChartsCore.SkiaSharpView.Blazor
@page "/michal/reward-pools"

<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="6">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
Expand Down
4 changes: 4 additions & 0 deletions DeBankUI/Pages/Michal/StreamActivityPage.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@using DeBankUI.Components;
@using DeBankUI.Shared.Michal
@using LiveChartsCore.SkiaSharpView.Blazor
@page "/michal/stream-activity"

<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="6">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
Expand Down
4 changes: 4 additions & 0 deletions DeBankUI/Pages/Michal/TopDepositsPage.razor
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
@using DeBankUI.Components;
@using DeBankUI.Shared.Michal
@using LiveChartsCore.SkiaSharpView.Blazor
@page "/michal/top-deposits"

<MudGrid>
<MudItem xs="12">
<AboutMichal />
</MudItem>
<MudItem xs="12">
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
Expand Down
3 changes: 2 additions & 1 deletion DeBankUI/Shared/MainLayout.razor
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
<MudNavLink Href="michal/reward-pools">Reward Pools</MudNavLink>
<MudNavLink Href="michal/lucky-draws">Lucky Draws</MudNavLink>
<MudNavLink Href="michal/stream-activity">Stream Activity</MudNavLink>
<MudNavLink Href="michal/top-deposits">TOP Deposits</MudNavLink>
<MudNavLink Href="michal/top-deposits">TOP deposits</MudNavLink>
<MudNavLink Href="michal/other-data">Other data</MudNavLink>
</MudNavGroup>
</MudNavMenu>
</MudDrawer>
Expand Down
19 changes: 19 additions & 0 deletions DeBankUI/Shared/Michal/AboutMichal.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<MudCard Outlined Square Style="background: var(--mud-palette-background-grey)">
<MudCardHeader>
<CardHeaderAvatar>
<MudAvatar Size="Size.Large"><MudImage Src="Michal.png"></MudImage></MudAvatar>
</CardHeaderAvatar>
<CardHeaderContent>
<MudText Typo="Typo.h6">Michal</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudText Typo="Typo.body2">Hi, I am Michal! Good to see you there. I hope you like charts and statistics because thats the only thing you can find here. I built this for you so feel free to give me your feedback. You can always DM me or just ping under any of my posts on DeBank</MudText>
</MudCardContent>
<MudCardActions>
<MudStack Spacing="3" Row=true>
<MudButton Class="rounded-0" Variant="Variant.Outlined" Href="https://debank.com/profile/0x33c36dd8ee2fc8b8c106e700f093c7b971eb8a70/stream" Target="_blank" Color="Color.Primary">DeBank Profile</MudButton>
<MudButton Class="rounded-0" Variant="Variant.Outlined" Href="https://github.com/MeetMichal" Target="_blank" Color="Color.Primary">GitHub Profile</MudButton>
</MudStack>
</MudCardActions>
</MudCard>
20 changes: 20 additions & 0 deletions DeBankUI/Shared/Michal/CombinedDataChart.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@using DeBankUI.Components;
@using LiveChartsCore.SkiaSharpView.Blazor
@inherits BaseChartComponent

<MudStack Spacing="3" Row>
<MudCheckBox @bind-Checked="@Series[0].IsVisible" />
<MudCheckBox @bind-Checked="@Series[1].IsVisible" />
<MudCheckBox @bind-Checked="@Series[2].IsVisible" />

</MudStack>

<CartesianChart
TooltipPosition="LiveChartsCore.Measure.TooltipPosition.Hidden"
YAxes="@YAxes"
XAxes="@XAxes"
EasingFunction="null"
DrawMarginFrame="@DrawMarginFrame"
Series="@Series">

</CartesianChart>
Loading

0 comments on commit fd1dc9c

Please sign in to comment.