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

New UI #254

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
ae6550d
Refactor Browse and NavMenu components for improved layout and styling
miladsoft Jan 23, 2025
512bbbb
Add gap utility class to project grid for improved spacing
miladsoft Jan 24, 2025
af8865d
Update NavMenu styles and add custom margin utility class
miladsoft Jan 24, 2025
b78092d
Refactor Invest page to simplify transaction info section markup
miladsoft Jan 26, 2025
0f0f361
Refactor Spend page layout for improved animation and spacing
miladsoft Jan 26, 2025
a8931c3
Update Spend and View pages for improved styling and functionality
miladsoft Jan 29, 2025
f71b2ef
Replace 'remove' icons with 'delete' icons and update action button s…
miladsoft Jan 30, 2025
d785fba
Add new SVG icon for improved visual representation
miladsoft Jan 30, 2025
883eee5
Refactor layout of the create page for improved user experience and r…
miladsoft Jan 30, 2025
00825ac
Merge branch 'main' into NewUI
miladsoft Feb 8, 2025
c8c690b
Merge branch 'main' into NewUI
miladsoft Feb 8, 2025
6d29f20
Merge branch 'main' into NewUI
miladsoft Feb 8, 2025
d099337
Update Create.razor
miladsoft Feb 8, 2025
03618c8
Merge branch 'NewUI' of https://github.com/block-core/angor into NewUI
miladsoft Feb 8, 2025
539ed2e
Merge branch 'main' into New-UI
miladsoft Feb 8, 2025
4420f72
Enhance wallet verification flow with skip option and improved button…
miladsoft Feb 8, 2025
2b73b80
Add responsive styles for table
miladsoft Feb 8, 2025
ec32226
Update Signatures page
miladsoft Feb 8, 2025
6c8792d
Add approved and pending SVG icons
miladsoft Feb 8, 2025
d6d2fb2
Refactor layout styles for Signatures and Spend pages to improve resp…
miladsoft Feb 9, 2025
6ee6ebd
Add action button to open in Angor HUB on View page
miladsoft Feb 9, 2025
9fb7c82
Refactor Invest page layout for improved readability and consistency
miladsoft Feb 9, 2025
3c41bd6
Refactor layout styles for improved responsiveness and visual consist…
miladsoft Feb 9, 2025
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
6 changes: 3 additions & 3 deletions src/Angor/Client/Pages/Browse.razor
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ else
}
else
{
<div class="project-wrapper g-4">
<div class="project-wrapper">
@foreach (var indexerData in projects.OrderByDescending(project => project.CreatedOnBlock))
{

<div class="card project-card slide-in hover-effect">
<div class="row g-0">
<div class="card project-card slide-in hover-effect mx-2 mb-4">
<div class="row">
<div class="col-md-4 position-relative card-zoom">
<div class="banner-container-list">
@if (!nostrSearchInProgress && SessionStorage.IsProjectInStorageById(indexerData.ProjectIdentifier))
Expand Down
966 changes: 619 additions & 347 deletions src/Angor/Client/Pages/Create.razor

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Angor/Client/Pages/Founder.razor
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

@if (founderProjects.Count > 0)
{
<div class="row row-cols-1 row-cols-sm-1 row-cols-md-2 row-cols-lg-3 project-wrapper" data-cy="project-grid">
<div class="row row-cols-1 row-cols-sm-1 row-cols-md-2 row-cols-lg-3 project-wrapper g-4" data-cy="project-grid">
@foreach (var project in founderProjects)
{
<FounderProjectItem FounderProject="@project"></FounderProjectItem>
Expand Down
49 changes: 25 additions & 24 deletions src/Angor/Client/Pages/Invest.razor
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@


<InputNumber class="form-control" id="investmentAmount" @bind-Value="@Investment.InvestmentAmountBtc"
@oninput="UpdateStagesBreakdown" />
@oninput="UpdateStagesBreakdown" />


<span role="button" class="btn btn-border d-flex align-items-center justify-content-center">
Expand All @@ -213,9 +213,9 @@
<div class="form-group mb-4">
<label for="investmentSlider" class="form-label mb-4">Select Investment Amount</label>
<input type="range" class="form-range custom-range" id="investmentSlider"
min="0.001" max="@project.ProjectInfo.TargetAmount" step="0.001"
@bind="Investment.InvestmentAmountBtc"
@oninput="UpdateStagesBreakdown" />
min="0.001" max="@project.ProjectInfo.TargetAmount" step="0.001"
@bind="Investment.InvestmentAmountBtc"
@oninput="UpdateStagesBreakdown" />
<div class="d-flex justify-content-between">
<small>0.001 @network.CoinTicker</small>
<small>@project.ProjectInfo.TargetAmount @network.CoinTicker</small>
Expand Down Expand Up @@ -287,7 +287,7 @@
</div>

<div class="modal-body modal-body-scroll py-4">
<div class="transaction-info-section mb-4">
<div class="mb-4">
<div class="project-id-card mb-3">
<div class="d-flex align-items-center">
<Icon IconName="project" Height="24" Width="24" class="me-2" />
Expand Down Expand Up @@ -333,12 +333,12 @@
</h6>
<div class="fee-slider-container">
<input type="range"
class="form-range custom-range"
id="feeRange"
@bind="feeData.FeePosition"
@oninput="FeeRangeChanged"
min="@feeData.FeeMin"
max="@feeData.FeeMax">
class="form-range custom-range"
id="feeRange"
@bind="feeData.FeePosition"
@oninput="FeeRangeChanged"
min="@feeData.FeeMin"
max="@feeData.FeeMax">
<div class="fee-info">
<small class="text-muted">
Estimated confirmation in @feeData.SelectedFeeEstimation.Confirmations blocks
Expand All @@ -358,21 +358,22 @@
int index = 0;
@foreach (var stage in project.ProjectInfo.Stages)
{
<div class="info-card mb-2 animate-fade-in">
<div class="info-card mb-3 p-3 shadow-sm rounded animate-fade-in">
<div class="d-flex justify-content-between align-items-center">
<div>
<div class="info-label">Stage @(++index)</div>
<div class="info-value">@StagesBreakdown[index - 1].Amount @network.CoinTicker</div>
<div class="text-muted fw-semibold">Stage @(++index)</div>
<div class="fs-5 fw-bold text-dark">@StagesBreakdown[index - 1].Amount @network.CoinTicker</div>
</div>
<div class="text-end">
<div class="info-label">Release Date</div>
<div class="info-value">@stage.ReleaseDate.ToString("dd/MM/yyyy")</div>
<div class="text-muted fw-semibold">Release Date</div>
<div class="fs-5 fw-bold text-dark">@stage.ReleaseDate.ToString("dd/MM/yyyy")</div>
</div>
</div>
<div class="text-muted small mt-2">
@stage.AmountToRelease% of investment - @((stage.ReleaseDate - project.ProjectInfo.StartDate).Days) days after start
</div>
</div>

}
}
</div>
Expand Down Expand Up @@ -704,8 +705,8 @@ else
if (Investment.IsSeeder)
{
bool isTestnet = network.NetworkType == NetworkType.Testnet;
long maxInvestmentAmount = isTestnet ? long.MaxValue : Money.Satoshis(0.1m) ; // 0.1 BTC for mainnet, unlimited for testnet
long minInvestmentAmount = Money.Satoshis(0.001m) ; // Minimum investment for all networks
long maxInvestmentAmount = isTestnet ? long.MaxValue : Money.Satoshis(0.1m); // 0.1 BTC for mainnet, unlimited for testnet
long minInvestmentAmount = Money.Satoshis(0.001m); // Minimum investment for all networks
if (Investment.InvestmentAmount < minInvestmentAmount)
{
notificationComponent.ShowErrorMessage($"Seeder minimum investment amount of {minInvestmentAmount} BTC was not reached");
Expand Down Expand Up @@ -1029,9 +1030,9 @@ else
Investments investments = new()
{
ProjectIdentifiers = storage.GetInvestmentProjects()
.Where(x => x.InvestedInProject())
.Select(x => new InvestmentState { ProjectIdentifier = x.ProjectInfo.ProjectIdentifier, investorPubKey = x.InvestorPublicKey, InvestmentTransactionHash = x.TransactionId })
.ToList()
.Where(x => x.InvestedInProject())
.Select(x => new InvestmentState { ProjectIdentifier = x.ProjectInfo.ProjectIdentifier, investorPubKey = x.InvestorPublicKey, InvestmentTransactionHash = x.TransactionId })
.ToList()
};

var encryptedProjectIdList = await encryption.EncryptNostrContentAsync(
Expand All @@ -1055,10 +1056,10 @@ else

/// <summary>
/// Amount in BTC, this is a parameter that is bind to the users input,
/// so it makes sense to keep it in btc format (instead of satoshis)
/// so it makes sense to keep it in btc format (instead of satoshis)
/// </summary>
public decimal InvestmentAmountBtc { get; set; }
public decimal InvestmentAmountBtc { get; set; }

public bool IsSeeder { get; set; }
}

Expand Down
8 changes: 4 additions & 4 deletions src/Angor/Client/Pages/Settings.razor
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
</td>
<td class="text-end">
<button class="btn btn-border-danger btn-sm" @onclick="() => RemoveIndexer(indexer.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
<Icon IconName="delete" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -295,7 +295,7 @@
</td>
<td class="text-end">
<button class="btn btn-border-danger btn-sm" @onclick="() => RemoveRelay(relay.Url)">
<Icon IconName="remove" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
<Icon IconName="delete" Height="20" Width="20" Color="var(--angor-primary)"></Icon>
</button>
</td>
</tr>
Expand Down Expand Up @@ -348,15 +348,15 @@
<div class="d-flex align-items-center justify-content-between">
<div class="d-flex align-items-center">
<div class="settings-icon-wrapper">
<Icon IconName="remove" Height="42" Width="42" />
<Icon IconName="delete" Height="42" Width="42" />
</div>
<div class="ms-3">
<h5 class="mb-0 text-danger">Danger Zone</h5>
<p class="text-muted mb-0">Irreversible actions</p>
</div>
</div>
<button class="btn btn-border-danger" @onclick="() => showWipeallModal = true">
<Icon IconName="remove" Height="24" Width="24" />
<Icon IconName="delete" Height="24" Width="24" />
<span class="ms-2 d-none d-md-inline">Wipe Data</span>
</button>
</div>
Expand Down
Loading