diff --git a/src/Angor/Client/Components/BalanceDisplay.razor b/src/Angor/Client/Components/BalanceDisplay.razor index e77b4998..474f379c 100644 --- a/src/Angor/Client/Components/BalanceDisplay.razor +++ b/src/Angor/Client/Components/BalanceDisplay.razor @@ -14,17 +14,13 @@ @code { - [Parameter] - public decimal BtcBalance { get; set; } + [Parameter] public decimal BtcBalance { get; set; } - [Parameter] - public string BtcBalanceInFiat { get; set; } + [Parameter] public string BtcBalanceInFiat { get; set; } - [Parameter] - public string PreferredCurrency { get; set; } + [Parameter] public string PreferredCurrency { get; set; } - [Parameter] - public bool ShowFiatInline { get; set; } = false; + [Parameter] public bool ShowFiatInline { get; set; } = false; private Network _network; @@ -34,9 +30,11 @@ base.OnInitialized(); } - private string GetTooltip() => - PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat) && !ShowFiatInline + private string GetTooltip() + { + return PreferredCurrency != "BTC" && !string.IsNullOrEmpty(BtcBalanceInFiat) && !ShowFiatInline ? $"Equivalent: {BtcBalanceInFiat}" : string.Empty; -} + } +} \ No newline at end of file diff --git a/src/Angor/Client/Pages/Create.razor b/src/Angor/Client/Pages/Create.razor index d05ce7e1..835e6708 100644 --- a/src/Angor/Client/Pages/Create.razor +++ b/src/Angor/Client/Pages/Create.razor @@ -1,15 +1,13 @@ @page "/create" -@using Angor.Shared.Models -@using Angor.Shared +@using Angor.Client.Models @using Angor.Client.Storage -@using Blockcore.Consensus.TransactionInfo +@using Angor.Shared +@using Angor.Shared.Models @using Angor.Shared.ProtocolNew @using Angor.Shared.Services +@using Blockcore.Consensus.TransactionInfo @using Blockcore.NBitcoin -@using Nostr.Client.Messages -@using Angor.Client.Models -@using Nostr.Client.Messages.Metadata - +@using NBitcoin.DataEncoders @inherits BaseComponent @inject IDerivationOperations _derivationOperations @inject IWalletStorage _walletStorage; @@ -22,20 +20,22 @@ @inject IHtmlStripperService HtmlStripperService; @inject IFounderTransactionActions _founderTransactionActions - - + + @if (!hasWallet) { - NavigationManager.NavigateTo($"/wallet"); + NavigationManager.NavigateTo("/wallet"); return; } + +
- +
@@ -47,12 +47,11 @@
-
-
-
-
+
+
+
@@ -61,8 +60,8 @@
-
-
+
+
@@ -71,8 +70,8 @@
-
-
+
+
@@ -84,116 +83,102 @@
- -
- @if (activeTab == 1) - { -
-
+@if (activeTab == 1) +{ +
+
+ +
+ + +
- -
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - + +
+
+
- - @*
- -
+ +
-
- - -
*@ - - -
+ -
- - -
-
- -
-
- - - -
+
+
+} +@if (activeTab == 2) +{ + + +
+ +
+ +
+ + +
- } + +
+ + +
- @if (activeTab == 2) - { - + +
+ + +
- -
- - -
+ +
+ + +
- -
- - -
+ +
+ + +
- -
- - -
+ +
+ + -
- - -
+ - -
- - + +
- -
- - + +
+ + +
- -

Stages

- @foreach (var stage in project.ProjectInfo.Stages) + +

Stages

+ @foreach (var stage in project.ProjectInfo.Stages) + { +
+ +
+ + +
+ @if (project.ProjectInfo.Stages.IndexOf(stage) > 0) { -
- -
- - - -
-
+ var previousStage = project.ProjectInfo.Stages[project.ProjectInfo.Stages.IndexOf(stage) - 1]; + var daysBetween = (stage.ReleaseDate - previousStage.ReleaseDate).Days; +

Days since last stage: @daysBetween days

} +
+ } + - - + -
-
- + - -
+
+
+ +} - - } - - @if (activeTab == 3) - { +@if (activeTab == 3) +{ +
+ +

+ Project Name: @project.Metadata.Name +

+
+
+ +

+ Project About: @((MarkupString)project.Metadata.About) +

+
+
+ +

+ Project Identifier: @project.ProjectInfo.ProjectIdentifier +

+
+
+ +

Founder Key: @project.ProjectInfo.FounderKey.Substring(0, 10)...

+
+
+ +

+ Target amount: @project.ProjectInfo.TargetAmount @network.CoinTicker +

+
+
+ +

Start date: @project.ProjectInfo.StartDate.ToString("dd/MM/yyyy") in @((project.ProjectInfo.StartDate - DateTime.Now).Days) days

+
+
+ +

Expiry date: @project.ProjectInfo.ExpiryDate.ToString("dd/MM/yyyy") in @((project.ProjectInfo.ExpiryDate - DateTime.Now).Days) days

+
+
+ +

Penalty days: @project.ProjectInfo.PenaltyDays days

+
-
- -

Project Name: @project.Metadata.Name

-
-
- -

Project About: @((MarkupString)project.Metadata.About)

-
-
- -

Project Identifier: @project.ProjectInfo.ProjectIdentifier

-
-
- -

Founder Key: @project.ProjectInfo.FounderKey.Substring(0, 10)...

-
-
- -

Target amount: @project.ProjectInfo.TargetAmount @network.CoinTicker

-
-
- -

Start date: @project.ProjectInfo.StartDate.ToString("dd/MM/yyyy") in @((project.ProjectInfo.StartDate - DateTime.Now).Days) days

-
-
- -

Expiry date: @project.ProjectInfo.ExpiryDate.ToString("dd/MM/yyyy") in @((project.ProjectInfo.ExpiryDate - DateTime.Now).Days) days

-
-
- -

Penalty days: @project.ProjectInfo.PenaltyDays days

-
+
Stages
-
Stages
+ @foreach (var stage in project.ProjectInfo.Stages) + { +
+
+ +

Stage Percent: @stage.AmountToRelease %

+
+
+ +

Stage Date: @stage.ReleaseDate.ToString("dd/MM/yyyy") - @((stage.ReleaseDate - project.ProjectInfo.StartDate).Days) days after project starts

+
+
+ } - @foreach (var stage in project.ProjectInfo.Stages) +
+
Current Step
+
+ @GetProgressMessage() +
+
+ -
-
- - -
+ +
+
+ + + + + +
- } +
+} - @if (showCreateModal) - { - -