2016-05-02 09:52:09 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-05-08 06:11:47 +03:00
|
|
|
|
using Bit.App.Resources;
|
2016-05-02 09:52:09 +03:00
|
|
|
|
|
2016-05-08 06:11:47 +03:00
|
|
|
|
namespace Bit.App.Models.Page
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
2016-05-08 06:11:47 +03:00
|
|
|
|
public class VaultListPageModel
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
|
|
|
|
public class Site
|
|
|
|
|
{
|
2016-07-11 08:12:31 +03:00
|
|
|
|
public Site(Models.Site site)
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
|
|
|
|
Id = site.Id;
|
2016-07-11 08:12:31 +03:00
|
|
|
|
FolderId = site.FolderId;
|
2016-05-02 09:52:09 +03:00
|
|
|
|
Name = site.Name?.Decrypt();
|
2016-06-30 07:36:44 +03:00
|
|
|
|
Username = site.Username?.Decrypt() ?? " ";
|
2016-07-07 05:59:13 +03:00
|
|
|
|
Password = new Lazy<string>(() => site.Password?.Decrypt());
|
|
|
|
|
Uri = new Lazy<string>(() => site.Uri?.Decrypt());
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
2016-05-03 09:08:50 +03:00
|
|
|
|
public string Id { get; set; }
|
2016-05-04 02:49:49 +03:00
|
|
|
|
public string FolderId { get; set; }
|
2016-05-02 09:52:09 +03:00
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Username { get; set; }
|
2016-07-07 05:59:13 +03:00
|
|
|
|
public Lazy<string> Password { get; set; }
|
|
|
|
|
public Lazy<string> Uri { get; set; }
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
2016-05-19 03:29:03 +03:00
|
|
|
|
public class Folder : List<Site>
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
2016-07-11 08:12:31 +03:00
|
|
|
|
public Folder(Models.Folder folder)
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
2016-07-11 08:12:31 +03:00
|
|
|
|
Id = folder.Id;
|
|
|
|
|
Name = folder.Name?.Decrypt();
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
2016-08-18 04:19:19 +03:00
|
|
|
|
public Folder(List<Site> sites)
|
2016-05-02 09:52:09 +03:00
|
|
|
|
{
|
2016-07-11 08:12:31 +03:00
|
|
|
|
AddRange(sites);
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
|
2016-05-03 09:08:50 +03:00
|
|
|
|
public string Id { get; set; }
|
2016-05-08 06:11:47 +03:00
|
|
|
|
public string Name { get; set; } = AppResources.FolderNone;
|
2016-05-02 09:52:09 +03:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|