1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-30 11:14:51 +02:00
bitwarden-mobile/src/Core/Models/View/FieldView.cs
aj-rosado 263aeef030
[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
2022-07-21 09:53:39 +01:00

25 lines
667 B
C#

using Bit.Core.Enums;
using Bit.Core.Models.Domain;
namespace Bit.Core.Models.View
{
public class FieldView : View
{
public FieldView() { }
public FieldView(Field f)
{
Type = f.Type;
LinkedId = f.LinkedId;
}
public string Name { get; set; }
public string Value { get; set; }
public FieldType Type { get; set; }
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;
}
}