From 4c33d1d10736581185ba60e37fa3d8c82794e212 Mon Sep 17 00:00:00 2001 From: dangershony Date: Wed, 18 Dec 2024 23:43:22 +0000 Subject: [PATCH] Put a limit to founder if amount was not reached --- src/Angor/Client/Pages/Spend.razor | 310 +++++++++++++++-------------- src/Angor/Client/Pages/View.razor | 5 +- 2 files changed, 168 insertions(+), 147 deletions(-) diff --git a/src/Angor/Client/Pages/Spend.razor b/src/Angor/Client/Pages/Spend.razor index d33848c0..2c730ad5 100644 --- a/src/Angor/Client/Pages/Spend.razor +++ b/src/Angor/Client/Pages/Spend.razor @@ -64,184 +64,191 @@ +@if (firstTimeRefreshSpinner && refreshSpinner) +{ +
+
+
+} - @if (firstTimeRefreshSpinner && refreshSpinner) - { -
-
-
- } - +@if (!targetInvestmentReached && projectDateStarted) +{ + +} - @foreach (var stage in stageDatas) - { - bool stageisActive = stage.Stage.ReleaseDate < DateTime.UtcNow; - var investedCount = stage.Items.Count(c => c.IsSpent == false); - var investedAmount = stage.Items.Where(c => c.IsSpent == false).Sum(c => c.Amount); - bool noCoinsToClaim = investedCount == 0 || stage.StageSpinner == true; +@foreach (var stage in stageDatas) +{ + bool stageisActive = stage.Stage.ReleaseDate < DateTime.UtcNow; + var investedCount = stage.Items.Count(c => c.IsSpent == false); + var investedAmount = stage.Items.Where(c => c.IsSpent == false).Sum(c => c.Amount); + bool noCoinsToClaim = investedCount == 0 || stage.StageSpinner == true; -
-
-
-
Stage @stage.StageIndex (@stage.Stage.AmountToRelease %) - @investedAmount @network.CoinTicker (@investedCount trx)
- @if (stageisActive) - { +
+
+
+
Stage @stage.StageIndex (@stage.Stage.AmountToRelease %) - @investedAmount @network.CoinTicker (@investedCount trx)
+ @if (stageisActive) + { - - } - else - { - - } + } + + } + else + { + + } -
-

Estimated completion time: @stage.Stage.ReleaseDate.ToString("dd/MM/yyyy")

+
+

Estimated completion time: @stage.Stage.ReleaseDate.ToString("dd/MM/yyyy")

- + - @if (stage.StageIndex == expandedStageId) - { -
- @foreach (var transaction in stage.Items) - { - bool isTicked = IsUtxoSelected(transaction.Trxid, transaction.Outputindex); - string statusClass = transaction.IsSpent ? "bg-warning text-dark" : "bg-success text-light"; - string statusText = transaction.IsSpent ? "Spent" : "Unspent"; - -
- - -
- } + @if (stage.StageIndex == expandedStageId) + { +
+ @foreach (var transaction in stage.Items) + { + bool isTicked = IsUtxoSelected(transaction.Trxid, transaction.Outputindex); + string statusClass = transaction.IsSpent ? "bg-warning text-dark" : "bg-success text-light"; + string statusText = transaction.IsSpent ? "Spent" : "Unspent"; + +
+ + +
+ } -
- } -
+
+ }
- } +
+} - @if (showCreateModal) - { - -