From a9dacd561c2e054b8bea03b3c2a7c70df74c09ab Mon Sep 17 00:00:00 2001 From: ShirokaiLon <6662937+ShirokaiLon@users.noreply.github.com> Date: Fri, 3 Jan 2020 19:56:55 +0000 Subject: [PATCH] Change password generator to use ColoredPassword (#686) * Change password generator to use ColoredPassword * Change ColoredPassword from FormattedString to HTML string for improved performance * PasswordFormatter fixes * Correct || to && condition * Apply password colouring to history pages --- .../Pages/Generator/GeneratorHistoryPage.xaml | 4 ++- src/App/Pages/Generator/GeneratorPage.xaml | 3 +- .../Pages/Generator/GeneratorPageViewModel.cs | 2 +- src/App/Pages/Vault/PasswordHistoryPage.xaml | 4 ++- src/App/Pages/Vault/ViewPage.xaml | 3 +- src/App/Utilities/ColoredPasswordConverter.cs | 28 +++++++++++++++ src/App/Utilities/PasswordFormatter.cs | 36 +++++++++++++------ 7 files changed, 64 insertions(+), 16 deletions(-) create mode 100644 src/App/Utilities/ColoredPasswordConverter.cs diff --git a/src/App/Pages/Generator/GeneratorHistoryPage.xaml b/src/App/Pages/Generator/GeneratorHistoryPage.xaml index 5080fcad4..02802e4ee 100644 --- a/src/App/Pages/Generator/GeneratorHistoryPage.xaml +++ b/src/App/Pages/Generator/GeneratorHistoryPage.xaml @@ -19,6 +19,7 @@ + + TextType="Html" + Text="{Binding Password, Mode=OneWay, Converter={StaticResource coloredPassword}}" />