btcpayserver/BTCPayServer/Views/UIWallets/_PSBTInfo.cshtml

114 lines
5.1 KiB
Text
Raw Normal View History

2021-07-26 23:28:34 +02:00
@model WalletPSBTReadyViewModel
<script src="~/js/wallet/wallet-camera-scanner.js" asp-append-version="true"></script>
<script src="~/js/wallet/WalletSend.js" asp-append-version="true"></script>
2021-07-30 18:54:17 +02:00
@if (Model.CanCalculateBalance)
{
<p class="lead text-center text-secondary">
This transaction will change your balance:
<br>
2021-08-03 13:13:18 +02:00
<span class="text-@(Model.Positive ? "success" : "danger")">@Model.BalanceChange</span>
2021-07-30 18:54:17 +02:00
</p>
}
<div id="inputs">
<h4 class="mb-n3">Inputs</h4>
<table class="table">
<thead>
2021-07-26 23:28:34 +02:00
<tr>
<th>Index</th>
<th>Labels</th>
<th class="text-end">Amount</th>
2021-07-26 23:28:34 +02:00
</tr>
</thead>
<tbody>
@foreach (var input in Model.Inputs)
{
<tr>
@if (input.Error != null)
{
<td>
@input.Index <span class="fa fa-exclamation-triangle text-danger" title="@input.Error"></span>
</td>
}
else
{
<td>@input.Index</td>
}<td>
@if (input.Labels.Any())
{
<div class="d-flex flex-wrap gap-2 align-items-center">
@foreach (var label in input.Labels)
{
<div class="transaction-label" style="--label-bg:@label.Color;--label-fg:@label.TextColor">
<span>@label.Text</span>
@if (!string.IsNullOrEmpty(label.Link))
{
<a class="transaction-label-info transaction-details-icon" href="@label.Link"
target="_blank" rel="noreferrer noopener" title="@label.Tooltip" data-bs-html="true"
data-bs-toggle="tooltip" data-bs-custom-class="transaction-label-tooltip">
<vc:icon symbol="info" />
</a>
}
</div>
}
</div>
}
</td>
<td class="text-end text-@(input.Positive ? "success" : "danger")">@input.BalanceChange</td>
</tr>
}
</tbody>
</table>
</div>
2021-07-26 23:28:34 +02:00
<div id="outputs" class="mt-4">
<h4 class="mb-n3">Outputs</h4>
<table class="table">
<thead>
2021-07-26 23:28:34 +02:00
<tr>
<th>Destination</th>
<th>Labels</th>
<th class="text-end">Amount</th>
2021-07-26 23:28:34 +02:00
</tr>
</thead>
<tbody>
@foreach (var destination in Model.Destinations)
{
<tr>
<td class="text-break">@destination.Destination</td>
<td>
@if (destination.Labels.Any())
{
<div class="d-flex flex-wrap gap-2 align-items-center">
@foreach (var label in destination.Labels)
{
<div class="transaction-label" style="--label-bg:@label.Color;--label-fg:@label.TextColor">
<span>@label.Text</span>
@if (!string.IsNullOrEmpty(label.Link))
{
<a class="transaction-label-info transaction-details-icon" href="@label.Link"
target="_blank" rel="noreferrer noopener" title="@label.Tooltip" data-bs-html="true"
data-bs-toggle="tooltip" data-bs-custom-class="transaction-label-tooltip">
<vc:icon symbol="info" />
</a>
}
</div>
}
</div>
}
</td>
<td class="text-end text-@(destination.Positive ? "success" : "danger")">@destination.Balance</td>
</tr>
}
</tbody>
</table>
</div>
2021-07-26 23:28:34 +02:00
@if (Model.FeeRate != null)
{
<p class="text-muted text-end">Transaction fee rate: <b>@Model.FeeRate</b></p>
}