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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user