transaction details first steps
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/HistoryViewModel.cs
using System;
using System.Collections.ObjectModel;
-using System.Linq;
using System.Reactive.Linq;
using System.Threading.Tasks;
using DynamicData;
@@ -8,6 +7,7 @@ using DynamicData.Binding;
using NBitcoin;
using ReactiveUI;
using WalletWasabi.Blockchain.Transactions;
+using WalletWasabi.Fluent.ViewModels.Navigation;
using WalletWasabi.Gui;
using WalletWasabi.Logging;
using WalletWasabi.Stores;
@@ -15,7 +15,8 @@ using WalletWasabi.Wallets;
namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
{
- public partial class HistoryViewModel
+ [NavigationMetaData(Title = "Transaction History")]
+ public partial class HistoryViewModel : RoutableViewModel
{
private readonly Wallet _wallet;
private readonly BitcoinStore _bitcoinStore;
@@ -23,6 +24,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
private readonly SourceList<HistoryItemViewModel> _transactionSourceList;
[AutoNotify] private bool _showCoinJoin;
+ [AutoNotify] private HistoryItemViewModel? _selectedItem;
public HistoryViewModel(Wallet wallet, UiConfig uiConfig)
{
@@ -44,6 +46,28 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
this.WhenAnyValue(x => x.ShowCoinJoin)
.ObserveOn(RxApp.MainThreadScheduler)
.Subscribe(showCoinJoin => uiConfig.ShowCoinJoinInHistory = showCoinJoin);
+
+ this.WhenAnyValue(x => x.SelectedItem)
+ .ObserveOn(RxApp.MainThreadScheduler)
+ .Subscribe(selectedItem =>
+ {
+ if (selectedItem is null)
+ {
+ Console.WriteLine("Selection is null");
+ return;
+ }
+
+ Console.WriteLine("Navigate to Detals");
+ Navigate(NavigationTarget.DialogScreen).To(new TransactionDetailsViewModel());
+ });
+
+ this.WhenAnyValue(x => x.SelectedItem)
+ .Throttle(TimeSpan.FromMilliseconds(100))
+ .ObserveOn(RxApp.MainThreadScheduler)
+ .Subscribe(_ =>
+ {
+ SelectedItem = null;
+ });
}
public ReadOnlyObservableCollection<HistoryItemViewModel> Transactions => _transactions;

ADD
WalletWasabi.Fluent/ViewModels/Wallets/Home/History/TransactionDetailsViewModel.cs
+using WalletWasabi.Fluent.ViewModels.Navigation;
+
+namespace WalletWasabi.Fluent.ViewModels.Wallets.Home.History
+{
+ [NavigationMetaData(Title = "Transaction Details")]
+ public partial class TransactionDetailsViewModel : RoutableViewModel
+ {
+ public TransactionDetailsViewModel()
+ {
+ EnableCancel = true;
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
WalletWasabi.Fluent/Views/Wallets/Home/History/HistoryTable.axaml
</StackPanel>
<!-- Title -->
- <Label Content="Transaction History" DockPanel.Dock="Left" FontWeight="Bold" FontSize="16"/>
+ <Label Content="{Binding Title}" DockPanel.Dock="Left" FontWeight="Bold" FontSize="16"/>
</DockPanel>
- <DataGrid Items="{Binding Transactions}" DockPanel.Dock="Bottom">
+ <DataGrid Items="{Binding Transactions}"
+ SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
+ DockPanel.Dock="Bottom">
<DataGrid.Styles>
<Style Selector="PathIcon">
<Setter Property="Width" Value="15"/>
<!-- Status -->
<DataGridTemplateColumn Header="Status"
- Width="Auto"
+ Width="140"
SortMemberPath="IsConfirmed">
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
- <Panel x:DataType="history:HistoryItemViewModel" Margin="0 0 0 0">
+ <Panel x:DataType="history:HistoryItemViewModel">
<!-- Confirmed -->
<StackPanel IsVisible="{Binding IsConfirmed}">
<PathIcon Data="{StaticResource checkmark_filled}"

ADD
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.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:history="clr-namespace:WalletWasabi.Fluent.ViewModels.Wallets.Home.History"
+ xmlns:c="clr-namespace:WalletWasabi.Fluent.Controls"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="history:TransactionDetailsViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Home.History.TransactionDetailsView">
+ <c:ContentArea Title="{Binding Title}"
+ NextContent="Done" EnableNext="True"
+ EnableCancel="{Binding EnableCancel}">
+
+ </c:ContentArea>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Wallets/Home/History/TransactionDetailsView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Wallets.Home.History
+{
+ public class TransactionDetailsView : UserControl
+ {
+ public TransactionDetailsView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}

transaction details first steps