mirror of
https://github.com/bitwarden/mobile.git
synced 2024-06-30 11:14:51 +02:00
* 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
25 lines
667 B
C#
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;
|
|
}
|
|
}
|