From a51c2efdae02cfaaf6812565186bc97f90d25783 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andre=CC=81=20Bispo?= Date: Wed, 29 Jun 2022 11:29:29 +0100 Subject: [PATCH] PS-70 changed premium required label. fixed bug when to show premium required label. --- .../AuthenticatorViewCell.xaml | 4 -- src/App/Pages/Vault/ViewPage.xaml | 71 ++++++++++--------- src/App/Pages/Vault/ViewPageViewModel.cs | 20 +----- src/App/Resources/AppResources.Designer.cs | 10 +-- src/App/Resources/AppResources.resx | 7 +- 5 files changed, 44 insertions(+), 68 deletions(-) diff --git a/src/App/Controls/AuthenticatorViewCell/AuthenticatorViewCell.xaml b/src/App/Controls/AuthenticatorViewCell/AuthenticatorViewCell.xaml index cd2a6f061..a6e9ac662 100644 --- a/src/App/Controls/AuthenticatorViewCell/AuthenticatorViewCell.xaml +++ b/src/App/Controls/AuthenticatorViewCell/AuthenticatorViewCell.xaml @@ -8,16 +8,12 @@ xmlns:ff="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms" xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore" StyleClass="list-row, list-row-platform" - RowSpacing="0" - ColumnSpacing="0" HorizontalOptions="FillAndExpand" x:DataType="pages:GroupingsPageTOTPListItem"> - - diff --git a/src/App/Pages/Vault/ViewPage.xaml b/src/App/Pages/Vault/ViewPage.xaml index 2aeca48fa..bc733996e 100644 --- a/src/App/Pages/Vault/ViewPage.xaml +++ b/src/App/Pages/Vault/ViewPage.xaml @@ -1,5 +1,5 @@ - - + + x:Key="collectionsItem" + x:Name="_collectionsItem" + Clicked="Collections_Clicked" + Order="Secondary" /> + x:Key="shareItem" + x:Name="_shareItem" + Clicked="Share_Clicked" + Order="Secondary" /> - - @@ -126,7 +126,7 @@ Grid.Column="0" LineBreakMode="CharacterWrap" IsVisible="{Binding ShowPassword}" /> - - - + @@ -176,14 +177,14 @@ Text="{u:I18n VerificationCodeTotp}" StyleClass="box-label" Grid.Row="0" - Grid.Column="0"/> + Grid.Column="0" /> + VerticalOptions="Start" /> - + + - + \ No newline at end of file diff --git a/src/App/Pages/Vault/ViewPageViewModel.cs b/src/App/Pages/Vault/ViewPageViewModel.cs index f3b80eb4c..4a443fc1b 100644 --- a/src/App/Pages/Vault/ViewPageViewModel.cs +++ b/src/App/Pages/Vault/ViewPageViewModel.cs @@ -204,24 +204,8 @@ namespace Bit.App.Pages } } - public FormattedString UpgradeToPremiumTotpText - { - get - { - var fs = new FormattedString(); - fs.Spans.Add(new Span - { - Text = AppResources.UpgradeToPremium, - TextColor = ThemeManager.GetResourceColor("PrimaryColor") - }); - fs.Spans.Add(new Span - { - Text = AppResources.ToViewVerificationCodes, - TextColor = ThemeManager.GetResourceColor("MutedColor") - }); - return fs; - } - } + public string UpgradeToPremiumTotpText => AppResources.PremiumSubscriptionRequired; + public bool ShowUpgradePremiumTotpText => !CanAccessPremium && ShowTotp; public bool ShowUris => IsLogin && Cipher.Login.HasUris; public bool ShowIdentityAddress => IsIdentity && ( diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index d94aeac06..55f17f42f 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -4047,15 +4047,9 @@ namespace Bit.App.Resources { } } - public static string UpgradeToPremium { + public static string PremiumSubscriptionRequired { get { - return ResourceManager.GetString("UpgradeToPremium", resourceCulture); - } - } - - public static string ToViewVerificationCodes { - get { - return ResourceManager.GetString("ToViewVerificationCodes", resourceCulture); + return ResourceManager.GetString("PremiumSubscriptionRequired", resourceCulture); } } diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index 6cb64b15e..7083ac6d2 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -2261,11 +2261,8 @@ Display items containing TOTP - - Upgrade to premium - - - to view verification codes + + Premium subscription required Cannot add authenticator key?