mirror of
https://github.com/bitwarden/mobile
synced 2026-02-21 20:03:30 +00:00
In-app vault export support (#729)
* First pass at vault export UI * Password validation via cryptoService * Export service framework * support for constructing json export data * Support for constructing csv export data * Cleanup and simplification * Completion of vault export feature * Formatting and simplification * Use dialog instead of toast for invalid master password entry
This commit is contained in:
34
src/Core/Models/Export/Field.cs
Normal file
34
src/Core/Models/Export/Field.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user