1
0
mirror of https://github.com/bitwarden/mobile synced 2026-02-05 11:03:16 +00:00
Files
mobile/src/Core/Models/Export/Field.cs
Matt Gibson 3227daddaf Enable Encrypted json export of vaults (#1174)
* Enable Encrypted json export of vaults

* Match jslib export of non-org ciphers

* Clean up export

* Update src/App/Pages/Settings/ExportVaultPage.xaml.cs

Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>

Co-authored-by: Matt Gibson <mdgibson@Matts-MBP.lan>
Co-authored-by: Kyle Spearrin <kspearrin@users.noreply.github.com>
2020-12-14 11:56:13 -06:00

42 lines
932 B
C#

using Bit.Core.Enums;
using Bit.Core.Models.View;
namespace Bit.Core.Models.Export
{
public class Field
{
public Field() { }
public Field(FieldView obj)
{
Name = obj.Name;
Value = obj.Value;
Type = obj.Type;
}
public Field(Domain.Field obj)
{
Name = obj.Name?.EncryptedString;
Value = obj.Value?.EncryptedString;
Type = obj.Type;
}
public string Name { get; set; }
public string Value { get; set; }
public FieldType Type { get; set; }
public static FieldView ToView(Field req, FieldView view = null)
{
if (view == null)
{
view = new FieldView();
}
view.Type = req.Type;
view.Value = req.Value;
view.Name = req.Name;
return view;
}
}
}