mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 07:43:37 +00:00
PS-70 show upgrade to premium text on details to free user.
This commit is contained in:
@@ -203,6 +203,26 @@ namespace Bit.App.Pages
|
|||||||
return fs;
|
return fs;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FormattedString UpgradeToPremiumTotpText
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var fs = new FormattedString();
|
||||||
|
fs.Spans.Add(new Span
|
||||||
|
{
|
||||||
|
Text = "Upgrade to premium ",
|
||||||
|
TextColor = ThemeManager.GetResourceColor("PrimaryColor")
|
||||||
|
});
|
||||||
|
fs.Spans.Add(new Span
|
||||||
|
{
|
||||||
|
Text = "to view verification codes",
|
||||||
|
TextColor = ThemeManager.GetResourceColor("MutedColor")
|
||||||
|
});
|
||||||
|
return fs;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public bool ShowUris => IsLogin && Cipher.Login.HasUris;
|
public bool ShowUris => IsLogin && Cipher.Login.HasUris;
|
||||||
public bool ShowIdentityAddress => IsIdentity && (
|
public bool ShowIdentityAddress => IsIdentity && (
|
||||||
!string.IsNullOrWhiteSpace(Cipher.Identity.Address1) ||
|
!string.IsNullOrWhiteSpace(Cipher.Identity.Address1) ||
|
||||||
@@ -217,7 +237,7 @@ namespace Bit.App.Pages
|
|||||||
public string PasswordVisibilityAccessibilityText => ShowPassword ? AppResources.PasswordIsVisibleTapToHide : AppResources.PasswordIsNotVisibleTapToShow;
|
public string PasswordVisibilityAccessibilityText => ShowPassword ? AppResources.PasswordIsVisibleTapToHide : AppResources.PasswordIsNotVisibleTapToShow;
|
||||||
public string TotpCodeFormatted
|
public string TotpCodeFormatted
|
||||||
{
|
{
|
||||||
get => _totpCodeFormatted;
|
get => _canAccessPremium ? _totpCodeFormatted : "--- ---";
|
||||||
set => SetProperty(ref _totpCodeFormatted, value,
|
set => SetProperty(ref _totpCodeFormatted, value,
|
||||||
additionalPropertyNames: new string[]
|
additionalPropertyNames: new string[]
|
||||||
{
|
{
|
||||||
@@ -227,7 +247,11 @@ namespace Bit.App.Pages
|
|||||||
public string TotpSec
|
public string TotpSec
|
||||||
{
|
{
|
||||||
get => _totpSec;
|
get => _totpSec;
|
||||||
set => SetProperty(ref _totpSec, value);
|
set => SetProperty(ref _totpSec, value,
|
||||||
|
additionalPropertyNames: new string[]
|
||||||
|
{
|
||||||
|
nameof(TotpProgress)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
public bool TotpLow
|
public bool TotpLow
|
||||||
{
|
{
|
||||||
@@ -238,6 +262,7 @@ namespace Bit.App.Pages
|
|||||||
Page.Resources["textTotp"] = ThemeManager.Resources()[value ? "text-danger" : "text-default"];
|
Page.Resources["textTotp"] = ThemeManager.Resources()[value ? "text-danger" : "text-default"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public double TotpProgress => string.IsNullOrEmpty(TotpSec) ? 0 : double.Parse(TotpSec) * 100 / 30;
|
||||||
public bool IsDeleted => Cipher.IsDeleted;
|
public bool IsDeleted => Cipher.IsDeleted;
|
||||||
public bool CanEdit => !Cipher.IsDeleted;
|
public bool CanEdit => !Cipher.IsDeleted;
|
||||||
|
|
||||||
@@ -707,6 +732,11 @@ namespace Bit.App.Pages
|
|||||||
|
|
||||||
return _passwordReprompted = await _passwordRepromptService.ShowPasswordPromptAsync();
|
return _passwordReprompted = await _passwordRepromptService.ShowPasswordPromptAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void LaunchGetPremiumMembershipURI()
|
||||||
|
{
|
||||||
|
_platformUtilsService.LaunchUri("https://bitwarden.com/pricing/");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ViewPageFieldViewModel : ExtendedViewModel
|
public class ViewPageFieldViewModel : ExtendedViewModel
|
||||||
|
|||||||
Reference in New Issue
Block a user