add basic structure to provide sendviews.
MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -10,6 +10,7 @@ using ReactiveUI;
using WalletWasabi.Fluent.ViewModels.NavBar;
using WalletWasabi.Fluent.ViewModels.Wallets;
using WalletWasabi.Fluent.ViewModels.Wallets.Actions;
+using WalletWasabi.Fluent.ViewModels.Wallets.Send;
using WalletWasabi.Gui;
using WalletWasabi.Gui.ViewModels;
using WalletWasabi.Wallets;
@@ -19,7 +20,7 @@ namespace WalletWasabi.Fluent.ViewModels
public partial class WalletManagerViewModel : ViewModelBase
{
private readonly Dictionary<Wallet, WalletViewModelBase> _walletDictionary;
- private readonly Dictionary<WalletViewModelBase, List<WalletActionViewModel>> _walletActionsDictionary;
+ private readonly Dictionary<WalletViewModelBase, List<NavBarItemViewModel>> _walletActionsDictionary;
private readonly ReadOnlyObservableCollection<NavBarItemViewModel> _items;
[AutoNotify] private WalletViewModelBase? _selectedWallet;
[AutoNotify(SetterModifier = AccessModifier.Private)] private bool _isLoadingWallet;
@@ -32,7 +33,7 @@ namespace WalletWasabi.Fluent.ViewModels
{
Model = walletManager;
_walletDictionary = new Dictionary<Wallet, WalletViewModelBase>();
- _walletActionsDictionary = new Dictionary<WalletViewModelBase, List<WalletActionViewModel>>();
+ _walletActionsDictionary = new Dictionary<WalletViewModelBase, List<NavBarItemViewModel>>();
_actions = new ObservableCollection<NavBarItemViewModel>();
_wallets = new ObservableCollection<WalletViewModelBase>();
_loggedInAndSelectedAlwaysFirst = true;
@@ -178,7 +179,7 @@ namespace WalletWasabi.Fluent.ViewModels
if (SelectedWallet is { IsLoggedIn: true } walletViewModelPrevious && (item is WalletViewModelBase && SelectedWallet != item))
{
- if (item is not WalletActionViewModel && SelectedWallet != item)
+ if (/*item is not WalletActionViewModel &&*/ SelectedWallet != item)
{
var actions = _walletActionsDictionary[walletViewModelPrevious];
@@ -208,14 +209,14 @@ namespace WalletWasabi.Fluent.ViewModels
return result;
}
- private List<WalletActionViewModel> GetWalletActions(WalletViewModelBase walletViewModel)
+ private List<NavBarItemViewModel> GetWalletActions(WalletViewModelBase walletViewModel)
{
var wallet = walletViewModel.Wallet;
- var actions = new List<WalletActionViewModel>();
+ var actions = new List<NavBarItemViewModel>();
if (wallet.KeyManager.IsHardwareWallet || !wallet.KeyManager.IsWatchOnly)
{
- actions.Add(new SendWalletActionViewModel(walletViewModel));
+ actions.Add(new SendViewModel());
}
actions.Add(new ReceiveWalletActionViewModel(walletViewModel));

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Actions/ReceiveWalletActionViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Actions/ReceiveWalletActionViewModel.cs
@@ -9,9 +9,9 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Actions
NavBarPosition = NavBarPosition.None,
Searchable = false,
NavigationTarget = NavigationTarget.DialogScreen)]
- public partial class ReceiveWalletActionViewModel : WalletActionViewModel
+ public partial class ReceiveWalletActionViewModel : NavBarItemViewModel
{
- public ReceiveWalletActionViewModel(WalletViewModelBase wallet) : base(wallet)
+ public ReceiveWalletActionViewModel(WalletViewModelBase wallet)
{
Title = "Receive";
SelectionMode = NavBarItemSelectionMode.Button;

ADD
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
+using WalletWasabi.Fluent.ViewModels.NavBar;
+
+namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
+{
+ public class SendViewModel : NavBarItemViewModel
+ {
+
+ }
+}
\ No newline at end of file

MODIFY
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
WalletWasabi.Fluent/Views/NavBar/NavBar.axaml
<TextBlock Text="{Binding Title}" Margin="55 0 0 0" />
</Panel>
</DataTemplate>
- <DataTemplate DataType="vmwa:WalletActionViewModel">
+ <DataTemplate DataType="vm:NavBarItemViewModel">
<Panel>
<Panel Width="45" Background="Transparent" HorizontalAlignment="Left" ToolTip.Tip="{Binding Title}">
<PathIcon HorizontalAlignment="Left">

RENAME
WalletWasabi.Fluent/Views/Wallets/Actions/SendWalletActionView.axaml
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml
xmlns:c="using:WalletWasabi.Fluent.Controls"
xmlns:vm="using:WalletWasabi.Fluent.ViewModels.Wallets.Actions"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:DataType="vm:SendWalletActionViewModel"
+ x:DataType="vm:ReceiveWalletActionViewModel"
x:CompileBindings="True"
- x:Class="WalletWasabi.Fluent.Views.Wallets.Actions.SendWalletActionView">
- <c:ContentArea Title="Send" Caption=""
+ x:Class="WalletWasabi.Fluent.Views.Wallets.Actions.ReceiveWalletActionView">
+ <c:ContentArea Title="Receive" Caption=""
+ EnableCancel="True"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
</c:ContentArea>

RENAME
WalletWasabi.Fluent/Views/Wallets/Actions/SendWalletActionView.axaml.cs
WalletWasabi.Fluent/Views/Wallets/Send/SendView.axaml.cs
@@ -3,9 +3,9 @@ using Avalonia.Markup.Xaml;
namespace WalletWasabi.Fluent.Views.Wallets.Actions
{
- public class SendWalletActionView : UserControl
+ public class ReceiveWalletActionView : UserControl
{
- public SendWalletActionView()
+ public ReceiveWalletActionView()
{
InitializeComponent();
}

add basic structure to provide sendviews.