mirror of
https://github.com/bitwarden/mobile
synced 2025-12-30 15:13:24 +00:00
edit custom fields
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -5,6 +5,8 @@ namespace Bit.App.Models
|
||||
{
|
||||
public class Field
|
||||
{
|
||||
public Field() { }
|
||||
|
||||
public Field(FieldDataModel model)
|
||||
{
|
||||
Type = model.Type;
|
||||
|
||||
Reference in New Issue
Block a user