mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-18 05:24:28 +01:00
* feat: add reservedAt metadata when address is generated from receive * feat: add link to Reserved Addresses in wallet navigation * feat: add ReservedAddressesViewModel with labels and reserved timestamp * feat: implement Reserved Addresses view with filtering, pagination and label management * feat: add GetReservedAddressesWithDetails with label and timestamp support * feat: add ReservedAddresses endpoint * test: add Reserved Addresses view test with label, filter and pagination * test: use stable ID for filter input instead of placeholder * Moving Reserved Addresses to Receive page * feat: sync labels created via Label Manager using labelmanager:changed event * refactor: optimize GetReservedAddressesWithDetails using direct SQL query * feat: add link to filter Reserved Addresses by label from Wallet Labels view * refactor: remove legacy selenium test * test: add playwright tests with label filtering, pagination and redirect from Wallet Labels view * refactor: optimize Reserved Addresses filtering with Set and Safe.Json --------- Co-authored-by: rockstardev <5191402+rockstardev@users.noreply.github.com>
62 lines
2.6 KiB
Plaintext
62 lines
2.6 KiB
Plaintext
@using BTCPayServer.Abstractions.Models
|
|
@model WalletLabelsModel
|
|
@{
|
|
var walletId = Context.GetRouteValue("walletId").ToString();
|
|
ViewData.SetActivePage(WalletsNavPages.Settings, StringLocalizer["{0} Wallet Labels", Model.WalletId.CryptoCode], walletId);
|
|
}
|
|
|
|
@section PageFootContent {
|
|
<script>
|
|
delegate('click', '.btn-delete', event => { event.preventDefault() })
|
|
</script>
|
|
}
|
|
|
|
<h2 class="mb-2 mb-lg-3">@ViewData["Title"]</h2>
|
|
<partial name="_StatusMessage" />
|
|
|
|
@if (Model.Labels.Any())
|
|
{
|
|
<div class="table-responsive-md">
|
|
<table class="table table-hover">
|
|
<thead>
|
|
<tr>
|
|
<th text-translate="true">Label</th>
|
|
<th text-translate="true" class="text-end">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach (var label in Model.Labels)
|
|
{
|
|
<tr>
|
|
<td>
|
|
<div class="transaction-label" style="--label-bg:@label.Color;--label-fg:@label.TextColor">
|
|
<span>@label.Label</span>
|
|
</div>
|
|
</td>
|
|
|
|
<td class="text-end">
|
|
<a class="btn btn-link p-0 me-3"
|
|
href="@Url.Action("ReservedAddresses", "UIWallets", new { walletId = Model.WalletId.ToString(), filter = label.Label })"
|
|
title="View Reserved Addresses with this label">
|
|
Addresses
|
|
</a>
|
|
<form method="post" asp-action="RemoveWalletLabel" asp-route-walletId="@Model.WalletId" asp-route-id="@label.Label" class="d-inline">
|
|
<button class="btn btn-link btn-delete p-0 me-3" type="submit" data-bs-toggle="modal" data-bs-target="#ConfirmModal" data-description="@StringLocalizer["The label {0} will be removed from this wallet and its associated transactions.", Html.Encode(label.Label)]" data-confirm-input="@StringLocalizer["DELETE"]" text-translate="true">Remove</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<partial name="_Confirm" model="@(new ConfirmModel(StringLocalizer["Remove label"], StringLocalizer["This label will be removed from this wallet and its associated transactions."], StringLocalizer["Remove"]))" />
|
|
}
|
|
else
|
|
{
|
|
<p class="text-secondary mt-3">
|
|
@ViewLocalizer["There are no custom labels yet. You can create custom labels by assigning them to your {0}.",
|
|
Html.ActionLink(StringLocalizer["transactions"], "WalletTransactions", "UIWallets", new { walletId })]
|
|
</p>
|
|
}
|
|
|