mirror of
https://github.com/bitwarden/mobile
synced 2026-01-08 11:33:31 +00:00
Hide email address in Sends (#1340)
* Add HideEmail model properties and locale strings * Fix UI strings * Add HideEmail to SendService * Add HideEmail option to UI * Tidy up declarations * Add Bitwarden Send translation warning
This commit is contained in:
@@ -24,6 +24,7 @@ namespace Bit.Core.Models.Data
|
||||
DeletionDate = response.DeletionDate;
|
||||
Password = response.Password;
|
||||
Disabled = response.Disabled;
|
||||
HideEmail = response.HideEmail.GetValueOrDefault();
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
@@ -54,5 +55,6 @@ namespace Bit.Core.Models.Data
|
||||
public DateTime DeletionDate { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public bool HideEmail { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ namespace Bit.Core.Models.Domain
|
||||
public DateTime DeletionDate { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public bool HideEmail { get; set; }
|
||||
|
||||
public Send() : base() { }
|
||||
|
||||
@@ -49,6 +50,7 @@ namespace Bit.Core.Models.Domain
|
||||
RevisionDate = data.RevisionDate;
|
||||
DeletionDate = data.DeletionDate;
|
||||
ExpirationDate = data.ExpirationDate;
|
||||
HideEmail = data.HideEmail;
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ namespace Bit.Core.Models.Request
|
||||
public SendFileApi File { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public bool HideEmail { get; set; }
|
||||
|
||||
public SendRequest(Send send, long? fileLength)
|
||||
{
|
||||
@@ -32,6 +33,7 @@ namespace Bit.Core.Models.Request
|
||||
Key = send.Key?.EncryptedString;
|
||||
Password = send.Password;
|
||||
Disabled = send.Disabled;
|
||||
HideEmail = send.HideEmail;
|
||||
|
||||
switch (Type)
|
||||
{
|
||||
|
||||
@@ -21,5 +21,6 @@ namespace Bit.Core.Models.Response
|
||||
public DateTime DeletionDate { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public bool? HideEmail { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ namespace Bit.Core.Models.View
|
||||
ExpirationDate = send.ExpirationDate;
|
||||
Disabled = send.Disabled;
|
||||
Password = send.Password;
|
||||
HideEmail = send.HideEmail;
|
||||
}
|
||||
|
||||
public string Id { get; set; }
|
||||
@@ -45,5 +46,6 @@ namespace Bit.Core.Models.View
|
||||
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");
|
||||
public bool HideEmail { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user