1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-30 15:13:24 +00:00

edit custom fields

This commit is contained in:
Kyle Spearrin
2017-09-25 17:13:20 -04:00
parent 78cda03d61
commit 590fe211c4
7 changed files with 300 additions and 2 deletions

View File

@@ -1,4 +1,6 @@
using Bit.App.Enums;
using System.Collections.Generic;
using System.Linq;
namespace Bit.App.Models.Api
{
@@ -13,6 +15,16 @@ namespace Bit.App.Models.Api
Notes = login.Notes?.EncryptedString;
Favorite = login.Favorite;
if(login.Fields != null)
{
Fields = login.Fields.Select(f => new FieldDataModel
{
Name = f.Name?.EncryptedString,
Value = f.Value?.EncryptedString,
Type = f.Type
});
}
switch(Type)
{
case CipherType.Login:
@@ -29,6 +41,7 @@ namespace Bit.App.Models.Api
public bool Favorite { get; set; }
public string Name { get; set; }
public string Notes { get; set; }
public IEnumerable<FieldDataModel> Fields { get; set; }
public LoginType Login { get; set; }
public class LoginType

View File

@@ -5,6 +5,8 @@ namespace Bit.App.Models
{
public class Field
{
public Field() { }
public Field(FieldDataModel model)
{
Type = model.Type;