1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-18 01:03:24 +00:00

Send feature for mobile (#1256)

* Send feature for mobile

* added fallback for KdfIterations

* additional property exclusions for tests

* support encryptedFileData as byte array comparison in SendServiceTests

* formatting

* requested changes

* additional changes

* change position of send service registration to match declaration order
This commit is contained in:
Matt Portune
2021-02-10 19:50:10 -05:00
committed by GitHub
parent 52ba9f2ba7
commit a18e59a28a
49 changed files with 3776 additions and 33 deletions

View File

@@ -7,6 +7,8 @@ namespace Bit.Core.Models.View
{
public class SendView : View
{
public SendView() { }
public SendView(Send send) : base()
{
Id = send.Id;
@@ -38,8 +40,10 @@ namespace Bit.Core.Models.View
public string Password { get; set; }
public bool Disabled { get; set; }
public string UrlB64Key => Key == null ? null : CoreHelpers.Base64UrlEncode(Key);
public bool HasPassword => Password?.Length > 0;
public bool MaxAccessCountReached => MaxAccessCount.HasValue && AccessCount >= MaxAccessCount.Value;
public bool Expired => ExpirationDate.HasValue && ExpirationDate.Value <= DateTime.UtcNow;
public bool PendingDelete => DeletionDate <= DateTime.UtcNow;
public string DisplayDate => DeletionDate.ToLocalTime().ToString("MMM d, yyyy, h:mm tt");
}
}