mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-01-08 00:24:23 +01:00
Wallet transactions: Add label manager (#4796)
* 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>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.Services.Labels;
|
||||
|
||||
namespace BTCPayServer.Models.WalletViewModels
|
||||
{
|
||||
@@ -15,10 +14,10 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public string Link { get; set; }
|
||||
public bool Positive { get; set; }
|
||||
public string Balance { get; set; }
|
||||
public HashSet<TransactionTagModel> Tags { get; set; } = new HashSet<TransactionTagModel>();
|
||||
public HashSet<TransactionTagModel> Tags { get; set; } = new ();
|
||||
}
|
||||
public HashSet<(string Text, string Color, string TextColor)> Labels { get; set; } = new HashSet<(string Text, string Color, string TextColor)>();
|
||||
public List<TransactionViewModel> Transactions { get; set; } = new List<TransactionViewModel>();
|
||||
public HashSet<(string Text, string Color, string TextColor)> Labels { get; set; } = new ();
|
||||
public List<TransactionViewModel> Transactions { get; set; } = new ();
|
||||
public override int CurrentPageCount => Transactions.Count;
|
||||
public string CryptoCode { get; set; }
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public bool Positive { get; set; }
|
||||
public string Destination { get; set; }
|
||||
public string Balance { get; set; }
|
||||
public Dictionary<string, string> Labels { get; set; } = new();
|
||||
}
|
||||
|
||||
public class InputViewModel
|
||||
@@ -24,6 +25,7 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public string Error { get; set; }
|
||||
public bool Positive { get; set; }
|
||||
public string BalanceChange { get; set; }
|
||||
public Dictionary<string, string> Labels { get; set; } = new();
|
||||
}
|
||||
public bool HasErrors => Inputs.Count == 0 || Inputs.Any(i => !string.IsNullOrEmpty(i.Error));
|
||||
public string BalanceChange { get; set; }
|
||||
|
||||
@@ -34,6 +34,8 @@ namespace BTCPayServer.Models.WalletViewModels
|
||||
public bool SubtractFeesFromOutput { get; set; }
|
||||
|
||||
public string PayoutId { get; set; }
|
||||
|
||||
public string[] Labels { get; set; } = Array.Empty<string>();
|
||||
}
|
||||
public decimal CurrentBalance { get; set; }
|
||||
public decimal ImmatureBalance { get; set; }
|
||||
|
||||
Reference in New Issue
Block a user