Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean codes #160

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Angor.Test/Angor.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.7.0" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.8" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.JSInterop" Version="8.0.10" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="Moq" Version="4.20.72" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit" Version="2.9.2" />

<PackageReference Include="Blockcore.Core" Version="1.1.41" />
<PackageReference Include="NBitcoin" Version="7.0.25" />
Expand Down
6 changes: 3 additions & 3 deletions src/Angor/Client/Angor.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<PackageReference Include="Blockcore.Core" Version="1.1.41" />
<PackageReference Include="NBitcoin" Version="7.0.25" />
<PackageReference Include="Nostr.Client" Version="2.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.8" PrivateAssets="all" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Browse.razor
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white" data-cy="projectsGrid">No projects found.</span>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Founder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">No projects found.</span>
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/Angor/Client/Pages/Invest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">
You already invested.
Expand All @@ -84,7 +84,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">
You are the founder.
Expand All @@ -101,7 +101,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">
The project was not found.
Expand Down
4 changes: 2 additions & 2 deletions src/Angor/Client/Pages/Penalties.razor
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">No penalties found</span>
</div>
Expand Down Expand Up @@ -99,7 +99,7 @@ else
{
if (penalty.IsReleased)
{
<button disabled class="btn btn-secondary">Penalty Released</button>
<button disabled class="btn btn-border">Penalty Released</button>
}
else
{
Expand Down
8 changes: 4 additions & 4 deletions src/Angor/Client/Pages/Recover.razor
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@

@if (StageInfo.CanRelease)
{
<button class="btn btn-secondary me-2" @onclick="PrepareToReleaseCoinsCheckPassword" disabled="@PrepareToReleaseCoinsModalSpinner">
<button class="btn btn-border me-2" @onclick="PrepareToReleaseCoinsCheckPassword" disabled="@PrepareToReleaseCoinsModalSpinner">
@if (PrepareToReleaseCoinsModalSpinner)
{
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
Expand Down Expand Up @@ -215,7 +215,7 @@
<p class="mt-3">Are you sure you want to recover these funds?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @onclick="() => showRecoveryModal = false" disabled="@PrepareToRecoverCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="() => showRecoveryModal = false" disabled="@PrepareToRecoverCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="RecoverCoins" disabled="@PrepareToRecoverCoinsConfirmSpinner">
@if (PrepareToRecoverCoinsConfirmSpinner)
{
Expand Down Expand Up @@ -262,7 +262,7 @@
<p class="mt-3">Are you sure you want to release these funds from the penalty?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @onclick="() => showRecoveryReleaseModal = false" disabled="@PrepareToReleaseCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="() => showRecoveryReleaseModal = false" disabled="@PrepareToReleaseCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="ReleaseCoins" disabled="@PrepareToReleaseCoinsConfirmSpinner">
@if (PrepareToReleaseCoinsConfirmSpinner)
{
Expand Down Expand Up @@ -309,7 +309,7 @@
<p class="mt-3">Are you sure you want to claim these funds?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @onclick="() => showEndOfProjectModal = false" disabled="@PrepareEndOfProjectCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="() => showEndOfProjectModal = false" disabled="@PrepareEndOfProjectCoinsConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="EndOfProjectCoins" disabled="@PrepareEndOfProjectCoinsConfirmSpinner">
@if (PrepareEndOfProjectCoinsConfirmSpinner)
{
Expand Down
14 changes: 7 additions & 7 deletions src/Angor/Client/Pages/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<div>

<button class="btn btn-warning" @onclick="() => showChangeNetworkModal = true">
<Icon IconName="change" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="change" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</button>

@if (showChangeNetworkModal)
Expand Down Expand Up @@ -147,7 +147,7 @@
</div>
<div>
<a class="btn btn-success" href="@_networkConfiguration.GetDefaultExplorerUrl().First().Url" target="_blank">
<Icon IconName="link" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="link" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</a>
</div>
</div>
Expand All @@ -173,7 +173,7 @@
</div>
<button class="btn btn-success" @onclick="Refresh" disabled="@refreshSpinner">
<span role="status" aria-hidden="true" class="@(refreshSpinner ? "rotate-icon" : "")">
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</span>
</button>
</div>
Expand Down Expand Up @@ -217,7 +217,7 @@
</td>
<td class="text-end">
<button class="btn btn-danger btn-sm" @onclick="() => RemoveIndexer(indexer.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -245,7 +245,7 @@
</div>
<button class="btn btn-success" @onclick="Refresh" disabled="@refreshSpinner">
<span role="status" aria-hidden="true" class="@(refreshSpinner ? "rotate-icon" : "")">
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="refresh" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</span>
</button>
</div>
Expand Down Expand Up @@ -293,7 +293,7 @@
</td>
<td class="text-end">
<button class="btn btn-danger btn-sm" @onclick="() => RemoveRelay(relay.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -359,7 +359,7 @@
</div>
<div>
<button class="btn btn-danger" @onclick="() => showWipeallModal = true">
<Icon IconName="remove" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="remove" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</button>
@if (showWipeallModal)
{
Expand Down
4 changes: 2 additions & 2 deletions src/Angor/Client/Pages/Signatures.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white" data-cy="projectsGrid">No pending signatures yet...</span>
</div>
Expand Down Expand Up @@ -95,7 +95,7 @@
</div>
<div class="col-6 d-flex justify-content-end">
<button class="btn btn-sm @(ApproveButtonClass)" @onclick="ApproveAllSignatures" disabled="@ApproveButtonDisabled">Approve All</button>
<button class="btn btn-sm btn-secondary ml-2" @onclick="RefreshSignaturesInternal" disabled="@refreshButtonSpinner">
<button class="btn btn-sm btn-border ml-2" @onclick="RefreshSignaturesInternal" disabled="@refreshButtonSpinner">
@if (refreshButtonSpinner)
{
<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>
Expand Down
12 changes: 6 additions & 6 deletions src/Angor/Client/Pages/View.razor
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)" />
</span>
<span class="text-white">@error</span>
</div>
Expand Down Expand Up @@ -270,8 +270,8 @@

<div class="mb-3">
<!-- Buttons Spend Funds and Approve Signature next to each other -->
<NavLink href=@($"/spend/{project.ProjectInfo.ProjectIdentifier}") class="btn btn-secondary text-white me-2">Spend Funds</NavLink>
<NavLink href=@($"/signatures/{project.ProjectInfo.ProjectIdentifier}") class="btn btn-border">Approve signature</NavLink>
<a href=@($"/spend/{project.ProjectInfo.ProjectIdentifier}") class="btn btn-border text-white me-2">Spend Funds</a>
<a href=@($"/signatures/{project.ProjectInfo.ProjectIdentifier}") class="btn btn-border">Approve signature</a>
</div>
</div>
}
Expand All @@ -285,7 +285,7 @@
<a href="@myProjectExplorerLink" target="_blank">Track your transaction on the explorer.</a>
</p>

<button class="btn btn-danger mb-3" @onclick="RecoverFunds">Recover</button>
<button class="btn btn-border mb-3" @onclick="RecoverFunds">Recover</button>
</div>
}
else
Expand All @@ -295,7 +295,7 @@
<p class="mt-4">
Seize the opportunity to invest in this project.
</p>
<button class="btn btn-secondary mb-3" data-cy="INVEST_BUTTON"
<button class="btn btn-border mb-3" data-cy="INVEST_BUTTON"
@onclick="InvestInProject"
disabled="@(projectStats.TimeLeft == 0 ? "disabled" : null)"
title="@(projectStats.TimeLeft == 0 ? "The investing period is over" : null)">
Expand Down Expand Up @@ -353,7 +353,7 @@

@if (founder)
{
<button @onclick="ShowNsecAsync" class="btn btn-success mt-4">Show private key</button>
<button @onclick="ShowNsecAsync" class="btn btn-border mt-4">Show private key</button>

@if (isGeneratingNsec)
{
Expand Down
10 changes: 5 additions & 5 deletions src/Angor/Client/Pages/Wallet.razor
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="card card-body angor-alert-info pt-2 pb-2">
<div class="d-flex align-items-center align-items-center">
<span class="me-3 user-select-none">
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary-btn-icon)"/>
<Icon IconName="info" Width="40" Height="40" Color="var(--angor-primary)"/>
</span>
<span class="text-white">No Wallet Found</span>
</div>
Expand Down Expand Up @@ -115,10 +115,10 @@
@if (isNewWallet)
{
<div class="mb-2">
<button class="btn btn-secondary w-100" @onclick="GenerateNewWalletWords">
<button class="btn btn-border w-100" @onclick="GenerateNewWalletWords">
<div class="d-flex align-items-center justify-content-center">
<span class="me-1" data-cy="generate-wallet-words">
<Icon IconName="plus" Height="24" Width="24" Color="var(--angor-primary-btn-icon)"></Icon>
<Icon IconName="plus" Height="24" Width="24" Color="var(--angor-primary)"></Icon>
</span>
<span> Generate New Wallet Words</span>
</div>
Expand Down Expand Up @@ -225,7 +225,7 @@ else
@if (network.NetworkType != NetworkType.Mainnet && (accountBalanceInfo.TotalUnconfirmedBalance <= 0) & (accountBalanceInfo.TotalBalance <= 0))
{
<div class="d-flex flex-wrap align-items-center">
<button class="btn btn-secondary ms-2" data-cy="get-test-coins" @onclick="GetTestCoins" disabled="@testCoinsSpinner">
<button class="btn btn-border ms-2" data-cy="get-test-coins" @onclick="GetTestCoins" disabled="@testCoinsSpinner">
@if (testCoinsSpinner)
{
<span class="spinner-border spinner-border-sm opacity-10 btn-angor btn-content" role="status" aria-hidden="true"></span>
Expand Down Expand Up @@ -537,7 +537,7 @@ else

</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @onclick="() => sendConfirmModal = false" disabled="@sendConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="() => sendConfirmModal = false" disabled="@sendConfirmSpinner">Cancel</button>
<button type="button" class="btn btn-border" @onclick="SendCoins" disabled="@sendConfirmSpinner">
@if (sendConfirmSpinner)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Angor/Client/Shared/NotificationComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
Error
</h5>
<span type="button" @onclick="ClearErrorMessage">
<Icon IconName="close-circle" Color="var(--angor-primary-btn-icon)" />
<Icon IconName="close-circle" Color="var(--angor-primary)" />
</span>
</div>
<div class="modal-body modal-body-scroll">
Expand Down
Loading
Loading