simple login view
MODIFY
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
WalletWasabi.Fluent/ViewModels/WalletManagerViewModel.cs
@@ -57,7 +57,7 @@ namespace WalletWasabi.Fluent.ViewModels
{
WalletViewModelBase vm = (wallet.State <= WalletState.Starting)
? ClosedWalletViewModel.Create(walletManager, wallet)
- : WalletViewModel.Create(uiConfig, wallet);
+ : WalletViewModel.Create(uiConfig, wallet, walletManager);
InsertWallet(vm);
});
@@ -88,7 +88,7 @@ namespace WalletWasabi.Fluent.ViewModels
throw new Exception("Wallet already opened.");
}
- var walletViewModel = WalletViewModel.Create(uiConfig, wallet);
+ var walletViewModel = WalletViewModel.Create(uiConfig, wallet, walletManager);
InsertWallet(walletViewModel);

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/ClosedWalletViewModel.cs
@@ -17,7 +17,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
{
[AutoNotify] private ObservableCollection<NavBarItemViewModel> _items;
- protected ClosedWalletViewModel(WalletManager walletManager, Wallet wallet) : base(wallet)
+ protected ClosedWalletViewModel(WalletManager walletManager, Wallet wallet) : base(wallet, walletManager)
{
_items = new ObservableCollection<NavBarItemViewModel>();

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/HardwareWallet/HardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/HardwareWallet/HardwareWalletViewModel.cs
@@ -5,7 +5,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.HardwareWallet
{
public class HardwareWalletViewModel : WalletViewModel
{
- internal HardwareWalletViewModel(UiConfig uiConfig, Wallet wallet) : base(uiConfig, wallet)
+ internal HardwareWalletViewModel(UiConfig uiConfig, Wallet wallet, WalletManager walletManager) : base(uiConfig, wallet, walletManager)
{
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModel.cs
@@ -19,7 +19,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
{
[AutoNotify] private ObservableCollection<ViewModelBase> _actions;
- protected WalletViewModel(UiConfig uiConfig, Wallet wallet) : base(wallet)
+ protected WalletViewModel(UiConfig uiConfig, Wallet wallet, WalletManager walletManager) : base(wallet, walletManager)
{
Disposables = Disposables is null ? new CompositeDisposable() : throw new NotSupportedException($"Cannot open {GetType().Name} before closing it.");
@@ -63,13 +63,13 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
public override string IconName => "web_asset_regular";
- public static WalletViewModel Create(UiConfig uiConfig, Wallet wallet)
+ public static WalletViewModel Create(UiConfig uiConfig, Wallet wallet, WalletManager walletManager)
{
return wallet.KeyManager.IsHardwareWallet
- ? new HardwareWalletViewModel(uiConfig, wallet)
+ ? new HardwareWalletViewModel(uiConfig, wallet, walletManager)
: wallet.KeyManager.IsWatchOnly
- ? new WatchOnlyWalletViewModel(uiConfig, wallet)
- : new WalletViewModel(uiConfig, wallet);
+ ? new WatchOnlyWalletViewModel(uiConfig, wallet, walletManager)
+ : new WalletViewModel(uiConfig, wallet, walletManager);
}
public void OpenWalletTabs()

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
WalletWasabi.Fluent/ViewModels/Wallets/WalletViewModelBase.cs
@@ -17,7 +17,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
private CompositeDisposable? _disposables;
private bool _disposedValue;
- protected WalletViewModelBase(Wallet wallet)
+ protected WalletViewModelBase(Wallet wallet, WalletManager walletManager)
{
Wallet = Guard.NotNull(nameof(wallet), wallet);
@@ -39,7 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets
{
if (Wallet.State == WalletState.Uninitialized)
{
- Navigate().To(new LoginViewModel(this));
+ Navigate().To(new SimpleLoginViewModel(this, walletManager));
}
else
{

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/WatchOnlyWallet/WatchOnlyWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/WatchOnlyWallet/WatchOnlyWalletViewModel.cs
@@ -5,7 +5,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.WatchOnlyWallet
{
public class WatchOnlyWalletViewModel : WalletViewModel
{
- internal WatchOnlyWalletViewModel(UiConfig uiConfig, Wallet wallet) : base(uiConfig, wallet)
+ internal WatchOnlyWalletViewModel(UiConfig uiConfig, Wallet wallet, WalletManager walletManager) : base(uiConfig, wallet, walletManager)
{
}
}

MODIFY
WalletWasabi.Fluent/Views/Dialogs/ShowErrorDialogView.axaml
WalletWasabi.Fluent/Views/Dialogs/ShowErrorDialogView.axaml
x:Class="WalletWasabi.Fluent.Views.Dialogs.ShowErrorDialogView">
<c:ContentArea Title="{Binding Title}"
Caption="{Binding Caption}"
- EnableNext="True" NextContent="Ok"
+ EnableNext="True" NextContent="OK"
ScrollViewer.VerticalScrollBarVisibility="Disabled">
<DockPanel VerticalAlignment="Center">
<TextBlock Text="{Binding Message}" DockPanel.Dock="Bottom" TextAlignment="Center" TextWrapping="Wrap" MaxWidth="500" Margin="20 0" />

ADD
WalletWasabi.Fluent/Views/Login/FullScreenLoginView.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:c="clr-namespace:WalletWasabi.Fluent.Controls"
+ xmlns:loginViews="clr-namespace:WalletWasabi.Fluent.Views.Login"
+ xmlns:login="clr-namespace:WalletWasabi.Fluent.ViewModels.Login"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="login:FullScreenLoginViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Login.FullScreenLoginView">
+ <c:ContentArea Title="Login"
+ Caption="Enter your password to access your wallet"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled"
+ IsBusy="{Binding Login.IsBusy}">
+ <Panel>
+ <loginViews:LoginView DataContext="{Binding Login}"/>
+
+ <ComboBox SelectedIndex="0"
+ HorizontalAlignment="Right"
+ VerticalAlignment="Bottom">
+ <ComboBoxItem>Wallet #1</ComboBoxItem>
+ <ComboBoxItem>Wallet #2</ComboBoxItem>
+ <ComboBoxItem>Wallet #3</ComboBoxItem>
+ </ComboBox>
+
+ <StackPanel Orientation="Horizontal">
+ <Button>X</Button>
+ <Button>Y</Button>
+ <Button>Z</Button>
+ </StackPanel>
+ </Panel>
+ </c:ContentArea>
+</UserControl>

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

ADD
WalletWasabi.Fluent/Views/Login/SimpleLoginView.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:c="clr-namespace:WalletWasabi.Fluent.Controls"
+ xmlns:loginViews="clr-namespace:WalletWasabi.Fluent.Views.Login"
+ xmlns:login="clr-namespace:WalletWasabi.Fluent.ViewModels.Login"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:DataType="login:SimpleLoginViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Login.SimpleLoginView">
+ <c:ContentArea Title="Login"
+ Caption="Enter your password to access your wallet"
+ DataContext="{Binding Login}"
+ HorizontalAlignment="Stretch"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled"
+ IsBusy="{Binding IsBusy}">
+ <loginViews:LoginView />
+ </c:ContentArea>
+</UserControl>

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

simple login view