1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 18:13:36 +00:00

vault list grouping page

This commit is contained in:
Kyle Spearrin
2017-11-24 23:15:25 -05:00
parent c9ceb09906
commit aaea0b2659
26 changed files with 711 additions and 158 deletions

View File

@@ -165,6 +165,52 @@ namespace Bit.App.Models.Page
public string Name { get; set; } = AppResources.FolderNone;
}
public class Section : List<Grouping>
{
public Section(List<Grouping> groupings, string name)
{
AddRange(groupings);
Name = name.ToUpperInvariant();
ItemCount = groupings.Count;
}
public string Name { get; set; }
public int ItemCount { get; set; }
}
public class Grouping
{
public Grouping(string name, int count)
{
Id = null;
Name = name;
Folder = true;
CipherCount = count;
}
public Grouping(Models.Folder folder, int count)
{
Id = folder.Id;
Name = folder.Name?.Decrypt();
Folder = true;
CipherCount = count;
}
public Grouping(Collection collection, int count)
{
Id = collection.Id;
Name = collection.Name?.Decrypt(collection.OrganizationId);
Collection = true;
CipherCount = count;
}
public string Id { get; set; }
public string Name { get; set; } = AppResources.FolderNone;
public int CipherCount { get; set; }
public bool Folder { get; set; }
public bool Collection { get; set; }
}
public class AutofillGrouping : List<AutofillCipher>
{
public AutofillGrouping(List<AutofillCipher> logins, string name)