checkmark visibility
MODIFY
WalletWasabi.Fluent/Models/RecoveryWord.cs
WalletWasabi.Fluent/Models/RecoveryWord.cs
@@ -11,6 +11,7 @@ namespace WalletWasabi.Fluent.Models
public class RecoveryWord : ViewModelBase
{
private string _input;
+ private bool _isConfirmed;
public RecoveryWord(int index, string word)
{
@@ -26,6 +27,12 @@ namespace WalletWasabi.Fluent.Models
set => this.RaiseAndSetIfChanged(ref _input, value);
}
+ public bool IsConfirmed
+ {
+ get => _isConfirmed;
+ set => this.RaiseAndSetIfChanged(ref _isConfirmed, value);
+ }
+
public int Index { get; }
public string Word { get; }
@@ -38,6 +45,7 @@ namespace WalletWasabi.Fluent.Models
if (Input == Word)
{
+ IsConfirmed = true;
return;
}

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/ConfirmRecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/ConfirmRecoveryWordsViewModel.cs
@@ -9,7 +9,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
{
public class ConfirmRecoveryWordsViewModel : ViewModelBase, IRoutableViewModel
{
- public ConfirmRecoveryWordsViewModel(IScreen screen, List<string> mnemonicWords)
+ public ConfirmRecoveryWordsViewModel(IScreen screen, List<RecoveryWord> mnemonicWords)
{
HostScreen = screen;
ConfirmationWords = new List<RecoveryWord>();
@@ -21,7 +21,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
public IScreen HostScreen { get; }
public List<RecoveryWord> ConfirmationWords { get; }
- private void SetConfirmationWords(List<string> mnemonicWords)
+ private void SetConfirmationWords(List<RecoveryWord> mnemonicWords)
{
var random = new Random();
var unsortedConfWords = new List<RecoveryWord>();
@@ -39,7 +39,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
}
}
- unsortedConfWords.Add(new RecoveryWord(index + 1, mnemonicWords[index]));
+ unsortedConfWords.Add(mnemonicWords[index]);
}
ConfirmationWords.AddRange(unsortedConfWords.OrderBy(x => x.Index));

MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/CreateWallet/RecoveryWordsViewModel.cs
@@ -4,22 +4,23 @@ using System.Reactive;
using System.Text;
using System.Windows.Input;
using ReactiveUI;
+using WalletWasabi.Fluent.Models;
using WalletWasabi.Gui.ViewModels;
namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
{
public class RecoveryWordsViewModel : ViewModelBase, IRoutableViewModel
{
- private List<string> _mnemonicWords;
+ private List<RecoveryWord> _mnemonicWords;
public RecoveryWordsViewModel(IScreen screen)
{
HostScreen = screen;
- MnemonicWords = new List<string>();
+ MnemonicWords = new List<RecoveryWord>();
for (int i = 0; i < 12; i++)
{
- MnemonicWords.Add($"{i + 1}. Random");
+ MnemonicWords.Add(new RecoveryWord(i + 1,"Nothing"));
}
ContinueCommand = ReactiveCommand.Create(() => screen.Router.Navigate.Execute(new ConfirmRecoveryWordsViewModel(HostScreen, MnemonicWords)));
@@ -28,7 +29,7 @@ namespace WalletWasabi.Fluent.ViewModels.Dialogs.CreateWallet
public ICommand GoBackCommand => HostScreen.Router.NavigateBack;
public ICommand ContinueCommand { get; }
- public List<string> MnemonicWords
+ public List<RecoveryWord> MnemonicWords
{
get => _mnemonicWords;
set => this.RaiseAndSetIfChanged(ref _mnemonicWords, value);

MODIFY
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/ConfirmRecoveryWordsView.axaml
<StackPanel>
<TextBlock Text="{Binding Index, StringFormat=Recovery word {0}}" Margin="0 20 0 8"/>
<StackPanel Orientation="Horizontal">
- <TextBox Watermark="Type the word here..." Text="{Binding Input}" Width="280" FontSize="12"/>
- <PathIcon Foreground="Green" Data="{StaticResource checkmark_filled}" VerticalAlignment="Center" Width="12" Height="12" Margin="15 0 0 0"/>
+ <TextBox Watermark="Type the word here..." Text="{Binding Input}" IsEnabled="{Binding !IsConfirmed}" Width="280" FontSize="12"/>
+ <PathIcon Foreground="Green" IsVisible="{Binding IsConfirmed}" Data="{StaticResource checkmark_filled}" VerticalAlignment="Center" Width="12" Height="12" Margin="15 0 0 0"/>
</StackPanel>
</StackPanel>
</DataTemplate>

MODIFY
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml
WalletWasabi.Fluent/Views/Dialogs/CreateWallet/RecoveryWordsView.axaml
<ItemsControl.Styles>
<Style Selector="TextBlock">
<Setter Property="FontSize" Value="16" />
- <Setter Property="Width" Value="155" />
<Setter Property="Height" Value="42" />
</Style>
</ItemsControl.Styles>
<WrapPanel MaxHeight="168" Orientation="Vertical" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
+ <ItemsControl.ItemTemplate>
+ <DataTemplate>
+ <StackPanel Width="155" Orientation="Horizontal">
+ <TextBlock Text="{Binding Index, StringFormat={}{0}.}" />
+ <TextBlock Text="{Binding Word}" FontWeight="SemiBold" Margin="5 0 0 0"/>
+ </StackPanel>
+ </DataTemplate>
+ </ItemsControl.ItemTemplate>
</ItemsControl>
</DockPanel>

checkmark visibility