recovery words basics
MODIFY
WalletWasabi.Fluent/App.xaml
WalletWasabi.Fluent/App.xaml
</Application.DataTemplates>
<Application.Styles>
- <StyleInclude Source="avares://WalletWasabi.Fluent/Styles/Themes/BaseDark.xaml" />
+ <StyleInclude Source="avares://WalletWasabi.Fluent/Styles/Themes/BaseLight.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Icons/Icons.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Styles/Styles.xaml" />
<StyleInclude Source="avares://WalletWasabi.Fluent/Controls/Dialog.xaml" />

ADD
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ReactiveUI;
+using WalletWasabi.Gui.ViewModels;
+
+namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
+{
+ public class RecoveryWordsViewModel : ViewModelBase, IRoutableViewModel
+ {
+ private List<string> _mnemonicWords;
+
+ public RecoveryWordsViewModel(IScreen screen)
+ {
+ HostScreen = screen;
+ MnemonicWords = new List<string>();
+
+ for (int i = 0; i < 12; i++)
+ {
+ MnemonicWords.Add($"{i + 1}. Random");
+ }
+ }
+
+ public List<string> MnemonicWords
+ {
+ get => _mnemonicWords;
+ set => this.RaiseAndSetIfChanged(ref _mnemonicWords, value);
+ }
+
+ public string UrlPathSegment { get; }
+ public IScreen HostScreen { get; }
+ }
+}

MODIFY
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
WalletWasabi.Fluent/ViewModels/SettingsPageViewModel.cs
using ReactiveUI;
using System.Windows.Input;
using WalletWasabi.Fluent.ViewModels.Dialogs;
+using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
namespace WalletWasabi.Fluent.ViewModels
{
@@ -11,6 +12,7 @@ namespace WalletWasabi.Fluent.ViewModels
Title = "Settings";
NextCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new HomePageViewModel(screen)));
+ CreateWalletCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new RecoveryWordsViewModel(screen)));
OpenDialogCommand = ReactiveCommand.Create(async () =>
{
@@ -21,6 +23,7 @@ namespace WalletWasabi.Fluent.ViewModels
public ICommand NextCommand { get; }
public ICommand OpenDialogCommand { get; }
+ public ICommand CreateWalletCommand { get; }
public override string IconName => "settings_regular";
}

ADD
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.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"
+ mc:Ignorable="d" d:DesignWidth="600" d:DesignHeight="500"
+ Width="600" Height="500"
+ x:Class="WalletWasabi.Fluent.Views.Dialogs.CreateWallet.RecoveryWordsView">
+ <Panel Margin="10">
+
+ <DockPanel>
+
+ <Button Classes="invisible" Command="{Binding Close}" DockPanel.Dock="Left" HorizontalAlignment="Left" VerticalAlignment="Top">
+ <PathIcon Data="{StaticResource arrow_left_regular}" />
+ </Button>
+
+ <TextBlock Text="Recovery words" FontSize="20" DockPanel.Dock="Top" FontWeight="SemiBold" Classes=""/>
+ <TextBlock DockPanel.Dock="Top" TextWrapping="Wrap" FontSize="12" Margin="0 10 0 0"
+ Text="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." />
+ </DockPanel>
+
+ <ItemsControl Items="{Binding MnemonicWords}" HorizontalAlignment="Center" VerticalAlignment="Center">
+ <ItemsControl.Styles>
+ <Style Selector="TextBlock">
+ <Setter Property="FontSize" Value="16" />
+ <Setter Property="Margin" Value="40 0 40 0" />
+ <Setter Property="Height" Value="42" />
+ </Style>
+ </ItemsControl.Styles>
+ <ItemsControl.ItemsPanel>
+ <ItemsPanelTemplate>
+ <WrapPanel MaxHeight="168" Orientation="Vertical" />
+ </ItemsPanelTemplate>
+ </ItemsControl.ItemsPanel>
+ </ItemsControl>
+
+ <Button Content="Cancel" Classes="invisible" HorizontalAlignment="Left" VerticalAlignment="Bottom"/>
+ <Button Content="Continue" Classes="action" HorizontalAlignment="Right" VerticalAlignment="Bottom"/>
+ </Panel>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml.cs
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+using Avalonia.ReactiveUI;
+using WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet;
+
+namespace WalletWasabi.Fluent.Views.Dialogs.CreateWallet
+{
+ public class RecoveryWordsView : ReactiveUserControl<RecoveryWordsViewModel>
+ {
+ public RecoveryWordsView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}

MODIFY
WalletWasabi.Fluent/Views/SettingsPageView.axaml
WalletWasabi.Fluent/Views/SettingsPageView.axaml
<StackPanel>
<Button Command="{Binding NextCommand}" Content="Next" />
<Button Command="{Binding OpenDialogCommand}" Content="Open Dialog" />
+ <Button Command="{Binding CreateWalletCommand}" Content="Create Wallet" />
</StackPanel>
</Panel>
</UserControl>

recovery words basics