-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RawTransactionModal for TRX processes (#168)
* add in wallet, and create the component * add RawTransactioModal for invest * add max * add for Spend.razor * config
- Loading branch information
Showing
4 changed files
with
187 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
@using Angor.Shared.Models | ||
@inject IClipboardService ClipboardService | ||
|
||
@if (IsVisible) | ||
{ | ||
<div class="modal-wrapper"> | ||
<div class="modal fade show d-block"> | ||
<div class="modal-dialog"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">Raw Transaction JSON</h5> | ||
<span type="button" @onclick="CloseModal" aria-label="Close"> | ||
<Icon IconName="close-circle"/> | ||
<i @onclick="CopyToClipboard" class="ms-auto cursor-pointer user-select-none"> | ||
<Icon IconName="copy"></Icon> | ||
</i> | ||
</span> | ||
</div> | ||
<div class="modal-body"> | ||
<pre>@RawTransactionJson</pre> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
} | ||
|
||
@code { | ||
[Parameter] public string RawTransactionJson { get; set; } | ||
[Parameter] public bool IsVisible { get; set; } | ||
[Parameter] public EventCallback<bool> IsVisibleChanged { get; set; } | ||
|
||
private async Task CloseModal() | ||
{ | ||
await IsVisibleChanged.InvokeAsync(false); | ||
} | ||
|
||
private async Task CopyToClipboard() | ||
{ | ||
await ClipboardService.WriteTextAsync(RawTransactionJson); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters