commands and layout
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/ConfirmRecoveryWordsViewModel.cs
+using Avalonia.Input;
using ReactiveUI;
using System;
using System.Collections.Generic;
@@ -31,6 +32,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
// global.WalletManager.AddWallet(keyManager);
// screen.Router.NavigationStack.Clear();
//});
+ CancelCommand = ReactiveCommand.Create(() => HostScreen.Router.NavigateAndReset.Execute(new SettingsPageViewModel(screen)));
SetConfirmationWords(mnemonicWords);
}
@@ -44,6 +46,9 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
public IScreen HostScreen { get; }
public ObservableCollection<RecoveryWord> ConfirmationWords { get; }
public ICommand FinishCommand { get; }
+ public ICommand CancelCommand { get; }
+ public ICommand GoBackCommand => HostScreen.Router.NavigateBack;
+
private void OnConfirmationWordCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
@@ -25,10 +25,12 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
}
ContinueCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new ConfirmRecoveryWordsViewModel(HostScreen, MnemonicWords, keyManager, global)));
+ CancelCommand = ReactiveCommand.Create(() => HostScreen.Router.NavigateAndReset.Execute(new SettingsPageViewModel(screen)));
}
public ICommand GoBackCommand => HostScreen.Router.NavigateBack;
public ICommand ContinueCommand { get; }
+ public ICommand CancelCommand { get; }
public List<RecoveryWord> MnemonicWords { get; set; }

MODIFY
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
d:DesignWidth="600" d:DesignHeight="500"
Width="600" Height="500"
x:Class="WalletWasabi.Fluent.Views.Dialogs.CreateWallet.ConfirmRecoveryWordsView">
- <Panel Margin="25 0 25 20">
+ <Panel>
- <Button Classes="invisible" Margin="0 35 0 0" Command="{Binding GoBackCommand}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top">
- <PathIcon Data="{StaticResource arrow_left_regular}" />
+ <Button Classes="invisible" Margin="25 35 0 0" Command="{Binding GoBackCommand}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top">
+ <PathIcon Data="{StaticResource arrow_left_regular}" Width="20"/>
</Button>
<c:ContentArea Title="Confirm recovery words" Caption="Type the required recovery words"
- Margin="44 0 44 0">
+ Classes="dialog">
<ItemsControl Items="{Binding ConfirmationWords}">
<ItemsControl.ItemTemplate>
<DataTemplate>
- <StackPanel Margin="0 0 0 24">
+ <StackPanel Margin="0 0 0 20">
<TextBlock Text="{Binding Index, StringFormat=Recovery word {0}}" Margin="0 0 0 8"/>
<StackPanel Orientation="Horizontal">
<TextBox Watermark="Type the word here..." Text="{Binding Input}" IsEnabled="{Binding !IsConfirmed}" Width="280" FontSize="12">
<behaviors:FocusBehavior IsFocused="{Binding IsFocused}"/>
</i:Interaction.Behaviors>
</TextBox>
- <PathIcon Foreground="Green" IsVisible="{Binding IsConfirmed}" Data="{StaticResource checkmark_filled}" VerticalAlignment="Center" Width="12" Height="12" Margin="15 0 0 0"/>
+ <PathIcon Foreground="{StaticResource SystemAccentColor}" IsVisible="{Binding IsConfirmed}" Data="{StaticResource checkmark_filled}" VerticalAlignment="Center" Width="12" Height="12" Margin="15 0 0 0"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ItemsControl>
</c:ContentArea>
- <Button Content="Cancel" Command="{Binding CancelCommand}" Classes="invisible" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
- <Button Content="Finish" Command="{Binding FinishCommand}" Classes="action" HorizontalAlignment="Right" VerticalAlignment="Bottom">
+ <Button Content="Cancel" Margin="31 0 0 20" Command="{Binding CancelCommand}" Classes="invisible" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
+ <Button Content="Finish" Margin="0 0 25 20" Command="{Binding FinishCommand}" IsEnabled="{Binding IsConfirmationFinished}" Classes="action" HorizontalAlignment="Right" VerticalAlignment="Bottom">
<i:Interaction.Behaviors>
<behaviors:FocusBehavior IsFocused="{Binding IsConfirmationFinished}"/>
</i:Interaction.Behaviors>

MODIFY
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml
x:Class="WalletWasabi.Fluent.Views.Dialogs.CreateWallet.RecoveryWordsView">
<Panel>
- <Button Classes="invisible" Width="20" Margin="27 35 0 0" Command="{Binding GoBackCommand}" HorizontalAlignment="Left" VerticalAlignment="Top">
- <PathIcon Data="{StaticResource arrow_left_regular}" />
+ <Button Classes="invisible" Margin="25 35 0 0" Command="{Binding GoBackCommand}" HorizontalAlignment="Left" VerticalAlignment="Top">
+ <PathIcon Data="{StaticResource arrow_left_regular}" Width="20" />
</Button>
<c:ContentArea Title="Recovery words"
Caption="Write down the following numbered security words in order. These can be used to recover your wallet in the future. It is very important you keep them in a safe place."
- Margin="44 0 21 0">
- </c:ContentArea>
-
+ Classes="dialog">
<ItemsControl Items="{Binding MnemonicWords}">
<ItemsControl.Styles>
<Style Selector="TextBlock">
</ItemsControl.Styles>
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
- <WrapPanel MaxHeight="168" Orientation="Vertical" HorizontalAlignment="Center"/>
+ <WrapPanel MaxHeight="168" Orientation="Vertical" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
+ </c:ContentArea>
<Button Content="Cancel" Margin="31 0 0 20" Command="{Binding CancelCommand}" Classes="invisible" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
<Button Content="Continue" Margin="0 0 25 20" Command="{Binding ContinueCommand}" Classes="action" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>

commands and layout