using System; using System.Collections.Generic; using Bit.App.Resources; namespace Bit.App.Models.Page { public class VaultListPageModel { public class Site { public Site(Models.Site site) { Id = site.Id; FolderId = site.FolderId; Name = site.Name?.Decrypt(); Username = site.Username?.Decrypt() ?? " "; Password = new Lazy(() => site.Password?.Decrypt()); Uri = new Lazy(() => site.Uri?.Decrypt()); } public string Id { get; set; } public string FolderId { get; set; } public string Name { get; set; } public string Username { get; set; } public Lazy Password { get; set; } public Lazy Uri { get; set; } } public class Folder : List { public Folder(Models.Folder folder) { Id = folder.Id; Name = folder.Name?.Decrypt(); } public Folder(List sites) { AddRange(sites); } public string Id { get; set; } public string Name { get; set; } = AppResources.FolderNone; } } }