From 263aeef030a453739e5b49a7bd7c9df49f9f7faf Mon Sep 17 00:00:00 2001 From: aj-rosado <109146700+aj-rosado@users.noreply.github.com> Date: Thu, 21 Jul 2022 09:53:39 +0100 Subject: [PATCH] [PS-1080] Added text alternative to Boolean custom field icon (#2000) * PS-1080 Added new accessibility text property to the custom field bool icon * PS-1080 Added BoolValue property to the FieldView and added new AccessibilityProperty to bool icon --- src/App/Pages/Vault/ViewPage.xaml | 2 ++ src/App/Pages/Vault/ViewPageViewModel.cs | 16 +++++++++++++++- src/Core/Models/View/FieldView.cs | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Vault/ViewPage.xaml b/src/App/Pages/Vault/ViewPage.xaml index d581cd2f8..a5512fd7d 100644 --- a/src/App/Pages/Vault/ViewPage.xaml +++ b/src/App/Pages/Vault/ViewPage.xaml @@ -571,6 +571,8 @@ IsVisible="{Binding IsLinkedType}" /> PasswordFormatter.FormatPassword(_field.Value); public Command ToggleHiddenValueCommand { get; set; } diff --git a/src/Core/Models/View/FieldView.cs b/src/Core/Models/View/FieldView.cs index 2c3e0ba82..e9d74c13a 100644 --- a/src/Core/Models/View/FieldView.cs +++ b/src/Core/Models/View/FieldView.cs @@ -19,5 +19,6 @@ namespace Bit.Core.Models.View public string MaskedValue => Value != null ? "••••••••" : null; public bool NewField { get; set; } public LinkedIdType? LinkedId { get; set; } + public bool BoolValue => bool.TryParse(Value, out var b) && b; } }