Add IsBanned column to CoinListd
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinViewModel.cs
@@ -15,6 +15,7 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
[AutoNotify] private SmartLabel _smartLabel = "";
[AutoNotify] private bool _confirmed;
[AutoNotify] private bool _coinJoinInProgress;
+ [AutoNotify] private bool _isBanned;
public WalletCoinViewModel(SmartCoin coin)
{
@@ -24,6 +25,7 @@ public partial class WalletCoinViewModel : ViewModelBase, IDisposable
coin.WhenAnyValue(c => c.HdPubKey.Cluster.Labels).Subscribe(x => SmartLabel = x).DisposeWith(_disposables);
coin.WhenAnyValue(c => c.HdPubKey.AnonymitySet).Subscribe(x => AnonymitySet = x).DisposeWith(_disposables);
coin.WhenAnyValue(c => c.CoinJoinInProgress).Subscribe(x => CoinJoinInProgress = x).DisposeWith(_disposables);
+ coin.WhenAnyValue(c => c.IsBanned).Subscribe(x => IsBanned = x).DisposeWith(_disposables);
}
public static Comparison<WalletCoinViewModel?> SortAscending<T>(Func<WalletCoinViewModel, T> selector)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Advanced/WalletCoins/WalletCoinsViewModel.cs
@@ -57,6 +57,7 @@ public partial class WalletCoinsViewModel : RoutableViewModel
// Amount AmountColumnView Amount Auto - - true
// AnonymitySet AnonymityColumnView <custom> 40 - - true
// Labels LabelsColumnView Labels * - - false
+ // Banned IsBannedColumnView Banned? Auto - - false
Source = new FlatTreeDataGridSource<WalletCoinViewModel>(_coins)
{
@@ -110,7 +111,20 @@ public partial class WalletCoinsViewModel : RoutableViewModel
CompareAscending = WalletCoinViewModel.SortAscending(x => x.SmartLabel),
CompareDescending = WalletCoinViewModel.SortDescending(x => x.SmartLabel)
},
- width: new GridLength(1, GridUnitType.Star))
+ width: new GridLength(1, GridUnitType.Star)),
+
+ // Banned
+ new TemplateColumn<WalletCoinViewModel>("Banned?",
+ new FuncDataTemplate<WalletCoinViewModel>((node, ns) => new IsBannedColumnView(), true),
+ options: new ColumnOptions<WalletCoinViewModel>
+ {
+ CanUserResizeColumn = false,
+ CanUserSortColumn = true,
+ CompareAscending = WalletCoinViewModel.SortAscending(x => x.IsBanned),
+ CompareDescending = WalletCoinViewModel.SortDescending(x => x.IsBanned)
+ },
+ width: new GridLength(0, GridUnitType.Auto))
+
}
};

ADD
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/Columns/IsBannedColumnView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:walletcoins="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Advanced.WalletCoins"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="walletcoins:WalletCoinViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Advanced.WalletCoins.Columns.IsBannedColumnView">
+ <TextBlock Text="{Binding IsBanned}"
+ Margin="5 0"
+ VerticalAlignment="Center"
+ HorizontalAlignment="Center" />
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Advanced/WalletCoins/Columns/IsBannedColumnView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Advanced.WalletCoins.Columns;
+
+public partial class IsBannedColumnView : UserControl
+{
+ public IsBannedColumnView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+}
\ No newline at end of file

Add IsBanned column to CoinListd