From 2003ac9d2c82e87060b8bb2f9207386890ac1552 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 18 Jun 2021 06:52:01 -0500 Subject: [PATCH] Redefine cipher "share" to "move to organization" (#1433) --- .../CipherViewCell/CipherViewCell.xaml | 2 +- .../SettingsPage/SettingsPage.xaml.cs | 2 +- .../SettingsPage/SettingsPageViewModel.cs | 6 +-- src/App/Pages/Vault/AddEditPage.xaml | 2 +- src/App/Pages/Vault/AddEditPage.xaml.cs | 4 +- src/App/Pages/Vault/SharePage.xaml | 4 +- src/App/Pages/Vault/SharePageViewModel.cs | 6 ++- src/App/Pages/Vault/ViewPage.xaml | 2 +- src/App/Pages/Vault/ViewPage.xaml.cs | 4 +- src/App/Resources/AppResources.Designer.cs | 54 ++++++++++++------- src/App/Resources/AppResources.resx | 22 +++++--- 11 files changed, 69 insertions(+), 39 deletions(-) diff --git a/src/App/Controls/CipherViewCell/CipherViewCell.xaml b/src/App/Controls/CipherViewCell/CipherViewCell.xaml index e49b8aea2..e7ac7ab5d 100644 --- a/src/App/Controls/CipherViewCell/CipherViewCell.xaml +++ b/src/App/Controls/CipherViewCell/CipherViewCell.xaml @@ -80,7 +80,7 @@ VerticalOptions="Center" StyleClass="list-title-icon" Margin="5, 0, 0, 0" - Text="" + Text="" IsVisible="{Binding Cipher.Shared, Mode=OneTime}" AutomationProperties.IsInAccessibleTree="True" AutomationProperties.Name="{u:I18n Shared}" /> diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs b/src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs index 44c1b6774..d49ab0971 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPage.xaml.cs @@ -103,7 +103,7 @@ namespace Bit.App.Pages { await Navigation.PushModalAsync(new NavigationPage(new ExportVaultPage())); } - else if (item.Name == AppResources.ShareVault) + else if (item.Name == AppResources.LearnOrg) { await _vm.ShareAsync(); } diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs index 958e2bd91..02de4daae 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs @@ -150,8 +150,8 @@ namespace Bit.App.Pages public async Task ShareAsync() { - var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.ShareVaultConfirmation, - AppResources.ShareVault, AppResources.Yes, AppResources.Cancel); + var confirmed = await _platformUtilsService.ShowDialogAsync(AppResources.LearnOrgConfirmation, + AppResources.LearnOrg, AppResources.Yes, AppResources.Cancel); if (confirmed) { _platformUtilsService.LaunchUri("https://help.bitwarden.com/article/what-is-an-organization/"); @@ -387,13 +387,13 @@ namespace Bit.App.Pages { new SettingsPageListItem { Name = AppResources.ImportItems }, new SettingsPageListItem { Name = AppResources.ExportVault }, - new SettingsPageListItem { Name = AppResources.ShareVault }, new SettingsPageListItem { Name = AppResources.WebVault } }; var otherItems = new List { new SettingsPageListItem { Name = AppResources.Options }, new SettingsPageListItem { Name = AppResources.About }, + new SettingsPageListItem { Name = AppResources.LearnOrg }, new SettingsPageListItem { Name = AppResources.HelpAndFeedback }, new SettingsPageListItem { Name = AppResources.RateTheApp } }; diff --git a/src/App/Pages/Vault/AddEditPage.xaml b/src/App/Pages/Vault/AddEditPage.xaml index 247b026c3..3c22ec2ba 100644 --- a/src/App/Pages/Vault/AddEditPage.xaml +++ b/src/App/Pages/Vault/AddEditPage.xaml @@ -30,7 +30,7 @@ x:Name="_collectionsItem" Clicked="Collections_Clicked" Order="Secondary" /> - { AppResources.Attachments }; if (_vm.EditMode) { - options.Add(_vm.Cipher.OrganizationId == null ? AppResources.Share : AppResources.Collections); + options.Add(_vm.Cipher.OrganizationId == null ? AppResources.MoveToOrganization : AppResources.Collections); } var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel, (_vm.EditMode && !_vm.CloneMode) ? AppResources.Delete : null, options.ToArray()); @@ -293,7 +293,7 @@ namespace Bit.App.Pages var page = new CollectionsPage(_vm.CipherId); await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page)); } - else if (selection == AppResources.Share) + else if (selection == AppResources.MoveToOrganization) { var page = new SharePage(_vm.CipherId); await Navigation.PushModalAsync(new Xamarin.Forms.NavigationPage(page)); diff --git a/src/App/Pages/Vault/SharePage.xaml b/src/App/Pages/Vault/SharePage.xaml index ad84a2a7b..3c9486db3 100644 --- a/src/App/Pages/Vault/SharePage.xaml +++ b/src/App/Pages/Vault/SharePage.xaml @@ -15,7 +15,7 @@ - + @@ -46,7 +46,7 @@ StyleClass="box-value" />