mirror of
https://github.com/btcpayserver/btcpayserver.git
synced 2025-02-23 22:46:49 +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>
31 lines
1.1 KiB
C#
31 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using BTCPayServer.Services;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace BTCPayServer.Components.LabelManager
|
|
{
|
|
public class LabelManager : ViewComponent
|
|
{
|
|
public IViewComponentResult Invoke(WalletObjectId walletObjectId, string[] selectedLabels, bool excludeTypes = true, bool displayInline = false, Dictionary<string, RichLabelInfo> richLabelInfo = null, bool autoUpdate = true, string selectElement = null)
|
|
{
|
|
var vm = new LabelViewModel
|
|
{
|
|
ExcludeTypes = excludeTypes,
|
|
WalletObjectId = walletObjectId,
|
|
SelectedLabels = selectedLabels?? Array.Empty<string>(),
|
|
DisplayInline = displayInline,
|
|
RichLabelInfo = richLabelInfo,
|
|
AutoUpdate = autoUpdate,
|
|
SelectElement = selectElement
|
|
};
|
|
return View(vm);
|
|
}
|
|
}
|
|
|
|
public class RichLabelInfo
|
|
{
|
|
public string Link { get; set; }
|
|
public string Tooltip { get; set; }
|
|
}
|
|
}
|