mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-03-01 00:59:15 +01:00
* Wallet transactions: Add label manager * Update BTCPayServer/Views/UIWallets/WalletTransactions.cshtml Co-authored-by: Andrew Camilleri <evilkukka@gmail.com> * Add rich label info * Fixes * support labels in wallet send * add labels to tx info page * Remove noscript parts * Allow click on transaction label info * update psbt info labelstyling * revert red pixel fix as it broke all --------- Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
22 lines
1.1 KiB
Text
22 lines
1.1 KiB
Text
@using NBitcoin.DataEncoders
|
|
@using NBitcoin
|
|
@model BTCPayServer.Components.LabelManager.LabelViewModel
|
|
@{
|
|
var elementId = "a" + Encoders.Base58.EncodeData(RandomUtils.GetBytes(16));
|
|
var fetchUrl = Url.Action("GetLabels", "UIWallets", new {
|
|
walletId = Model.WalletObjectId.WalletId,
|
|
excludeTypes = Safe.Json(Model.ExcludeTypes)
|
|
});
|
|
var updateUrl = Model.AutoUpdate? Url.Action("UpdateLabels", "UIWallets", new {
|
|
walletId = Model.WalletObjectId.WalletId
|
|
}): string.Empty;
|
|
}
|
|
<input id="@elementId" placeholder="Select labels" autocomplete="off" value="@string.Join(",", Model.SelectedLabels)"
|
|
class="only-for-js form-control label-manager ts-wrapper @(Model.DisplayInline ? "ts-inline" : "")"
|
|
data-fetch-url="@fetchUrl"
|
|
data-update-url="@updateUrl"
|
|
data-wallet-id="@Model.WalletObjectId.WalletId"
|
|
data-wallet-object-id="@Model.WalletObjectId.Id"
|
|
data-wallet-object-type="@Model.WalletObjectId.Type"
|
|
data-select-element="@Model.SelectElement"
|
|
data-labels='@Safe.Json(Model.RichLabelInfo)' />
|