mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
premium required for attachment download
This commit is contained in:
parent
1124c48c8d
commit
b32603b472
3 changed files with 22 additions and 4 deletions
|
@ -277,8 +277,14 @@ namespace Bit.App.Pages
|
|||
|
||||
private async Task OpenAttachmentAsync(Login login, VaultViewLoginPageModel.Attachment attachment)
|
||||
{
|
||||
// 20 MB warning
|
||||
if(attachment.Size >= 20971520 && !(await _userDialogs.ConfirmAsync(
|
||||
if(!_tokenService.TokenPremium && !login.OrganizationUseTotp)
|
||||
{
|
||||
_userDialogs.Alert(AppResources.PremiumRequired);
|
||||
return;
|
||||
}
|
||||
|
||||
// 10 MB warning
|
||||
if(attachment.Size >= 10485760 && !(await _userDialogs.ConfirmAsync(
|
||||
string.Format(AppResources.AttachmentLargeWarning, attachment.SizeName), null,
|
||||
AppResources.Yes, AppResources.No)))
|
||||
{
|
||||
|
|
9
src/App/Resources/AppResources.Designer.cs
generated
9
src/App/Resources/AppResources.Designer.cs
generated
|
@ -1771,6 +1771,15 @@ namespace Bit.App.Resources {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to A premium membership is required to use this feature..
|
||||
/// </summary>
|
||||
public static string PremiumRequired {
|
||||
get {
|
||||
return ResourceManager.GetString("PremiumRequired", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to bitwarden keeps your vault automatically synced by using push notifications. For the best possible experience, please select "Ok" on the following prompt when asked to enable push notifications..
|
||||
/// </summary>
|
||||
|
|
|
@ -962,4 +962,7 @@
|
|||
<data name="DisableAutoTotpCopy" xml:space="preserve">
|
||||
<value>Disable Automatic TOTP Copy</value>
|
||||
</data>
|
||||
<data name="PremiumRequired" xml:space="preserve">
|
||||
<value>A premium membership is required to use this feature.</value>
|
||||
</data>
|
||||
</root>
|
Loading…
Reference in a new issue