diff --git a/README.md b/README.md index 582c5038..ae606a3c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ +

- Angor + Angor

+

Bitcoin Crowdfunding Platform

diff --git a/package.json b/package.json index 26f945e9..ae8d76bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angor", - "version": "0.0.59", + "version": "0.0.63", "license": "MIT", "scripts": { "version": "node -p \"require('./package.json').version\"", diff --git a/src/Angor.Test/Angor.Test.csproj b/src/Angor.Test/Angor.Test.csproj index 6da49efa..17a933e7 100644 --- a/src/Angor.Test/Angor.Test.csproj +++ b/src/Angor.Test/Angor.Test.csproj @@ -19,11 +19,11 @@ - + - + - + diff --git a/src/Angor/Client/Angor.Client.csproj b/src/Angor/Client/Angor.Client.csproj index 7a06ccd2..08d6413b 100644 --- a/src/Angor/Client/Angor.Client.csproj +++ b/src/Angor/Client/Angor.Client.csproj @@ -11,11 +11,12 @@ - - + + + diff --git a/src/Angor/Client/Components/BalanceDisplay.razor b/src/Angor/Client/Components/BalanceDisplay.razor new file mode 100644 index 00000000..e77b4998 --- /dev/null +++ b/src/Angor/Client/Components/BalanceDisplay.razor @@ -0,0 +1,42 @@ +@using Angor.Shared +@using Blockcore.Networks +@inject INetworkConfiguration NetworkConfiguration + + +
+ + @BtcBalance @_network.CoinTicker + + @if (ShowFiatInline && PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat)) + { +
@BtcBalanceInFiat
+ } +
+ +@code { + [Parameter] + public decimal BtcBalance { get; set; } + + [Parameter] + public string BtcBalanceInFiat { get; set; } + + [Parameter] + public string PreferredCurrency { get; set; } + + [Parameter] + public bool ShowFiatInline { get; set; } = false; + + private Network _network; + + protected override void OnInitialized() + { + _network = NetworkConfiguration.GetNetwork(); + base.OnInitialized(); + } + + private string GetTooltip() => + PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat) && !ShowFiatInline + ? $"Equivalent: {BtcBalanceInFiat}" + : string.Empty; +} + diff --git a/src/Angor/Client/Components/FounderProjectItem.razor b/src/Angor/Client/Components/FounderProjectItem.razor index 57360b1a..4305146b 100644 --- a/src/Angor/Client/Components/FounderProjectItem.razor +++ b/src/Angor/Client/Components/FounderProjectItem.razor @@ -57,7 +57,7 @@ @if (InvestmentRequests) {
- + diff --git a/src/Angor/Client/Components/Icon.razor b/src/Angor/Client/Components/Icon.razor index 315f6ec3..547a628d 100644 --- a/src/Angor/Client/Components/Icon.razor +++ b/src/Angor/Client/Components/Icon.razor @@ -3,7 +3,7 @@ [Parameter] public string IconName { get; set; } [Parameter] public int Width { get; set; } = 32; [Parameter] public int Height { get; set; } = 32; - [Parameter] public string Color { get; set; } = "var(--bs-primary)"; + [Parameter] public string Color { get; set; } = "var(--angor-primary)"; private string svgContent; protected override async Task OnParametersSetAsync() diff --git a/src/Angor/Client/Pages/Browse.razor b/src/Angor/Client/Pages/Browse.razor index 900e35cc..4683095a 100644 --- a/src/Angor/Client/Pages/Browse.razor +++ b/src/Angor/Client/Pages/Browse.razor @@ -66,7 +66,7 @@
- + No projects found.
diff --git a/src/Angor/Client/Pages/Founder.razor b/src/Angor/Client/Pages/Founder.razor index 308e9aa4..87f5521e 100644 --- a/src/Angor/Client/Pages/Founder.razor +++ b/src/Angor/Client/Pages/Founder.razor @@ -53,7 +53,7 @@
- + No projects found.
diff --git a/src/Angor/Client/Pages/Index.razor b/src/Angor/Client/Pages/Index.razor index 525a5652..8d85748d 100644 --- a/src/Angor/Client/Pages/Index.razor +++ b/src/Angor/Client/Pages/Index.razor @@ -1,5 +1,4 @@ @page "/" - Angor
@@ -20,10 +19,8 @@
Welcome to Angor
-

Stay in control of your investments with Angor

+

Stay in control of your investments with Angor

- - diff --git a/src/Angor/Client/Pages/Invest.razor b/src/Angor/Client/Pages/Invest.razor index 4df12406..e41d0ea9 100644 --- a/src/Angor/Client/Pages/Invest.razor +++ b/src/Angor/Client/Pages/Invest.razor @@ -67,7 +67,7 @@
- + You already invested. @@ -84,7 +84,7 @@
- + You are the founder. @@ -101,7 +101,7 @@
- + The project was not found. @@ -180,7 +180,9 @@ @if (showCreateModal) { - +
+
+ @foreach (var project in projects) + { + Stats.TryGetValue(project.ProjectInfo.ProjectIdentifier, out var stats); + var nostrPubKey = project.ProjectInfo.NostrPubKey; + investmentRequestsMap.TryGetValue(nostrPubKey, out bool hasInvestmentRequests); + +
+ + + + + + - -
-
- - - - - - - - - - - - - - - - - - @foreach (var project in projects) - { - Stats.TryGetValue(project.ProjectInfo.ProjectIdentifier, out var stats); - var nostrPubKey = project.ProjectInfo.NostrPubKey; - investmentRequestsMap.TryGetValue(nostrPubKey, out bool hasInvestmentRequests); - - - - - - - - - - - - - - } - -
NameFunding Target (@network.CoinTicker)Raised (@network.CoinTicker)Raised (% Target)Project StatusMy Investment (@network.CoinTicker)Spent by FounderAvailable to FounderIn RecoveryFounder Approval
- @project.Metadata?.Name - @project.ProjectInfo.TargetAmount @network.CoinTicker@Money.Satoshis(stats?.AmountInvested ?? 0).ToUnit(MoneyUnit.BTC) @network.CoinTicker@((stats?.AmountInvested ?? 0) * 100 / Money.Coins(project.ProjectInfo.TargetAmount).Satoshi) % - @if (project.ProjectInfo.StartDate < DateTime.UtcNow) - { - Funding - } - else - { - Live - } - - @Money.Satoshis(project.AmountInvested ?? 0).ToUnit(MoneyUnit.BTC) @network.CoinTicker - @if (!project.SignaturesInfo?.Signatures.Any() ?? false) - { - - } - --@Money.Satoshis(project.AmountInRecovery ?? 0).ToUnit(MoneyUnit.BTC) @network.CoinTicker - @if (hasInvestmentRequests) - { - Approved - } - else - { - Pending - } -
-
- + }
+ +
diff --git a/src/Angor/Client/Pages/Penalties.razor b/src/Angor/Client/Pages/Penalties.razor index 91d3ce31..403e92bd 100644 --- a/src/Angor/Client/Pages/Penalties.razor +++ b/src/Angor/Client/Pages/Penalties.razor @@ -55,7 +55,7 @@
- + No penalties found
diff --git a/src/Angor/Client/Pages/Recover.razor b/src/Angor/Client/Pages/Recover.razor index fb5ee256..feaf71d9 100644 --- a/src/Angor/Client/Pages/Recover.razor +++ b/src/Angor/Client/Pages/Recover.razor @@ -51,278 +51,283 @@
-
- - - -

- Transaction ID: @StageInfo.Trxid | - View on explorer -

- -

Total funds to recover = @StageInfo.TotalSpendable @network.CoinTicker

- - @if (trxNotFound) - { -

Transaction was not found it may still be confirming

- } +
- @if (firstTimeRefreshSpinner && refreshSpinner) - { -
-
-
- } - else - { -
-
- @if (!refreshSpinner) - { - @if (StageInfo.CanRelease) - { -

Total funds in penalty = @StageInfo.TotalInPenalty @network.CoinTicker

- } +
- @if (StageInfo.CanRecover && !StageInfo.EndOfProject) - { - - } - @if (StageInfo.CanRelease) - { - - } +

+ Transaction ID: @StageInfo.Trxid | + View on explorer +

- @if (StageInfo.EndOfProject && StageInfo.TotalSpendable > 0) - { - - } - } -
+

Total funds to recover = @StageInfo.TotalSpendable @network.CoinTicker

-
- + } + + @if (StageInfo.CanRelease) + { + + } + + @if (StageInfo.EndOfProject && StageInfo.TotalSpendable > 0) + { + + } } - -
-
- } - -
-
- - - - - - - - - - - @foreach (var item in StageInfo.Items) - { - - - - - - } - -
Stage AmountStatus
@(item.StageIndex + 1)@item.Amount @network.CoinTicker - @if (item.IsSpent) + + +
+
+ +
+
+ } - @if (showRecoveryModal) - { -